Documentation
¶
Index ¶
- Variables
- func ClusterIDValidator(clusterID *uint32) clusterEndpointSliceValidator
- func ClusterNameValidator(clusterName string) clusterEndpointSliceValidator
- func KeyCreator(validators ...clusterEndpointSliceValidator) store.KeyCreator
- func NamespacedNameValidator() clusterEndpointSliceValidator
- type ClusterEndpointSlice
- func (eps *ClusterEndpointSlice) GetKeyName() string
- func (eps *ClusterEndpointSlice) Marshal() ([]byte, error)
- func (eps *ClusterEndpointSlice) MarshalJSON() ([]byte, error)
- func (eps *ClusterEndpointSlice) NamespacedName() types.NamespacedName
- func (eps *ClusterEndpointSlice) String() string
- func (eps *ClusterEndpointSlice) Unmarshal(_ string, data []byte) error
- func (eps *ClusterEndpointSlice) UnmarshalJSON(data []byte) error
- type ValidatingClusterEndpointSlice
Constants ¶
This section is empty.
Variables ¶
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