Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStatsOutput ¶
func SetStoreConfigCli ¶
Types ¶
type Stats ¶
type Stats struct { ResourceType resources.ResourceType ItemPerNamespace map[string]int LastDumped time.Time }
func GetStatsFromStores ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store stores the current state of k8s resources
func NewStore ¶
func NewStore(ctx context.Context, storeConfig *StoreConfig, ctorConfig resources.CtorConfig, resourceType resources.ResourceType) *Store
NewStore creates a new store
func (*Store) AddResource ¶
func (k *Store) AddResource(obj interface{})
AddResource adds a new k8s object to the store
func (*Store) AddResourceList ¶
AddResourceList clears current state add the objects to the store. It will trigger a full dump This is used for polled resources, no need for mutex
func (*Store) DeleteResource ¶
func (k *Store) DeleteResource(obj interface{})
DeleteResource removes an existing k8s object to the store
func (*Store) DumpFullState ¶
DumpFullState writes the full state to the cache file
func (*Store) UpdateResource ¶
func (k *Store) UpdateResource(oldObj, newObj interface{})
UpdateResource update an existing k8s object
type StoreConfig ¶
type StoreConfig struct { clusterconfig.ClusterConfig // contains filtered or unexported fields }
StoreConfig defines configuration to store This is shared between all resources
func NewStoreConfig ¶
func NewStoreConfig(storeConfigCli *StoreConfigCli) *StoreConfig
func (*StoreConfig) GetTimeBetweenFullDump ¶
func (s *StoreConfig) GetTimeBetweenFullDump() time.Duration
type StoreConfigCli ¶
type StoreConfigCli struct { *clusterconfig.ClusterConfigCli TimeBetweenFullDump time.Duration }
func GetStoreConfigCli ¶
func GetStoreConfigCli() StoreConfigCli
Click to show internal directories.
Click to hide internal directories.