Package supervisorproxy package implements the supervisor interface and forwards the requests on this interface to a remote supervisor over an rpc call.



This section is empty.


This section is empty.


func NewTestSupervisorLauncher

func NewTestSupervisorLauncher() supervisor.Supervisor

NewTestSupervisorLauncher creates a mock supervisor


type ProxyInfo

type ProxyInfo struct {
	ExcludedIPs []string

	// contains filtered or unexported fields

ProxyInfo is a struct used to store state for the remote launcher. it mirrors what is stored by the supervisor and also information to talk with the remote enforcer

func NewProxySupervisor

func NewProxySupervisor(collector collector.EventCollector, enforcer enforcer.PolicyEnforcer, rpchdl rpcwrapper.RPCClient) (*ProxyInfo, error)

NewProxySupervisor creates a new IptablesSupervisor launcher

func (*ProxyInfo) AddExcludedIPs

func (s *ProxyInfo) AddExcludedIPs(ips []string) error

AddExcludedIPs call addexcluded ip on the remote supervisor

func (*ProxyInfo) InitRemoteSupervisor

func (s *ProxyInfo) InitRemoteSupervisor(contextID string, puInfo *policy.PUInfo) error

InitRemoteSupervisor calls initsupervisor method on the remote

func (*ProxyInfo) SetTargetNetworks

func (s *ProxyInfo) SetTargetNetworks(networks []string) error

SetTargetNetworks sets the target networks in case of an update

func (*ProxyInfo) Start

func (s *ProxyInfo) Start() error

Start This method does nothing and is implemented for completeness THe work done is done in the InitRemoteSupervisor method in the remote enforcer

func (*ProxyInfo) Stop

func (s *ProxyInfo) Stop() error

Stop This method does nothing

func (*ProxyInfo) Supervise

func (s *ProxyInfo) Supervise(contextID string, puInfo *policy.PUInfo) error

Supervise Calls Supervise on the remote supervisor

func (*ProxyInfo) Unsupervise

func (s *ProxyInfo) Unsupervise(contextID string) error

Unsupervise exported stops enforcing policy for the given IP.

type TestSupervisorLauncher

type TestSupervisorLauncher interface {

TestSupervisorLauncher is a mock