Documentation ¶
Index ¶
- Variables
- func Add(mgr manager.Manager, _ string) error
- type Cache
- func (cache *Cache) Changed() bool
- func (cache *Cache) Delete(node string)
- func (cache *Cache) Get(node string) (CacheEntry, error)
- func (cache *Cache) IsCacheOutdated() bool
- func (cache *Cache) Keys() []string
- func (cache *Cache) Set(node string, entry CacheEntry) error
- func (cache *Cache) UpdateTimestamp()
- type CacheEntry
- type CachedNodeInfo
- type Controller
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
ErrNotFound is returned when entry hasn't been found on the cache.
Functions ¶
Types ¶
type Cache ¶
Cache manages information about Nodes.
func (*Cache) Get ¶
func (cache *Cache) Get(node string) (CacheEntry, error)
Get returns the information about node, or error if not found or failed to unmarshall the data.
func (*Cache) IsCacheOutdated ¶
func (*Cache) Set ¶
func (cache *Cache) Set(node string, entry CacheEntry) error
Set updates the information about node, or error if failed to marshall the data.
func (*Cache) UpdateTimestamp ¶
func (cache *Cache) UpdateTimestamp()
type CacheEntry ¶
type CacheEntry struct { Instance string `json:"instance"` IPAddress string `json:"ip"` LastSeen time.Time `json:"seen"` LastMarkedForTermination time.Time `json:"marked"` }
CacheEntry contains information about a Node.
type CachedNodeInfo ¶
type CachedNodeInfo struct {
// contains filtered or unexported fields
}
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(mgr manager.Manager) *Controller
func (*Controller) SetupWithManager ¶
func (controller *Controller) SetupWithManager(mgr ctrl.Manager) error
Click to show internal directories.
Click to hide internal directories.