Documentation ¶
Overview ¶
Package endpoints is a generated protocol buffer package.
Package endpoints defines data model for Kubernetes service endpoints.
It is generated from these files:
endpoints.proto
It has these top-level messages:
ObjectReference EndpointSubset Endpoints
Index ¶
- Constants
- func Key(name string, namespace string) string
- func KeyPrefix() string
- func ParseEndpointsFromKey(key string) (endpoints string, namespace string, err error)
- type EndpointSubset
- func (*EndpointSubset) Descriptor() ([]byte, []int)
- func (m *EndpointSubset) GetAddresses() []*EndpointSubset_EndpointAddress
- func (m *EndpointSubset) GetNotReadyAddresses() []*EndpointSubset_EndpointAddress
- func (m *EndpointSubset) GetPorts() []*EndpointSubset_EndpointPort
- func (*EndpointSubset) ProtoMessage()
- func (m *EndpointSubset) Reset()
- func (m *EndpointSubset) String() string
- type EndpointSubset_EndpointAddress
- func (*EndpointSubset_EndpointAddress) Descriptor() ([]byte, []int)
- func (m *EndpointSubset_EndpointAddress) GetHostName() string
- func (m *EndpointSubset_EndpointAddress) GetIp() string
- func (m *EndpointSubset_EndpointAddress) GetNodeName() string
- func (m *EndpointSubset_EndpointAddress) GetTargetRef() *ObjectReference
- func (*EndpointSubset_EndpointAddress) ProtoMessage()
- func (m *EndpointSubset_EndpointAddress) Reset()
- func (m *EndpointSubset_EndpointAddress) String() string
- type EndpointSubset_EndpointPort
- func (*EndpointSubset_EndpointPort) Descriptor() ([]byte, []int)
- func (m *EndpointSubset_EndpointPort) GetName() string
- func (m *EndpointSubset_EndpointPort) GetPort() int32
- func (m *EndpointSubset_EndpointPort) GetProtocol() string
- func (*EndpointSubset_EndpointPort) ProtoMessage()
- func (m *EndpointSubset_EndpointPort) Reset()
- func (m *EndpointSubset_EndpointPort) String() string
- type Endpoints
- type ID
- type ObjectReference
- func (*ObjectReference) Descriptor() ([]byte, []int)
- func (m *ObjectReference) GetApiVersion() string
- func (m *ObjectReference) GetKind() string
- func (m *ObjectReference) GetName() string
- func (m *ObjectReference) GetNamespace() string
- func (m *ObjectReference) GetResourceVersion() string
- func (m *ObjectReference) GetUid() string
- func (*ObjectReference) ProtoMessage()
- func (m *ObjectReference) Reset()
- func (m *ObjectReference) String() string
Constants ¶
const (
// EndpointsKeyword defines the keyword identifying Endpoints data.
EndpointsKeyword = "endpoints"
)
Variables ¶
This section is empty.
Functions ¶
func Key ¶
Key returns the key under which the endpoints belonging to given K8s service are stored in the data-store.
Types ¶
type EndpointSubset ¶
type EndpointSubset struct { // IP addresses which offer the related ports that are marked as // ready. These endpoints should be considered safe for load balancers // and clients to utilize. // +optional Addresses []*EndpointSubset_EndpointAddress `protobuf:"bytes,1,rep,name=addresses" json:"addresses,omitempty"` // IP addresses which offer the related ports but are not currently // marked as ready because they have not yet finished starting, have // recently failed a readiness check, or have recently failed a // liveness check. // +optional NotReadyAddresses []*EndpointSubset_EndpointAddress `protobuf:"bytes,2,rep,name=not_ready_addresses,json=notReadyAddresses" json:"not_ready_addresses,omitempty"` // Port numbers available on the related IP addresses. // +optional Ports []*EndpointSubset_EndpointPort `protobuf:"bytes,3,rep,name=ports" json:"ports,omitempty"` }
EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:
{ Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] }
The resulting set of endpoints can be viewed as:
a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], b: [ 10.10.1.1:309, 10.10.2.2:309 ]
func (*EndpointSubset) Descriptor ¶
func (*EndpointSubset) Descriptor() ([]byte, []int)
func (*EndpointSubset) GetAddresses ¶
func (m *EndpointSubset) GetAddresses() []*EndpointSubset_EndpointAddress
func (*EndpointSubset) GetNotReadyAddresses ¶
func (m *EndpointSubset) GetNotReadyAddresses() []*EndpointSubset_EndpointAddress
func (*EndpointSubset) GetPorts ¶
func (m *EndpointSubset) GetPorts() []*EndpointSubset_EndpointPort
func (*EndpointSubset) ProtoMessage ¶
func (*EndpointSubset) ProtoMessage()
func (*EndpointSubset) Reset ¶
func (m *EndpointSubset) Reset()
func (*EndpointSubset) String ¶
func (m *EndpointSubset) String() string
type EndpointSubset_EndpointAddress ¶
type EndpointSubset_EndpointAddress struct { // The IP of this endpoint. // May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), // or link-local multicast ((224.0.0.0/24). // IPv6 is also accepted but not fully supported on all platforms. // Also, certain kubernetes components, like kube-proxy, are not // IPv6 ready. Ip string `protobuf:"bytes,1,opt,name=ip" json:"ip,omitempty"` // The Hostname of this endpoint // +optional HostName string `protobuf:"bytes,2,opt,name=host_name,json=hostName" json:"host_name,omitempty"` // Optional: Node hosting this endpoint. This can be used to // determine endpoints local to a node. // +optional NodeName string `protobuf:"bytes,3,opt,name=node_name,json=nodeName" json:"node_name,omitempty"` // Reference to object providing the endpoint. TargetRef *ObjectReference `protobuf:"bytes,4,opt,name=target_ref,json=targetRef" json:"target_ref,omitempty"` }
EndpointAddress is a tuple that describes single IP address.
func (*EndpointSubset_EndpointAddress) Descriptor ¶
func (*EndpointSubset_EndpointAddress) Descriptor() ([]byte, []int)
func (*EndpointSubset_EndpointAddress) GetHostName ¶
func (m *EndpointSubset_EndpointAddress) GetHostName() string
func (*EndpointSubset_EndpointAddress) GetIp ¶
func (m *EndpointSubset_EndpointAddress) GetIp() string
func (*EndpointSubset_EndpointAddress) GetNodeName ¶
func (m *EndpointSubset_EndpointAddress) GetNodeName() string
func (*EndpointSubset_EndpointAddress) GetTargetRef ¶
func (m *EndpointSubset_EndpointAddress) GetTargetRef() *ObjectReference
func (*EndpointSubset_EndpointAddress) ProtoMessage ¶
func (*EndpointSubset_EndpointAddress) ProtoMessage()
func (*EndpointSubset_EndpointAddress) Reset ¶
func (m *EndpointSubset_EndpointAddress) Reset()
func (*EndpointSubset_EndpointAddress) String ¶
func (m *EndpointSubset_EndpointAddress) String() string
type EndpointSubset_EndpointPort ¶
type EndpointSubset_EndpointPort struct { // The name of this port (corresponds to ServicePort.Name). // Must be a DNS_LABEL. // Optional only if one port is defined. // +optional Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // The port number of the endpoint. Port int32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"` // The IP protocol for this port. // Must be UDP or TCP. // Default is TCP. // +optional Protocol string `protobuf:"bytes,3,opt,name=protocol" json:"protocol,omitempty"` }
EndpointPort is a tuple that describes a single port.
func (*EndpointSubset_EndpointPort) Descriptor ¶
func (*EndpointSubset_EndpointPort) Descriptor() ([]byte, []int)
func (*EndpointSubset_EndpointPort) GetName ¶
func (m *EndpointSubset_EndpointPort) GetName() string
func (*EndpointSubset_EndpointPort) GetPort ¶
func (m *EndpointSubset_EndpointPort) GetPort() int32
func (*EndpointSubset_EndpointPort) GetProtocol ¶
func (m *EndpointSubset_EndpointPort) GetProtocol() string
func (*EndpointSubset_EndpointPort) ProtoMessage ¶
func (*EndpointSubset_EndpointPort) ProtoMessage()
func (*EndpointSubset_EndpointPort) Reset ¶
func (m *EndpointSubset_EndpointPort) Reset()
func (*EndpointSubset_EndpointPort) String ¶
func (m *EndpointSubset_EndpointPort) String() string
type Endpoints ¶
type Endpoints struct { // Name of the service unique within the namespace for which these // Endpoint Subsets apply to. // Cannot be updated. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Namespace for service for which these endpoint subsets apply to. // An empty namespace is equivalent to the "default" namespace, but // "default" is the canonical representation used in the key for a // key-value store. // Cannot be updated. Namespace string `protobuf:"bytes,2,opt,name=namespace" json:"namespace,omitempty"` // The set of all endpoints is the union of all subsets. Addresses are // placed into subsets according to the IPs they share. A single address // with multiple ports, some of which are ready and some of which are not // (because they come from different containers) will result in the address // being displayed in different subsets for the different ports. No address // will appear in both Addresses and NotReadyAddresses in the same subset. // Sets of addresses and ports that comprise a service. EndpointSubsets []*EndpointSubset `protobuf:"bytes,3,rep,name=endpoint_subsets,json=endpointSubsets" json:"endpoint_subsets,omitempty"` }
Endpoints is a collection of endpoints that implement the actual service. Example:
Name: "mysvc", Subsets: [ { Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] }, { Addresses: [{"ip": "10.10.3.3"}], Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] }, ]
func (*Endpoints) Descriptor ¶
func (*Endpoints) GetEndpointSubsets ¶
func (m *Endpoints) GetEndpointSubsets() []*EndpointSubset
func (*Endpoints) GetNamespace ¶
func (*Endpoints) ProtoMessage ¶
func (*Endpoints) ProtoMessage()
type ObjectReference ¶
type ObjectReference struct { // Kind of the referent. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds // +optional Kind string `protobuf:"bytes,1,opt,name=kind" json:"kind,omitempty"` // Namespace of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ // +optional Namespace string `protobuf:"bytes,2,opt,name=namespace" json:"namespace,omitempty"` // Name of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names // +optional Name string `protobuf:"bytes,3,opt,name=name" json:"name,omitempty"` // UID of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids // +optional Uid string `protobuf:"bytes,4,opt,name=uid" json:"uid,omitempty"` // API version of the referent. // +optional ApiVersion string `protobuf:"bytes,5,opt,name=api_version,json=apiVersion" json:"api_version,omitempty"` // Specific resourceVersion to which this reference is made, if any. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency // +optional ResourceVersion string `protobuf:"bytes,6,opt,name=resource_version,json=resourceVersion" json:"resource_version,omitempty"` }
ObjectReference contains enough information to let you inspect or modify the referred object. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ObjectReference) Descriptor ¶
func (*ObjectReference) Descriptor() ([]byte, []int)
func (*ObjectReference) GetApiVersion ¶
func (m *ObjectReference) GetApiVersion() string
func (*ObjectReference) GetKind ¶
func (m *ObjectReference) GetKind() string
func (*ObjectReference) GetName ¶
func (m *ObjectReference) GetName() string
func (*ObjectReference) GetNamespace ¶
func (m *ObjectReference) GetNamespace() string
func (*ObjectReference) GetResourceVersion ¶
func (m *ObjectReference) GetResourceVersion() string
func (*ObjectReference) GetUid ¶
func (m *ObjectReference) GetUid() string
func (*ObjectReference) ProtoMessage ¶
func (*ObjectReference) ProtoMessage()
func (*ObjectReference) Reset ¶
func (m *ObjectReference) Reset()
func (*ObjectReference) String ¶
func (m *ObjectReference) String() string