cache

package
v2.1.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 6 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"

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

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

Variables

This section is empty.

Functions

func MakeApplicationsCacheKey added in v2.0.9

func MakeApplicationsCacheKey() string

Make applications cache key.

func MakeBucketCacheKey added in v2.0.9

func MakeBucketCacheKey(name string) string

Make cache key for bucket.

func MakeCacheKey

func MakeCacheKey(namespace string, id string) string

Make cache key.

func MakeNamespaceCacheKey added in v2.0.9

func MakeNamespaceCacheKey(namespace string) string

Make namespace cache 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