client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client implements retrieving and caching of config store parameters.

func New

func New(cfg storage.Store, opts ...Option) *Client

New returns a new config store client.

func (*Client) GetValue

func (c *Client) GetValue(key string) ([]byte, error)

GetValue returns value from config store for specified key.

type Option

type Option func(opts *Client)

Option is a config client instance option.

func WithCacheLifetime

func WithCacheLifetime(expiry time.Duration) Option

WithCacheLifetime option defines the lifetime of an object in the cache.

func WithCacheSize

func WithCacheSize(size int) Option

WithCacheSize option defines the cache size.

Jump to

Keyboard shortcuts

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