memcache

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Provider is a stateful cache for asynchronous memcached auto-discovery resolution. It provides a way to resolve addresses and obtain them.

func NewProvider

func NewProvider(logger log.Logger, reg prometheus.Registerer, dialTimeout time.Duration) *Provider

func (*Provider) Addresses

func (p *Provider) Addresses() []string

Addresses returns the latest addresses present in the Provider.

func (*Provider) Resolve

func (p *Provider) Resolve(ctx context.Context, addresses []string) error

Resolve stores a list of nodes auto-discovered from the provided addresses.

type Resolver

type Resolver interface {
	Resolve(ctx context.Context, address string) (*clusterConfig, error)
}

Jump to

Keyboard shortcuts

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