Documentation
¶
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
- func (m *EndpointSubset) XXX_DiscardUnknown()
- func (m *EndpointSubset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *EndpointSubset) XXX_Merge(src proto.Message)
- func (m *EndpointSubset) XXX_Size() int
- func (m *EndpointSubset) XXX_Unmarshal(b []byte) error
- 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
- func (m *EndpointSubset_EndpointAddress) XXX_DiscardUnknown()
- func (m *EndpointSubset_EndpointAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *EndpointSubset_EndpointAddress) XXX_Merge(src proto.Message)
- func (m *EndpointSubset_EndpointAddress) XXX_Size() int
- func (m *EndpointSubset_EndpointAddress) XXX_Unmarshal(b []byte) error
- 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
- func (m *EndpointSubset_EndpointPort) XXX_DiscardUnknown()
- func (m *EndpointSubset_EndpointPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *EndpointSubset_EndpointPort) XXX_Merge(src proto.Message)
- func (m *EndpointSubset_EndpointPort) XXX_Size() int
- func (m *EndpointSubset_EndpointPort) XXX_Unmarshal(b []byte) error
- type Endpoints
- func (*Endpoints) Descriptor() ([]byte, []int)
- func (m *Endpoints) GetEndpointSubsets() []*EndpointSubset
- func (m *Endpoints) GetName() string
- func (m *Endpoints) GetNamespace() string
- func (*Endpoints) ProtoMessage()
- func (m *Endpoints) Reset()
- func (m *Endpoints) String() string
- func (m *Endpoints) XXX_DiscardUnknown()
- func (m *Endpoints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Endpoints) XXX_Merge(src proto.Message)
- func (m *Endpoints) XXX_Size() int
- func (m *Endpoints) XXX_Unmarshal(b []byte) error
- 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
- func (m *ObjectReference) XXX_DiscardUnknown()
- func (m *ObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ObjectReference) XXX_Merge(src proto.Message)
- func (m *ObjectReference) XXX_Size() int
- func (m *ObjectReference) XXX_Unmarshal(b []byte) error
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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
func (*EndpointSubset) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *EndpointSubset) XXX_DiscardUnknown()
func (*EndpointSubset) XXX_Marshal ¶ added in v1.4.0
func (m *EndpointSubset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EndpointSubset) XXX_Merge ¶ added in v1.4.0
func (dst *EndpointSubset) XXX_Merge(src proto.Message)
func (*EndpointSubset) XXX_Size ¶ added in v1.4.0
func (m *EndpointSubset) XXX_Size() int
func (*EndpointSubset) XXX_Unmarshal ¶ added in v1.4.0
func (m *EndpointSubset) XXX_Unmarshal(b []byte) error
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,proto3" json:"ip,omitempty"`
// The Hostname of this endpoint
// +optional
HostName string `protobuf:"bytes,2,opt,name=host_name,json=hostName,proto3" 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,proto3" 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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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
func (*EndpointSubset_EndpointAddress) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *EndpointSubset_EndpointAddress) XXX_DiscardUnknown()
func (*EndpointSubset_EndpointAddress) XXX_Marshal ¶ added in v1.4.0
func (m *EndpointSubset_EndpointAddress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EndpointSubset_EndpointAddress) XXX_Merge ¶ added in v1.4.0
func (dst *EndpointSubset_EndpointAddress) XXX_Merge(src proto.Message)
func (*EndpointSubset_EndpointAddress) XXX_Size ¶ added in v1.4.0
func (m *EndpointSubset_EndpointAddress) XXX_Size() int
func (*EndpointSubset_EndpointAddress) XXX_Unmarshal ¶ added in v1.4.0
func (m *EndpointSubset_EndpointAddress) XXX_Unmarshal(b []byte) error
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,proto3" json:"name,omitempty"`
// The port number of the endpoint.
Port int32 `protobuf:"varint,2,opt,name=port,proto3" 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,proto3" json:"protocol,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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
func (*EndpointSubset_EndpointPort) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *EndpointSubset_EndpointPort) XXX_DiscardUnknown()
func (*EndpointSubset_EndpointPort) XXX_Marshal ¶ added in v1.4.0
func (m *EndpointSubset_EndpointPort) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EndpointSubset_EndpointPort) XXX_Merge ¶ added in v1.4.0
func (dst *EndpointSubset_EndpointPort) XXX_Merge(src proto.Message)
func (*EndpointSubset_EndpointPort) XXX_Size ¶ added in v1.4.0
func (m *EndpointSubset_EndpointPort) XXX_Size() int
func (*EndpointSubset_EndpointPort) XXX_Unmarshal ¶ added in v1.4.0
func (m *EndpointSubset_EndpointPort) XXX_Unmarshal(b []byte) error
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,proto3" 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,proto3" 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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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()
func (*Endpoints) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *Endpoints) XXX_DiscardUnknown()
func (*Endpoints) XXX_Marshal ¶ added in v1.4.0
func (*Endpoints) XXX_Unmarshal ¶ added in v1.4.0
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,proto3" 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,proto3" 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,proto3" 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,proto3" json:"uid,omitempty"`
// API version of the referent.
// +optional
ApiVersion string `protobuf:"bytes,5,opt,name=api_version,json=apiVersion,proto3" 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,proto3" json:"resource_version,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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
func (*ObjectReference) XXX_DiscardUnknown ¶ added in v1.4.0
func (m *ObjectReference) XXX_DiscardUnknown()
func (*ObjectReference) XXX_Marshal ¶ added in v1.4.0
func (m *ObjectReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ObjectReference) XXX_Merge ¶ added in v1.4.0
func (dst *ObjectReference) XXX_Merge(src proto.Message)
func (*ObjectReference) XXX_Size ¶ added in v1.4.0
func (m *ObjectReference) XXX_Size() int
func (*ObjectReference) XXX_Unmarshal ¶ added in v1.4.0
func (m *ObjectReference) XXX_Unmarshal(b []byte) error