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 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)
Click to show internal directories.
Click to hide internal directories.