using System.Collections.Generic; using k8s.Models; namespace k8s.Util.Informer.Cache { public interface IStore where TApiType : class, IKubernetesObject { /// /// add inserts an item into the store. /// /// specific obj void Add(TApiType obj); /// /// update sets an item in the store to its updated state. /// /// specific obj void Update(TApiType obj); /// /// delete removes an item from the store. /// /// specific obj void Delete(TApiType obj); /// /// Replace will delete the contents of 'c', using instead the given list. /// /// list of objects /// specific resource version void Replace(IEnumerable list, string resourceVersion); /// /// resync will send a resync event for each item. /// void Resync(); /// /// listKeys returns a list of all the keys of the object currently in the store. /// /// list of all keys IEnumerable ListKeys(); /// /// get returns the requested item. /// /// specific obj /// the requested item if exist TApiType Get(TApiType obj); /// /// getByKey returns the request item with specific key. /// /// specific key /// the request item TApiType GetByKey(string key); /// /// list returns a list of all the items. /// /// list of all the items IEnumerable List(); } }