cachekey

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CacheKeySeparator = "#"
)

Variables

This section is empty.

Functions

func Container

func Container(podName string, containerName string, namespace string) *containerCacheKey

func Endpoint

func Endpoint(namespace string, podName string, protocol string, port int) *endpointCacheKey

func Identity

func Identity(identityName string, namespace string) *identityCacheKey

func Node

func Node(nodeName string) *nodeCacheKey

func ObjectID

func ObjectID(storeID string) *objectIDCacheKey

func Role

func Role(roleName string, namespace string) *roleCacheKey

Types

type CacheKey

type CacheKey interface {
	// Shard returns the shard (aka cache namespace) to which the cache key belongs.
	Shard() string

	// Key returns the value to be used in the cachec lookup operation.
	Key() string
}

CacheKey defines a generic, provider agnostic abstraction of a cache key.

Jump to

Keyboard shortcuts

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