informer

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Entities *EntityCache
	Features *FeatureCache
	Groups   *GroupCache
}

func NewCache

func NewCache(
	entities types.EntityList,
	features types.FeatureList,
	groups types.GroupList) *Cache

type EntityCache

type EntityCache struct {
	types.EntityList
}

type FeatureCache

type FeatureCache struct {
	types.FeatureList
}

func (*FeatureCache) Enrich

func (c *FeatureCache) Enrich(groupCache *GroupCache)

func (*FeatureCache) List

type GroupCache

type GroupCache struct {
	types.GroupList
}

func (*GroupCache) Enrich

func (c *GroupCache) Enrich(entityCache *EntityCache)

func (*GroupCache) Get added in v0.1.0

func (c *GroupCache) Get(groupID int) *types.Group

func (*GroupCache) List

func (c *GroupCache) List(entityID *int) types.GroupList

type Informer

type Informer struct {
	// contains filtered or unexported fields
}

func New

func New(listInterval time.Duration, lister func() (*Cache, error)) (*Informer, error)

func (*Informer) Cache

func (f *Informer) Cache() *Cache

func (*Informer) Close

func (f *Informer) Close() error

func (*Informer) GetCachedGroup added in v0.1.0

func (f *Informer) GetCachedGroup(ctx context.Context, groupID int) (*types.Group, error)

func (*Informer) ListCachedFeature added in v0.1.0

func (f *Informer) ListCachedFeature(ctx context.Context, opt metadata.ListCachedFeatureOpt) types.FeatureList

func (*Informer) Refresh

func (f *Informer) Refresh() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL