event

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DnsResolver

type DnsResolver interface {
	LookupAddr(context context.Context, ip string) (names []string, err error)
}

DnsResolver allows for mocking out the functionality of net.DefaultResolver when testing getPacketDropMessage()

type Locator

type Locator interface {
	Run(stopCh <-chan struct{})
	LocatePod(ip string) (*v1.Pod, error)
}

type NodeGetter

type NodeGetter interface {
	Get(name string, options metav1.GetOptions) (*v1.Node, error)
}

type PodLocator

type PodLocator struct {
	// contains filtered or unexported fields
}

PodLocator handles the process of locating corresponding Pods having iptables packet drops in Kubernetes cluster.

func NewApiServerPodLocator

func NewApiServerPodLocator(client *kubernetes.Clientset) (*PodLocator, error)

* Returns a locator that pulls pod data from the apiserver

func (*PodLocator) LocatePod

func (locator *PodLocator) LocatePod(ip string) (*v1.Pod, error)

func (*PodLocator) Run

func (locator *PodLocator) Run(stopCh <-chan struct{})

type Poster

type Poster struct {
	// contains filtered or unexported fields
}

Poster handles submitting Kubernetes Events to Pods running in the cluster.

func InitPoster

func InitPoster() (*Poster, error)

Init Poster and return its pointer

func (*Poster) Run

func (poster *Poster) Run(stopCh <-chan struct{}, packetDropCh <-chan drop.PacketDrop)

Run the poster by handling PacketDrop from given channel. Apply exponential backoff if server is down.

type TrafficDirection

type TrafficDirection int

func (TrafficDirection) String

func (td TrafficDirection) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL