Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Query(app, env, key string) (*concept.Element, bool) Set(app, env, key string, elem *concept.Element) }
func NewCache ¶
NewCache construct a cache instance to help app manages caches. FIXED(@yeqown): how to clear caches? or cache items will be released at time. Solution: limit cache size with cache replacing algorithm so that no need to worry about OOM.
DONE(@yeqown): using LRU-2 cache replacing algorithm to limit cache.
type InstancePool ¶
type InstancePool interface { Register(insId string, app, env string, keys []string) <-chan *concept.Element Unregister(insId string) Notify(insId string, element *concept.Element) ListWatchingInstances(app, env, key string) set.StringSet }
InstancePool is a pool provide open API ability to Register / Unregister / Notify instances.
func NewInstancePool ¶
func NewInstancePool() InstancePool
Click to show internal directories.
Click to hide internal directories.