cache

package
v0.0.56 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheClientBound added in v0.0.56

type CacheClientBound interface {
	InstanceCreate(ctx context.Context) error
	InstanceDelete(ctx context.Context) error
	InstanceExists(ctx context.Context) bool
	IntentsList(ctx context.Context) ([]string, error)
	IntentGet(ctx context.Context, intentName string) (*tree_persist.Intent, error)
	IntentModify(ctx context.Context, intent *tree_persist.Intent) error
	IntentDelete(ctx context.Context, intentName string) error
	IntentExists(ctx context.Context, intentName string) (bool, error)
	IntentGetAll(ctx context.Context, excludeIntentNames []string, intentChan chan<- *tree_persist.Intent, errChan chan<- error)
	InstanceClose(ctx context.Context) error
}

type CacheClientBoundImpl added in v0.0.56

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

func NewCacheClientBound added in v0.0.56

func NewCacheClientBound(name string, c Client) *CacheClientBoundImpl

func (*CacheClientBoundImpl) InstanceClose added in v0.0.56

func (c *CacheClientBoundImpl) InstanceClose(ctx context.Context) error

func (*CacheClientBoundImpl) InstanceCreate added in v0.0.56

func (c *CacheClientBoundImpl) InstanceCreate(ctx context.Context) error

func (*CacheClientBoundImpl) InstanceDelete added in v0.0.56

func (c *CacheClientBoundImpl) InstanceDelete(ctx context.Context) error

func (*CacheClientBoundImpl) InstanceExists added in v0.0.56

func (c *CacheClientBoundImpl) InstanceExists(ctx context.Context) bool

func (*CacheClientBoundImpl) IntentDelete added in v0.0.56

func (c *CacheClientBoundImpl) IntentDelete(ctx context.Context, intentName string) error

func (*CacheClientBoundImpl) IntentExists added in v0.0.56

func (c *CacheClientBoundImpl) IntentExists(ctx context.Context, intentName string) (bool, error)

func (*CacheClientBoundImpl) IntentGet added in v0.0.56

func (c *CacheClientBoundImpl) IntentGet(ctx context.Context, intentName string) (*tree_persist.Intent, error)

func (*CacheClientBoundImpl) IntentGetAll added in v0.0.56

func (c *CacheClientBoundImpl) IntentGetAll(ctx context.Context, excludeIntentNames []string, intentChan chan<- *tree_persist.Intent, errChan chan<- error)

func (*CacheClientBoundImpl) IntentModify added in v0.0.56

func (c *CacheClientBoundImpl) IntentModify(ctx context.Context, intent *tree_persist.Intent) error

func (*CacheClientBoundImpl) IntentsList added in v0.0.56

func (c *CacheClientBoundImpl) IntentsList(ctx context.Context) ([]string, error)

type Client

type Client interface {
	InstanceCreate(ctx context.Context, cacheInstanceName string) error
	InstanceDelete(ctx context.Context, cacheInstanceName string) error
	InstanceClose(ctx context.Context, cacheInstanceName string) error
	InstanceExists(ctx context.Context, cacheInstanceName string) bool
	InstancesList(ctx context.Context) []string
	InstanceIntentsList(ctx context.Context, cacheInstanceName string) ([]string, error)
	InstanceIntentGet(ctx context.Context, cacheName string, intentName string) (*tree_persist.Intent, error)
	InstanceIntentModify(ctx context.Context, cacheName string, intent *tree_persist.Intent) error
	InstanceIntentDelete(ctx context.Context, cacheName string, intentName string) error
	InstanceIntentExists(ctx context.Context, cacheName string, intentName string) (bool, error)
	InstanceIntentGetAll(ctx context.Context, cacheName string, excludeIntentNames []string, intentChan chan<- *tree_persist.Intent, errChan chan<- error)
}

func NewLocalCache

func NewLocalCache(cfg *config.CacheConfig) (Client, error)

type LocalCache added in v0.0.56

type LocalCache struct {
	*cache.Cache
}

func (*LocalCache) InstanceIntentGet added in v0.0.56

func (l *LocalCache) InstanceIntentGet(ctx context.Context, cacheName string, intentName string) (*tree_persist.Intent, error)

func (*LocalCache) InstanceIntentGetAll added in v0.0.56

func (l *LocalCache) InstanceIntentGetAll(ctx context.Context, cacheName string, excludeIntentNames []string, intentChanOrig chan<- *tree_persist.Intent, errChanOrig chan<- error)

func (*LocalCache) InstanceIntentModify added in v0.0.56

func (l *LocalCache) InstanceIntentModify(ctx context.Context, cacheName string, intent *tree_persist.Intent) error

type Update

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

func NewUpdate added in v0.0.39

func NewUpdate(path []string, value []byte, priority int32, owner string, ts int64) *Update

func (*Update) Bytes

func (u *Update) Bytes() []byte

func (*Update) GetPath

func (u *Update) GetPath() []string

func (*Update) Owner

func (u *Update) Owner() string

func (*Update) Priority

func (u *Update) Priority() int32

func (*Update) String added in v0.0.39

func (u *Update) String() string

func (*Update) TS

func (u *Update) TS() int64

func (*Update) Value

func (u *Update) Value() (*sdcpb.TypedValue, error)

Jump to

Keyboard shortcuts

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