cache

package
v2.0.3-beta.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

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

	// Schedulers prefix of cache key.
	SchedulersNamespace = "schedulers"
)

Variables

This section is empty.

Functions

func MakeCacheKey

func MakeCacheKey(namespace string, id string) string

Make cache key

func MakeSchedulerCacheKey

func MakeSchedulerCacheKey(hostname string, clusterID uint) string

Make cache key for scheduler

func MakeSchedulersCacheKey

func MakeSchedulersCacheKey(hostname, ip string) string

Make cache key for schedulers

func MakeSeedPeerCacheKey added in v2.0.3

func MakeSeedPeerCacheKey(hostname string, clusterID uint) 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