Documentation
¶
Index ¶
- type NodeMetadata
- func (nm *NodeMetadata) Clone() *NodeMetadata
- func (in *NodeMetadata) DeepCopy() *NodeMetadata
- func (in *NodeMetadata) DeepCopyInto(out *NodeMetadata)
- func (nm *NodeMetadata) FromMap(data map[string]interface{}) error
- func (nm *NodeMetadata) FromStruct(s *structpb.Struct) error
- func (nm *NodeMetadata) IsEmpty() bool
- func (nm *NodeMetadata) Merge(other *NodeMetadata)
- func (nm *NodeMetadata) String() string
- func (nm *NodeMetadata) ToMap() (map[string]interface{}, error)
- func (nm *NodeMetadata) ToStruct() (*structpb.Struct, error)
- type ResourceVersionTable
- func (t *ResourceVersionTable) AddOrReplaceXdsResource(rType resourcev3.Type, resource types.Resource, ...) error
- func (t *ResourceVersionTable) AddXdsResource(rType resourcev3.Type, xdsResource types.Resource) error
- func (t *ResourceVersionTable) DeepCopy() *ResourceVersionTable
- func (t *ResourceVersionTable) DeepCopyInto(out *ResourceVersionTable)
- func (t *ResourceVersionTable) GetXdsResources() XdsResources
- func (t *ResourceVersionTable) SetResources(rType resourcev3.Type, xdsResources []types.Resource)
- type XdsResources
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeMetadata ¶
type NodeMetadata struct {
// Name is the human-readable name of the node/proxy instance.
Name string `json:"name,omitempty"`
// ExternalAddress is the external/public IP address of the node reachable by clients.
ExternalAddress string `json:"external_address,omitempty"`
// InternalAddress is the private/internal IP address of the node.
// This is used for internal communication or routing (e.g., Geneve tunnel endpoint).
InternalAddress string `json:"internal_address,omitempty"`
// ConnectedAt is the timestamp when the node was connected to the control plane.
ConnectedAt metav1.Time `json:"connected_at,omitempty"`
}
NodeMetadata represents metadata attached to an Envoy node. This metadata is sent with every XDS discovery request to the control plane. +k8s:deepcopy-gen=true
func ExtractFromDiscoveryRequest ¶
func ExtractFromDiscoveryRequest(req *discoveryv3.DiscoveryRequest) (*NodeMetadata, error)
ExtractFromDiscoveryRequest extracts NodeMetadata from an XDS DiscoveryRequest.
func ExtractFromNodeWithTime ¶
ExtractFromNodeWithTime extracts NodeMetadata from an Envoy core.Node struct.
func (*NodeMetadata) Clone ¶
func (nm *NodeMetadata) Clone() *NodeMetadata
Clone creates a deep copy of the NodeMetadata.
func (*NodeMetadata) DeepCopy ¶
func (in *NodeMetadata) DeepCopy() *NodeMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeMetadata.
func (*NodeMetadata) DeepCopyInto ¶
func (in *NodeMetadata) DeepCopyInto(out *NodeMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeMetadata) FromMap ¶
func (nm *NodeMetadata) FromMap(data map[string]interface{}) error
FromMap populates NodeMetadata from data.
func (*NodeMetadata) FromStruct ¶
func (nm *NodeMetadata) FromStruct(s *structpb.Struct) error
FromStruct populates NodeMetadata from a protobuf Struct
func (*NodeMetadata) IsEmpty ¶
func (nm *NodeMetadata) IsEmpty() bool
IsEmpty returns true if all fields are empty.
func (*NodeMetadata) Merge ¶
func (nm *NodeMetadata) Merge(other *NodeMetadata)
Merge merges another NodeMetadata into this one. Non-empty fields from other will overwrite fields in nm.
func (*NodeMetadata) String ¶
func (nm *NodeMetadata) String() string
String returns a string representation of the NodeMetadata.
func (*NodeMetadata) ToMap ¶
func (nm *NodeMetadata) ToMap() (map[string]interface{}, error)
ToMap converts NodeMetadata to a map[string]interface{} for serialization
type ResourceVersionTable ¶
type ResourceVersionTable struct {
XdsResources
}
ResourceVersionTable holds all the translated xds resources
func (*ResourceVersionTable) AddOrReplaceXdsResource ¶
func (t *ResourceVersionTable) AddOrReplaceXdsResource(rType resourcev3.Type, resource types.Resource, matchFunc func(existing types.Resource, new types.Resource) bool) error
AddOrReplaceXdsResource will update an existing resource of rType according to matchFunc or add as a new resource if none satisfy the match criteria. It will only update the first match it finds, regardless if multiple resources satisfy the match criteria.
func (*ResourceVersionTable) AddXdsResource ¶
func (t *ResourceVersionTable) AddXdsResource(rType resourcev3.Type, xdsResource types.Resource) error
func (*ResourceVersionTable) DeepCopy ¶
func (t *ResourceVersionTable) DeepCopy() *ResourceVersionTable
DeepCopy generates a deep copy of the ResourceVersionTable object. This was generated by controller-gen and moved over from zz_generated.deepcopy.go to this file.
func (*ResourceVersionTable) DeepCopyInto ¶
func (t *ResourceVersionTable) DeepCopyInto(out *ResourceVersionTable)
DeepCopyInto copies the contents into the output object This was generated by controller-gen, moved from zz_generated.deepcopy.go and updated to use proto.Clone to deep copy the proto.Message
func (*ResourceVersionTable) GetXdsResources ¶
func (t *ResourceVersionTable) GetXdsResources() XdsResources
GetXdsResources retrieves the translated xds resources saved in the translator context.
func (*ResourceVersionTable) SetResources ¶
func (t *ResourceVersionTable) SetResources(rType resourcev3.Type, xdsResources []types.Resource)
SetResources will update an entire entry of the XdsResources for a certain type to the provided resources
type XdsResources ¶
type XdsResources = map[resourcev3.Type][]types.Resource
XdsResources represents all the xds resources