Documentation ¶
Index ¶
- Constants
- func CompareKafka(a, b *pb.Kafka) bool
- func FlowProtocol(flow Flow) string
- func LooseCompareHTTP(a, b *pb.HTTP) bool
- type Endpoint
- func (e *Endpoint) DeepCopy() *Endpoint
- func (e *Endpoint) EqualsByID(o *Endpoint) bool
- func (e *Endpoint) GetID() uint64
- func (e *Endpoint) GetIdentity() identity.NumericIdentity
- func (e *Endpoint) GetK8sNamespace() string
- func (e *Endpoint) GetK8sPodName() string
- func (e *Endpoint) GetLabels() []string
- type EndpointInfo
- type Endpoints
- func (es *Endpoints) DeleteEndpoint(del *Endpoint)
- func (es *Endpoints) FindEPs(epID uint64, namespace string, podName string) []Endpoint
- func (es *Endpoints) GetEndpoint(ip net.IP) (endpoint *Endpoint, ok bool)
- func (es *Endpoints) GetEndpointByContainerID(id string) (*Endpoint, bool)
- func (es *Endpoints) GetEndpointByPodName(namespace string, name string) (*Endpoint, bool)
- func (es *Endpoints) GetEndpointInfo(ip net.IP) (endpoint EndpointInfo, ok bool)
- func (es *Endpoints) SyncEndpoints(newEps []*Endpoint)
- func (es *Endpoints) UpdateEndpoint(updateEp *Endpoint)
- type EndpointsHandler
- type Event
- type Flow
Constants ¶
const ( // ObserverServiceName is the name of the observer service for the grpc health check ObserverServiceName = "hubble.server.Observer" // K8sNamespaceTag is the label tag which denotes the namespace. K8sNamespaceTag = "k8s:io.kubernetes.pod.namespace" )
Variables ¶
This section is empty.
Functions ¶
func CompareKafka ¶
CompareKafka returns true if both Kafka flows are identical
func FlowProtocol ¶
FlowProtocol returns the protocol best describing the flow. If available, this is the L7 protocol name, then the L4 protocol name.
func LooseCompareHTTP ¶
LooseCompareHTTP returns true if both HTTP flows are loosely identical. This means that the following fields must match:
- Code
- Method
- Url
- Protocol
Types ¶
type Endpoint ¶
type Endpoint struct { ContainerIDs []string `json:"container-ids"` ID uint64 `json:"id"` Identity identity.NumericIdentity `json:"identity"` IPv4 net.IP `json:"ipv4"` IPv6 net.IP `json:"ipv6"` PodName string `json:"pod-name"` PodNamespace string `json:"pod-namespace"` Labels []string `json:"labels"` }
Endpoint is the representation of an endpoint running in the Cilium agent
func (*Endpoint) EqualsByID ¶
EqualsByID compares if the receiver's endpoint has the same ID, PodName and PodNamespace.
func (*Endpoint) GetIdentity ¶
func (e *Endpoint) GetIdentity() identity.NumericIdentity
GetIdentity returns the numerical security identity of the endpoint.
func (*Endpoint) GetK8sNamespace ¶
GetK8sNamespace returns the pod namespace of the endpoint.
func (*Endpoint) GetK8sPodName ¶
GetK8sPodName returns the pod name of the endpoint.
type EndpointInfo ¶
type EndpointInfo interface { GetID() uint64 GetIdentity() identity.NumericIdentity GetK8sPodName() string GetK8sNamespace() string GetLabels() []string }
EndpointInfo defines readable fields of a Cilium endpoint.
type Endpoints ¶
type Endpoints struct {
// contains filtered or unexported fields
}
Endpoints is a slice of endpoints and their cached dns queries protected by a mutex.
func (*Endpoints) DeleteEndpoint ¶
DeleteEndpoint deletes the given endpoint if present in the endpoints slice.
func (*Endpoints) FindEPs ¶
FindEPs returns all the EPs that have the given epID or the given namespace or the given podName (running in the given namespace).
func (*Endpoints) GetEndpoint ¶
GetEndpoint returns the endpoint that has the given ip.
func (*Endpoints) GetEndpointByContainerID ¶
GetEndpointByContainerID returns the endpoint that has the given container ID.
func (*Endpoints) GetEndpointByPodName ¶
GetEndpointByPodName returns the endpoint with the given pod name.
func (*Endpoints) GetEndpointInfo ¶
func (es *Endpoints) GetEndpointInfo(ip net.IP) (endpoint EndpointInfo, ok bool)
GetEndpointInfo returns the endpoint info that has the given ip.
func (*Endpoints) SyncEndpoints ¶
SyncEndpoints adds the given list of endpoints to the internal endpoint slice.
func (*Endpoints) UpdateEndpoint ¶
UpdateEndpoint updates the given endpoint if already exists in the slice of endpoints. If the endpoint does not exists, it is appended to the slice of endpoints.
type EndpointsHandler ¶
type EndpointsHandler interface { SyncEndpoints([]*Endpoint) UpdateEndpoint(*Endpoint) FindEPs(epID uint64, ns, pod string) []Endpoint GetEndpoint(ip net.IP) (endpoint *Endpoint, ok bool) DeleteEndpoint(*Endpoint) GetEndpointByContainerID(id string) (*Endpoint, bool) GetEndpointByPodName(namespace string, name string) (*Endpoint, bool) }
EndpointsHandler defines an interface for interacting with Cilium endpoints.
type Event ¶
type Event struct { // Timestamp when event was observed in Hubble Timestamp *types.Timestamp // Event contains the actual event Event interface{} }
Event represents a single event observed and stored by Hubble
type Flow ¶
type Flow interface { proto.Message GetTime() *types.Timestamp GetVerdict() pb.Verdict GetDropReason() uint32 GetEthernet() *pb.Ethernet GetIP() *pb.IP GetL4() *pb.Layer4 GetSource() *pb.Endpoint GetDestination() *pb.Endpoint GetType() pb.FlowType GetNodeName() string GetSourceNames() []string GetDestinationNames() []string GetL7() *pb.Layer7 GetReply() bool GetEventType() *pb.CiliumEventType GetSourceService() *pb.Service GetDestinationService() *pb.Service GetSummary() string }
Flow is an interface matching pb.Flow