cache

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 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 GnmiCacheConfig

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

func (*GnmiCacheConfig) SetDefaults

func (gcc *GnmiCacheConfig) SetDefaults()

type GnmiOutputCache

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

func (*GnmiOutputCache) Init

func (gc *GnmiOutputCache) Init(opts ...Option)

func (*GnmiOutputCache) LoadConfig

func (gc *GnmiOutputCache) LoadConfig(gcc *GnmiCacheConfig)

func (*GnmiOutputCache) Read

func (gc *GnmiOutputCache) Read() []*formatters.EventMsg

func (*GnmiOutputCache) SetLogger

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

func (*GnmiOutputCache) Write

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

type Option

type Option func(*GnmiOutputCache)

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