common

package
v0.0.0-...-36f1a77 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2016 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TriremeWithPKI

func TriremeWithPKI(keyFile, certFile, caCertFile string, networks []string) (trireme.Trireme, monitor.Monitor)

TriremeWithPKI is a helper method to created a PKI implementation of Trireme

func TriremeWithPSK

func TriremeWithPSK(networks []string) (trireme.Trireme, monitor.Monitor)

TriremeWithPSK is a helper method to created a PSK implementation of Trireme

Types

type CustomPolicyResolver

type CustomPolicyResolver struct {
	// contains filtered or unexported fields
}

CustomPolicyResolver holds the configuration of the policy engine

func NewCustomPolicyResolver

func NewCustomPolicyResolver() *CustomPolicyResolver

NewCustomPolicyResolver creates a new policy engine for the Trireme package

func (*CustomPolicyResolver) HandleDeletePU

func (p *CustomPolicyResolver) HandleDeletePU(context string) error

HandleDeletePU implements the corresponding interface. We have no state in this example

func (*CustomPolicyResolver) HandleDestroyPU

func (p *CustomPolicyResolver) HandleDestroyPU(context string) error

HandleDestroyPU implements the corresponding interface. We have no state in this example

func (*CustomPolicyResolver) ResolvePolicy

func (p *CustomPolicyResolver) ResolvePolicy(context string, runtimeInfo policy.RuntimeReader) (*policy.PUPolicy, error)

ResolvePolicy implements the Trireme interface. Here we just create a simple policy that accepts packets with the same labels as the target container.

func (*CustomPolicyResolver) SetPolicyUpdater

func (p *CustomPolicyResolver) SetPolicyUpdater(pu trireme.PolicyUpdater) error

SetPolicyUpdater is used in order to register a pointer to the policyUpdater

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL