polctrl

package
v0.0.0-...-330f3ae Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRetryCount      = 5
	ShortRetryInterval = 100
	LongRetryInterval  = 500
	NodeNameEnv        = "NODE_NAME"
)

Variables

View Source
var (
	ControllerNode = os.Getenv(NodeNameEnv)
)

Functions

func AddNetPol

func AddNetPol(netpol interface{})

TODO: implement event handlers

func DeleteNetPol

func DeleteNetPol(netpol interface{})

func UpdateNetPol

func UpdateNetPol(oldNetpol, newNetpol interface{})

Types

type NetPolControl

type NetPolControl struct {
	PolicyController cache.SharedIndexInformer
	PodController    cache.SharedIndexInformer
	PolicyClient     polclientset.Interface
	DanmClient       danmclientset.Interface
	StopChan         *chan struct{}
}

func NewNetPolControl

func NewNetPolControl(cfg *rest.Config, stopChan *chan struct{}) (*NetPolControl, error)

func (*NetPolControl) AddPod

func (netpolCtrl *NetPolControl) AddPod(pod interface{})

func (*NetPolControl) Run

func (netpolController *NetPolControl) Run()

func (*NetPolControl) UpdatePod

func (netpolCtrl *NetPolControl) UpdatePod(oldPod, newPod interface{})

func (*NetPolControl) WatchErrorHandler

func (netpolController *NetPolControl) WatchErrorHandler(r *cache.Reflector, err error)

Jump to

Keyboard shortcuts

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