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) CleanUp() error
- func (s *ProxyInfo) EnableIPTablesPacketTracing(ctx context.Context, contextID string, interval time.Duration) error
- func (s *ProxyInfo) InitRemoteSupervisor(contextID string, puInfo *policy.PUInfo) error
- func (s *ProxyInfo) Run(ctx context.Context) error
- func (s *ProxyInfo) SetTargetNetworks(networks []string) 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 ¶
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.Enforcer, rpchdl rpcwrapper.RPCClient) (*ProxyInfo, error)
NewProxySupervisor creates a new IptablesSupervisor launcher
func (*ProxyInfo) AddExcludedIPs ¶
AddExcludedIPs call addexcluded ip on the remote supervisor
func (*ProxyInfo) EnableIPTablesPacketTracing ¶
func (s *ProxyInfo) EnableIPTablesPacketTracing(ctx context.Context, contextID string, interval time.Duration) error
EnableIPTablesPacketTracing enable iptables tracing
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) Unsupervise ¶
Unsupervise exported stops enforcing policy for the given IP.
type TestSupervisorLauncher ¶
type TestSupervisorLauncher interface { supervisor.Supervisor }
TestSupervisorLauncher is a mock