Documentation ¶
Overview ¶
Package supervisorproxy package implements the supervisor interface and forwards the requests on this interface to a remote supervisor over an rpc call.
Index ¶
- func NewTestSupervisorLauncher() supervisor.Supervisor
- type ProxyInfo
- func (s *ProxyInfo) AddExcludedIPs(ips []string) error
- func (s *ProxyInfo) InitRemoteSupervisor(contextID string, puInfo *policy.PUInfo) error
- func (s *ProxyInfo) SetTargetNetworks(networks []string) error
- func (s *ProxyInfo) Start() error
- func (s *ProxyInfo) Stop() error
- func (s *ProxyInfo) Supervise(contextID string, puInfo *policy.PUInfo) error
- func (s *ProxyInfo) Unsupervise(contextID string) error
- type TestSupervisorLauncher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTestSupervisorLauncher ¶
func NewTestSupervisorLauncher() supervisor.Supervisor
NewTestSupervisorLauncher creates a mock supervisor
Types ¶
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 ¶
AddExcludedIPs call addexcluded ip on the remote supervisor
func (*ProxyInfo) InitRemoteSupervisor ¶
InitRemoteSupervisor calls initsupervisor method on the remote
func (*ProxyInfo) SetTargetNetworks ¶
SetTargetNetworks sets the target networks in case of an update
func (*ProxyInfo) Start ¶
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) Unsupervise ¶
Unsupervise exported stops enforcing policy for the given IP.
type TestSupervisorLauncher ¶
type TestSupervisorLauncher interface { supervisor.Supervisor }
TestSupervisorLauncher is a mock