Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Supervisor ¶
type Supervisor interface { // Supervise adds a new supervised processing unit. Supervise(contextID string, puInfo *policy.PUInfo) error // Unsupervise unsupervises the given PU Unsupervise(contextID string) error // Start starts the Supervisor. Start() error // Stop stops the Supervisor. Stop() error }
A Supervisor is implementing the node control plane that captures the packets.
func NewIPTablesSupervisor ¶
func NewIPTablesSupervisor(collector collector.EventCollector, enforcer enforcer.PolicyEnforcer, targetNetworks []string) (Supervisor, error)
NewIPTablesSupervisor will create a new connection supervisor that uses IPTables to redirect specific packets to userspace. It instantiates multiple data stores to maintain efficient mappings between contextID, policy and IP addresses. This simplifies the lookup operations at the expense of memory.
type TestSupervisor ¶
type TestSupervisor interface { Supervisor MockSupervise(t *testing.T, impl func(contextID string, puInfo *policy.PUInfo) error) MockUnsupervise(t *testing.T, impl func(contextID string) error) MockStart(t *testing.T, impl func() error) MockStop(t *testing.T, impl func() error) }
TestSupervisor us
func NewTestSupervisor ¶
func NewTestSupervisor() TestSupervisor
NewTestSupervisor returns a new TestManipulator.
Click to show internal directories.
Click to hide internal directories.