package
0.13.28
Repository: https://github.com/easystack/cilium.git
Documentation: pkg.go.dev

# Packages

Package allocator provides a kvstore based ID allocator.

# Functions

Client returns the global kvstore client or nil if the client is not configured yet.
Close closes the kvstore client.
CreateIfExists creates a key with the value only if key condKey exists.
CreateLease creates a new lease with the given ttl.
CreateOnly atomically creates a key or fails if it already exists.
Decode decodes a key previously encoded back into the original binary slice.
Delete deletes a key.
DeletePrefix deletes all keys matching a prefix.
EnableTracing enables kvstore tracing.
Encode encodes a binary slice into a character set that the backend supports.
Get returns value of key.
GetCapabilities returns the capabilities of the backend.
GetPrefix returns the first key which matches the prefix.
KeepAlive keeps a lease created with CreateLease alive.
ListAndWatch creates a new watcher which will watch the specified prefix for changes.
ListPrefix returns the list of keys matching the prefix.
LockPath locks the specified path.
Set sets the value of a key.
Setup sets up the key-value store specified in kvStore and configures it with the options provided in opts.
SetupDummy sets up kvstore for tests.
Trace is used to trace kvstore debug messages.
Update creates or updates a key value pair.

# Constants

BaseKeyPrefix is the base prefix that should be used for all keys.
CapabilityCreateIfExists is true if CreateIfExists is functional.
CapabilityDeleteOnZeroCount is true if DeleteOnZeroCount is functional.
EventTypeCreate represents a newly created key.
EventTypeDelete represents a deleted key.
EventTypeListDone signals that the initial list operation has completed.
EventTypeModify represents a modified key.

# Variables

Debugging can be enabled at compile with: -ldflags "-X "github.com/cilium/cilium/pkg/kvstore".Debug=true".
KeepAliveInterval is the interval in which the lease is being renewed.
15 minutes.
RetryInterval is the interval in which retries occur in the case of errors in communication with the KVstore.

# Structs

KeyValueEvent is a change event for a Key/Value pair.
Lock is a lock return by LockPath.
Watcher represents a KVstore watcher.

# Interfaces

BackendOperations are the individual kvstore operations that each backend must implement.

# Type aliases

Capabilities is a bitmask to indicate the capabilities of a backend.
EventType defines the type of watch event that occured.
KeyValuePairs is a map of key=value pairs.