Back to

Package trireme

Latest Go to latest

The latest major version is .

Published: Oct 26, 2017 | License: GPL2 | Module:


Package trireme needs to be documented here for godoc.


type PolicyResolver

type PolicyResolver interface {

	// ResolvePolicy returns the policy.PUPolicy associated with the given contextID using the given policy.RuntimeReader.
	ResolvePolicy(contextID string, RuntimeReader policy.RuntimeReader) (*policy.PUPolicy, error)

	// HandleDeletePU is called when a PU is stopped/killed.
	HandlePUEvent(contextID string, eventType monitor.Event)

A PolicyResolver is responsible of creating the Policies for a specific Processing Unit. The PolicyResolver also got the ability to update an already instantiated policy.

type PolicyUpdater

type PolicyUpdater interface {

	// UpdatePolicy updates the policy of the isolator for a container.
	UpdatePolicy(contextID string, newPolicy *policy.PUPolicy) error

A PolicyUpdater has the ability to receive an update for a specific policy.

type TestPolicyResolver

type TestPolicyResolver interface {
	MockResolvePolicy(t *testing.T, impl func(contextID string, RuntimeReader policy.RuntimeReader) (*policy.PUPolicy, error))
	MockHandlePUEvent(t *testing.T, impl func(contextID string, eventType monitor.Event))

TestPolicyResolver us

func NewTestPolicyResolver

func NewTestPolicyResolver() TestPolicyResolver

NewTestPolicyResolver returns a new TestManipulator.

type Trireme

type Trireme interface {

	// PURuntime returns a getter for a specific contextID.
	PURuntime(contextID string) (policy.RuntimeReader, error)

	// Start starts the component.
	Start() error

	// Stop stops the component.
	Stop() error

	// Supervisor returns the supervisor for a given PU type
	Supervisor(kind constants.PUType) supervisor.Supervisor



Trireme is the main interface to the Trireme package.

func NewTrireme

func NewTrireme(serverID string, resolver PolicyResolver, supervisors map[constants.PUType]supervisor.Supervisor, enforcers map[constants.PUType]enforcer.PolicyEnforcer, eventCollector collector.EventCollector) Trireme

NewTrireme returns a reference to the trireme object based on the parameter subelements.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier