memcached

package
v0.0.0-...-c72af41 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MemcachedSuffix = utils.MetricSuffix + "_memcached"
)

Functions

func LatencyCheck

func LatencyCheck(p topology.ProbeableEndpoint) error

func ObserveOpLatency

func ObserveOpLatency(op func() error, labels []string) error

Types

type MemcachedChecksConfigs

type MemcachedChecksConfigs struct {
	LatencyCheckConfig scheduler.CheckConfig `yaml:"latency_check,omitempty"`
}

type MemcachedEndpoint

type MemcachedEndpoint struct {
	Name         string
	ClusterLevel bool
	ClusterName  string
	Config       MemcachedProbeConfig
	Client       *memcache.Client
	Servers      []string
	Logger       log.Logger
}

func (*MemcachedEndpoint) Close

func (e *MemcachedEndpoint) Close() error

func (*MemcachedEndpoint) Connect

func (e *MemcachedEndpoint) Connect() error

func (*MemcachedEndpoint) GetHash

func (e *MemcachedEndpoint) GetHash() string

func (*MemcachedEndpoint) GetName

func (e *MemcachedEndpoint) GetName() string

func (*MemcachedEndpoint) IsCluster

func (e *MemcachedEndpoint) IsCluster() bool

func (*MemcachedEndpoint) Refresh

func (e *MemcachedEndpoint) Refresh() error

type MemcachedEndpointConfig

type MemcachedEndpointConfig struct {
	LatencyKeyPrefix string `yaml:"latency_key_prefix,omitempty"`
}

Config used to configure the endpoint of Memcached

func (*MemcachedEndpointConfig) UnmarshalYAML

func (c *MemcachedEndpointConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

type MemcachedProbeConfig

type MemcachedProbeConfig struct {
	// Generic consul configurations
	DiscoveryConfig discovery.GenericDiscoveryConfig `yaml:"discovery,omitempty"`
	// Generic probe configurations
	MemcachedEndpointConfig MemcachedEndpointConfig `yaml:"client_config,omitempty"`
	// Check configurations
	MemcachedChecksConfigs MemcachedChecksConfigs `yaml:"checks_configs,omitempty"`
}

func (MemcachedProbeConfig) GenerateTopologyBuilder

func (conf MemcachedProbeConfig) GenerateTopologyBuilder() func(log.Logger, []discovery.ServiceEntry) (topology.ClusterMap, error)

Jump to

Keyboard shortcuts

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