cache

package
v2.0.8-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

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

	// Peer prefix of cache key.
	PeerNamespace = "peers"

	// Scheduler prefix of cache key.
	SchedulerNamespace = "schedulers"

	// Buckets prefix of cache key.
	BucketsNamespace = "buckets"
)

Variables

This section is empty.

Functions

func MakeBucketsCacheKey added in v2.0.4

func MakeBucketsCacheKey(name string) string

Make cache key for buckets.

func MakeCacheKey

func MakeCacheKey(namespace string, id string) string

Make cache key.

func MakeModelKey added in v2.0.6

func MakeModelKey(clusterID uint, hostname, ip, id string) string

Make cache model key.

func MakeModelVersionKey added in v2.0.6

func MakeModelVersionKey(clusterID uint, hostname, ip, id, version string) string

Make cache model version key.

func MakePeerCacheKey added in v2.0.3

func MakePeerCacheKey(hostname, ip string) string

Make cache key for peer.

func MakeSchedulerCacheKey

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

Make cache key for scheduler.

func MakeSchedulersCacheKeyForPeer added in v2.0.5

func MakeSchedulersCacheKeyForPeer(hostname, ip string) string

Make schedulers cache key for peer.

func MakeSeedPeerCacheKey added in v2.0.3

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

Make cache key for seed peer.

Types

type Cache

type Cache struct {
	*cache.Cache
	TTL time.Duration
}

Cache is cache client.

func New

func New(cfg *config.Config) (*Cache, error)

New cache instance.

Jump to

Keyboard shortcuts

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