endpointslice

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EndpointSliceStorePrefix = kvstore.JoinKey(kvstore.BaseKeyPrefix, "state", "endpointslices", "v1")

EndpointSliceStorePrefix is the kvstore prefix of the shared store

WARNING - STABLE API: Changing the structure or values of this will break backwards compatibility

Functions

func ClusterIDValidator

func ClusterIDValidator(clusterID *uint32) clusterEndpointSliceValidator

ClusterIDValidator returns a validator enforcing that the cluster ID of the unmarshaled service matches the provided one. The access to the provided clusterID value is not synchronized, and it shall not be mutated concurrently.

func ClusterNameValidator

func ClusterNameValidator(clusterName string) clusterEndpointSliceValidator

ClusterNameValidator returns a validator enforcing that the cluster field of the unmarshaled service matches the provided one.

func KeyCreator

func KeyCreator(validators ...clusterEndpointSliceValidator) store.KeyCreator

KeyCreator returns a store.KeyCreator for ClusterEndpointSlices, configuring the specified extra validators.

func NamespacedNameValidator

func NamespacedNameValidator() clusterEndpointSliceValidator

NamespacedNameValidator returns a validator enforcing that the namespaced name of the unmarshaled service matches the kvstore key.

Types

type ClusterEndpointSlice

type ClusterEndpointSlice internal.ClusterEndpointSlice

ClusterEndpointSlice is the definition of an EndpointSlice in a cluster.

WARNING - STABLE API: Any change to this structure must be done in a backwards compatible way.

func (*ClusterEndpointSlice) GetKeyName

func (eps *ClusterEndpointSlice) GetKeyName() string

GetKeyName returns the kvstore key to be used for the global service

func (*ClusterEndpointSlice) Marshal

func (eps *ClusterEndpointSlice) Marshal() ([]byte, error)

Marshal returns the cluster EndpointSlice object as zstd-compressed protobuf

func (*ClusterEndpointSlice) MarshalJSON

func (eps *ClusterEndpointSlice) MarshalJSON() ([]byte, error)

MarshalJSON returns the cluster EndpointSlice object as JSON byte slice.

func (*ClusterEndpointSlice) NamespacedName

func (eps *ClusterEndpointSlice) NamespacedName() types.NamespacedName

NamespacedName returns the namespace and service name

func (*ClusterEndpointSlice) String

func (eps *ClusterEndpointSlice) String() string

func (*ClusterEndpointSlice) Unmarshal

func (eps *ClusterEndpointSlice) Unmarshal(_ string, data []byte) error

Unmarshal parses the zstd-compressed protobuf byte slice and updates the ClusterEndpointSlice receiver

func (*ClusterEndpointSlice) UnmarshalJSON

func (eps *ClusterEndpointSlice) UnmarshalJSON(data []byte) error

UnmarshalJSON parses the JSON byte slice and updates the ClusterEndpointSlice receiver.

type ValidatingClusterEndpointSlice

type ValidatingClusterEndpointSlice struct {
	ClusterEndpointSlice
	// contains filtered or unexported fields
}

ValidatingClusterEndpointSlice wraps a ClusterEndpointSlice to perform additional validation at unmarshal time.

+protobuf=false

func (*ValidatingClusterEndpointSlice) Unmarshal

func (ceps *ValidatingClusterEndpointSlice) Unmarshal(key string, data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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