cache

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GnmiCache added in v0.26.0

type GnmiCache struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New added in v0.26.0

func New(cfg *GnmiCacheConfig, opts ...Option) *GnmiCache

func (*GnmiCache) ReadEvents added in v0.26.0

func (gc *GnmiCache) ReadEvents() []*formatters.EventMsg

func (*GnmiCache) ReadNotifications added in v0.26.0

func (gc *GnmiCache) ReadNotifications() []*gnmi.Notification

func (*GnmiCache) SetLogger added in v0.26.0

func (gc *GnmiCache) SetLogger(logger *log.Logger)

func (*GnmiCache) Write added in v0.26.0

func (gc *GnmiCache) Write(measName string, rsp *gnmi.SubscribeResponse)

type GnmiCacheConfig

type GnmiCacheConfig struct {
	Expiration time.Duration `mapstructure:"expiration,omitempty"`
	Timeout    time.Duration `mapstructure:"timeout,omitempty"`
	Debug      bool          `mapstructure:"debug,omitempty"`
}

type Option

type Option func(*GnmiCache)

func WithLogger

func WithLogger(logger *log.Logger) Option

Jump to

Keyboard shortcuts

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