redis

package
v2.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// SeedPeerNamespace prefix of seed peers namespace cache key.
	SeedPeersNamespace = "seed-peers"

	// PeersNamespace prefix of peers namespace cache key.
	PeersNamespace = "peers"

	// SchedulersNamespace prefix of schedulers namespace cache key.
	SchedulersNamespace = "schedulers"

	// ApplicationsNamespace prefix of applications namespace cache key.
	ApplicationsNamespace = "applications"

	// BucketsNamespace prefix of buckets namespace cache key.
	BucketsNamespace = "buckets"

	// NetworkTopologyNamespace prefix of network topology namespace cache key.
	NetworkTopologyNamespace = "network-topology"

	// ProbesNamespace prefix of probes namespace cache key.
	ProbesNamespace = "probes"

	// ProbedCountNamespace prefix of probed count namespace cache key.
	ProbedCountNamespace = "probed-count"
)
View Source
const (
	// KeySeparator is the separator of redis key.
	KeySeparator = ":"
)

Variables

This section is empty.

Functions

func IsEnabled

func IsEnabled(addrs []string) bool

IsEnabled check redis is enabled.

func MakeApplicationsKeyInManager

func MakeApplicationsKeyInManager() string

MakeApplicationsKeyInManager make applications key in manager.

func MakeBucketKeyInManager

func MakeBucketKeyInManager(name string) string

MakeBucketKeyInManager make bucket key in manager.

func MakeKeyInManager

func MakeKeyInManager(namespace, id string) string

MakeKeyInManager make key in manager.

func MakeKeyInScheduler

func MakeKeyInScheduler(namespace, id string) string

MakeKeyInScheduler make key in scheduler.

func MakeNamespaceKeyInManager

func MakeNamespaceKeyInManager(namespace string) string

MakeNamespaceKeyInManager make namespace key in manager.

func MakeNamespaceKeyInScheduler

func MakeNamespaceKeyInScheduler(namespace string) string

MakeNamespaceKeyInScheduler make namespace key in scheduler.

func MakeNetworkTopologyKeyInScheduler

func MakeNetworkTopologyKeyInScheduler(srcHostID, destHostID string) string

MakeNetworkTopologyKeyInScheduler make network topology key in scheduler.

func MakePeerKeyInManager

func MakePeerKeyInManager(hostname, ip string) string

MakePeerKeyInManager make peer key in manager.

func MakeProbedCountKeyInScheduler

func MakeProbedCountKeyInScheduler(hostID string) string

MakeProbedCountKeyInScheduler make probed count key in scheduler.

func MakeProbesKeyInScheduler

func MakeProbesKeyInScheduler(srcHostID, destHostID string) string

MakeProbesKeyInScheduler make probes key in scheduler.

func MakeSchedulerKeyInManager

func MakeSchedulerKeyInManager(clusterID uint, hostname, ip string) string

MakeSchedulerKeyInManager make scheduler key in manager.

func MakeSchedulersKeyForPeerInManager

func MakeSchedulersKeyForPeerInManager(hostname, ip string) string

MakeSchedulersKeyForPeerInManager make schedulers key for peer in manager.

func MakeSeedPeerKeyInManager

func MakeSeedPeerKeyInManager(clusterID uint, hostname, ip string) string

MakeSeedPeerKeyInManager make seed peer key in manager.

func NewRedis

func NewRedis(cfg *redis.UniversalOptions) (redis.UniversalClient, error)

NewRedis returns a new redis client.

func ParseNetworkTopologyKeyInScheduler

func ParseNetworkTopologyKeyInScheduler(key string) (string, string, string, string, error)

ParseNetworkTopologyKeyInScheduler parse network topology key in scheduler.

func ParseProbedCountKeyInScheduler

func ParseProbedCountKeyInScheduler(key string) (string, string, string, error)

ParseProbedCountKeyInScheduler parse probed count key in scheduler.

Types

This section is empty.

Jump to

Keyboard shortcuts

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