Documentation ¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Copyright (c) Microsoft Corporation. Licensed under the MIT license.
Index ¶
- Constants
- type APIServerObject
- type BaseObject
- type DirtyCache
- type IPAddresses
- func (i *IPAddresses) AddIPv4(ip net.IP)
- func (i *IPAddresses) AddIPv6(ip net.IP)
- func (i *IPAddresses) DeepCopy() *IPAddresses
- func (i *IPAddresses) GetIPs() []net.IP
- func (i *IPAddresses) GetIPv4s() []net.IP
- func (i *IPAddresses) GetIPv6s() []net.IP
- func (i *IPAddresses) PrimaryIP() string
- func (i *IPAddresses) PrimaryNetIP() net.IP
- type OwnerReference
- type PublishObj
- type RetinaContainer
- type RetinaEndpoint
- func (ep *RetinaEndpoint) Annotations() map[string]string
- func (ep *RetinaEndpoint) Containers() []*RetinaContainer
- func (ep *RetinaEndpoint) DeepCopy() interface{}
- func (ep *RetinaEndpoint) FormattedLabels() []string
- func (ep *RetinaEndpoint) IPs() *IPAddresses
- func (ep *RetinaEndpoint) Labels() map[string]string
- func (ep *RetinaEndpoint) OwnerRefs() []*OwnerReference
- func (e *RetinaEndpoint) PrimaryIP() (string, error)
- func (e *RetinaEndpoint) PrimaryNetIP() (net.IP, error)
- func (ep *RetinaEndpoint) SetAnnotations(annotations map[string]string)
- func (ep *RetinaEndpoint) SetContainers(containers []*RetinaContainer)
- func (ep *RetinaEndpoint) SetIPs(ips *IPAddresses)
- func (ep *RetinaEndpoint) SetLabels(labels map[string]string)
- func (ep *RetinaEndpoint) SetOwnerRefs(ownerRefs []*OwnerReference)
- type RetinaNode
- type RetinaSvc
- func (s *RetinaSvc) DeepCopy() interface{}
- func (s *RetinaSvc) GetPrimaryIP() (string, error)
- func (s *RetinaSvc) IPs() *IPAddresses
- func (s *RetinaSvc) LBIP() net.IP
- func (s *RetinaSvc) Selector() map[string]string
- func (s *RetinaSvc) SetIPs(ips *IPAddresses)
- func (s *RetinaSvc) SetLBIP(lbIP net.IP)
- func (s *RetinaSvc) SetSelector(selector map[string]string)
Constants ¶
const ( // PubSubPods topic PubSubPods pubsub.PubSubTopic = "pods" // PubSubEndpoints topic PubSubEndpoints pubsub.PubSubTopic = "endpoints" // PubSubSvc topic PubSubSvc pubsub.PubSubTopic = "svc" // PubSubNode topic PubSubNode pubsub.PubSubTopic = "node" // PubSubVeth topic PubSubVeth pubsub.PubSubTopic = "veth" // PubSubNamespace topic PubSubNamespace pubsub.PubSubTopic = "namespace" // PubSubFilterRule topic PubSubFilterRule pubsub.PubSubTopic = "filterrule" // PubSubAPIServer topic PubSubAPIServer pubsub.PubSubTopic = "apiserver" )
const ( APIServerEndpointName = "kubernetes-apiserver" // default value for annotations RetinaPodAnnotation = "retina.sh" RetinaPodAnnotationValue = "observe" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIServerObject ¶
type APIServerObject struct {
EP *RetinaEndpoint
}
func NewAPIServerObject ¶
func NewAPIServerObject(stringIPs []string) *APIServerObject
func (*APIServerObject) DeepCopy ¶
func (a *APIServerObject) DeepCopy() interface{}
func (*APIServerObject) IPs ¶
func (a *APIServerObject) IPs() []net.IP
type BaseObject ¶
BaseObject is a common struct that is embedded in all objects that are published.
func GetBaseObject ¶
func GetBaseObject(name, namespace string, ips *IPAddresses) BaseObject
func (*BaseObject) DeepCopy ¶
func (b *BaseObject) DeepCopy() BaseObject
func (*BaseObject) IPs ¶
func (b *BaseObject) IPs() *IPAddresses
func (*BaseObject) Key ¶
func (b *BaseObject) Key() string
func (*BaseObject) Name ¶
func (b *BaseObject) Name() string
func (*BaseObject) Namespace ¶
func (b *BaseObject) Namespace() string
func (*BaseObject) NamespacedName ¶
func (b *BaseObject) NamespacedName() string
type DirtyCache ¶
func NewDirtyCache ¶
func NewDirtyCache() *DirtyCache
func (*DirtyCache) ClearAdd ¶
func (d *DirtyCache) ClearAdd()
func (*DirtyCache) ClearDelete ¶
func (d *DirtyCache) ClearDelete()
func (*DirtyCache) GetAddList ¶
func (d *DirtyCache) GetAddList() []interface{}
func (*DirtyCache) GetDeleteList ¶
func (d *DirtyCache) GetDeleteList() []interface{}
func (*DirtyCache) ToAdd ¶
func (d *DirtyCache) ToAdd(key string, obj interface{})
func (*DirtyCache) ToDelete ¶
func (d *DirtyCache) ToDelete(key string, obj interface{})
type IPAddresses ¶
IPAddresses represents a set of IP addresses.
func NewIPAddress ¶
func NewIPAddress(ipv4, ipv6 net.IP) *IPAddresses
func (*IPAddresses) AddIPv4 ¶
func (i *IPAddresses) AddIPv4(ip net.IP)
func (*IPAddresses) AddIPv6 ¶
func (i *IPAddresses) AddIPv6(ip net.IP)
func (*IPAddresses) DeepCopy ¶
func (i *IPAddresses) DeepCopy() *IPAddresses
func (*IPAddresses) GetIPs ¶
func (i *IPAddresses) GetIPs() []net.IP
func (*IPAddresses) GetIPv4s ¶
func (i *IPAddresses) GetIPv4s() []net.IP
func (*IPAddresses) GetIPv6s ¶
func (i *IPAddresses) GetIPv6s() []net.IP
func (*IPAddresses) PrimaryIP ¶
func (i *IPAddresses) PrimaryIP() string
func (*IPAddresses) PrimaryNetIP ¶
func (i *IPAddresses) PrimaryNetIP() net.IP
type OwnerReference ¶
OwnerReference contains enough information to let you identify an owning object. Reference: https://github.com/kubernetes/apimachinery/blob/v0.26.4/pkg/apis/meta/v1/types.go#L291
func (*OwnerReference) DeepCopy ¶
func (o *OwnerReference) DeepCopy() *OwnerReference
type PublishObj ¶
type PublishObj interface {
DeepCopy() interface{}
}
PublishObj is an interface that all objects that are published
type RetinaContainer ¶
RetinaContainer represents a container in a Kubernetes endpoint.
func (*RetinaContainer) DeepCopy ¶
func (c *RetinaContainer) DeepCopy() *RetinaContainer
type RetinaEndpoint ¶
type RetinaEndpoint struct { BaseObject // contains filtered or unexported fields }
RetinaEndpoint represents a Kubernetes endpoint.
func NewRetinaEndpoint ¶
func NewRetinaEndpoint(name, namespace string, ips *IPAddresses) *RetinaEndpoint
func RetinaEndpointCommonFromAPI ¶
func RetinaEndpointCommonFromAPI(retinaEndpoint *retinav1alpha1.RetinaEndpoint) *RetinaEndpoint
func RetinaEndpointCommonFromPod ¶
func RetinaEndpointCommonFromPod(pod *corev1.Pod) *RetinaEndpoint
func (*RetinaEndpoint) Annotations ¶
func (ep *RetinaEndpoint) Annotations() map[string]string
func (*RetinaEndpoint) Containers ¶
func (ep *RetinaEndpoint) Containers() []*RetinaContainer
func (*RetinaEndpoint) DeepCopy ¶
func (ep *RetinaEndpoint) DeepCopy() interface{}
func (*RetinaEndpoint) FormattedLabels ¶
func (ep *RetinaEndpoint) FormattedLabels() []string
func (*RetinaEndpoint) IPs ¶
func (ep *RetinaEndpoint) IPs() *IPAddresses
func (*RetinaEndpoint) Labels ¶
func (ep *RetinaEndpoint) Labels() map[string]string
func (*RetinaEndpoint) OwnerRefs ¶
func (ep *RetinaEndpoint) OwnerRefs() []*OwnerReference
func (*RetinaEndpoint) PrimaryIP ¶
func (e *RetinaEndpoint) PrimaryIP() (string, error)
func (*RetinaEndpoint) PrimaryNetIP ¶
func (e *RetinaEndpoint) PrimaryNetIP() (net.IP, error)
func (*RetinaEndpoint) SetAnnotations ¶
func (ep *RetinaEndpoint) SetAnnotations(annotations map[string]string)
func (*RetinaEndpoint) SetContainers ¶
func (ep *RetinaEndpoint) SetContainers(containers []*RetinaContainer)
func (*RetinaEndpoint) SetIPs ¶
func (ep *RetinaEndpoint) SetIPs(ips *IPAddresses)
func (*RetinaEndpoint) SetLabels ¶
func (ep *RetinaEndpoint) SetLabels(labels map[string]string)
func (*RetinaEndpoint) SetOwnerRefs ¶
func (ep *RetinaEndpoint) SetOwnerRefs(ownerRefs []*OwnerReference)
type RetinaNode ¶
type RetinaNode struct {
// contains filtered or unexported fields
}
RetinaNode represents a Kubernetes node.
func NewRetinaNode ¶
func NewRetinaNode(name string, ip net.IP) *RetinaNode
func (*RetinaNode) DeepCopy ¶
func (n *RetinaNode) DeepCopy() interface{}
func (*RetinaNode) IPString ¶
func (n *RetinaNode) IPString() string
func (*RetinaNode) Name ¶
func (n *RetinaNode) Name() string
type RetinaSvc ¶
type RetinaSvc struct { BaseObject // contains filtered or unexported fields }
RetinaSvc represents a Kubernetes service. ClusterIPs are saved as IPs in base object.
func NewRetinaSvc ¶
func (*RetinaSvc) GetPrimaryIP ¶
func (*RetinaSvc) IPs ¶
func (s *RetinaSvc) IPs() *IPAddresses
func (*RetinaSvc) SetIPs ¶
func (s *RetinaSvc) SetIPs(ips *IPAddresses)