Documentation ¶
Overview ¶
Package trireme needs to be documented here for godoc.
Index ¶
- func CleanOldState()
- func GetLogParameters() (logToConsole bool, logID string, logLevel string, logFormat string)
- func LaunchRemoteEnforcer(service packetprocessor.PacketProcessor) error
- func NewMonitor(opts ...MonitorOption) *monitor.Config
- func SetLogParameters(logToConsole, logWithID bool, logLevel string, logFormat string)
- func Supervisors(t Trireme) []supervisor.Supervisor
- type CNIMonitorOption
- type DockerMonitorOption
- func SubOptionDockerMonitorMode(mode constants.DockerMonitorMode) DockerMonitorOption
- func SubOptionMonitorDockerExtractor(extractor dockermonitor.MetadataExtractor) DockerMonitorOption
- func SubOptionMonitorDockerFlags(syncAtStart, killContainerOnPolicyError bool) DockerMonitorOption
- func SubOptionMonitorDockerSocket(socketType, socketAddress string) DockerMonitorOption
- type LinuxMonitorOption
- type MonitorOption
- func OptionMergeTags(tags []string) MonitorOption
- func OptionMonitorCNI(opts ...CNIMonitorOption) MonitorOption
- func OptionMonitorDocker(opts ...DockerMonitorOption) MonitorOption
- func OptionMonitorLinuxHost(opts ...LinuxMonitorOption) MonitorOption
- func OptionMonitorLinuxProcess(opts ...LinuxMonitorOption) MonitorOption
- func OptionMonitorUID(opts ...UIDMonitorOption) MonitorOption
- func OptionSynchronizationHandler(s processor.SynchronizationHandler) MonitorOption
- type Option
- func OptionCollector(c collector.EventCollector) Option
- func OptionDatapathService(s packetprocessor.PacketProcessor) Option
- func OptionDisableMutualAuth() Option
- func OptionEnforceFqConfig(f *fqconfig.FilterQueue) Option
- func OptionEnforceLinuxProcess() Option
- func OptionMonitors(m *monitor.Config) Option
- func OptionPacketLogs() Option
- func OptionPolicyResolver(r PolicyResolver) Option
- func OptionProcMountPoint(p string) Option
- func OptionSecret(s secrets.Secrets) Option
- func OptionTargetNetworks(n []string) Option
- type PolicyResolver
- type PolicyUpdater
- type SecretsUpdater
- type Trireme
- type UIDMonitorOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLogParameters ¶
GetLogParameters retrieves log parameters for Remote Enforcer.
func LaunchRemoteEnforcer ¶
func LaunchRemoteEnforcer(service packetprocessor.PacketProcessor) error
LaunchRemoteEnforcer launches a remote enforcer instance.
func NewMonitor ¶
func NewMonitor(opts ...MonitorOption) *monitor.Config
NewMonitor provides a configuration for monitors.
func SetLogParameters ¶
SetLogParameters sets up environment to be passed to the remote trireme instances.
func Supervisors ¶
func Supervisors(t Trireme) []supervisor.Supervisor
Supervisors returns a slice of all initialized supervisors.
Types ¶
type CNIMonitorOption ¶
type CNIMonitorOption func(*cnimonitor.Config)
CNIMonitorOption is provided using functional arguments.
func SubOptionMonitorCNIExtractor ¶
func SubOptionMonitorCNIExtractor(extractor events.EventMetadataExtractor) CNIMonitorOption
SubOptionMonitorCNIExtractor provides a way to specify metadata extractor for CNI monitors.
type DockerMonitorOption ¶
type DockerMonitorOption func(*dockermonitor.Config)
DockerMonitorOption is provided using functional arguments.
func SubOptionDockerMonitorMode ¶
func SubOptionDockerMonitorMode(mode constants.DockerMonitorMode) DockerMonitorOption
SubOptionDockerMonitorMode provides a way to set the mode for docker monitor
func SubOptionMonitorDockerExtractor ¶
func SubOptionMonitorDockerExtractor(extractor dockermonitor.MetadataExtractor) DockerMonitorOption
SubOptionMonitorDockerExtractor provides a way to specify metadata extractor for docker.
func SubOptionMonitorDockerFlags ¶
func SubOptionMonitorDockerFlags(syncAtStart, killContainerOnPolicyError bool) DockerMonitorOption
SubOptionMonitorDockerFlags provides a way to specify configuration flags info for docker.
func SubOptionMonitorDockerSocket ¶
func SubOptionMonitorDockerSocket(socketType, socketAddress string) DockerMonitorOption
SubOptionMonitorDockerSocket provides a way to specify socket info for docker.
type LinuxMonitorOption ¶
type LinuxMonitorOption func(*linuxmonitor.Config)
LinuxMonitorOption is provided using functional arguments.
func SubOptionMonitorLinuxExtractor ¶
func SubOptionMonitorLinuxExtractor(extractor events.EventMetadataExtractor) LinuxMonitorOption
SubOptionMonitorLinuxExtractor provides a way to specify metadata extractor for linux monitors.
type MonitorOption ¶
MonitorOption is provided using functional arguments.
func OptionMergeTags ¶
func OptionMergeTags(tags []string) MonitorOption
OptionMergeTags provides a way to add merge tags to be used with New().
func OptionMonitorCNI ¶
func OptionMonitorCNI( opts ...CNIMonitorOption, ) MonitorOption
OptionMonitorCNI provides a way to add a cni monitor and related configuration to be used with New().
func OptionMonitorDocker ¶
func OptionMonitorDocker(opts ...DockerMonitorOption) MonitorOption
OptionMonitorDocker provides a way to add a docker monitor and related configuration to be used with New().
func OptionMonitorLinuxHost ¶
func OptionMonitorLinuxHost( opts ...LinuxMonitorOption, ) MonitorOption
OptionMonitorLinuxHost provides a way to add a linux host monitor and related configuration to be used with New().
func OptionMonitorLinuxProcess ¶
func OptionMonitorLinuxProcess( opts ...LinuxMonitorOption, ) MonitorOption
OptionMonitorLinuxProcess provides a way to add a linux process monitor and related configuration to be used with New().
func OptionMonitorUID ¶
func OptionMonitorUID( opts ...UIDMonitorOption, ) MonitorOption
OptionMonitorUID provides a way to add a UID monitor and related configuration to be used with New().
func OptionSynchronizationHandler ¶
func OptionSynchronizationHandler( s processor.SynchronizationHandler, ) MonitorOption
OptionSynchronizationHandler provides options related to processor configuration to be used with New().
type Option ¶
type Option func(*config)
Option is provided using functional arguments.
func OptionCollector ¶
func OptionCollector(c collector.EventCollector) Option
OptionCollector is an option to provide an external collector implementation.
func OptionDatapathService ¶
func OptionDatapathService(s packetprocessor.PacketProcessor) Option
OptionDatapathService is an option to provide an external datapath service implementation.
func OptionDisableMutualAuth ¶
func OptionDisableMutualAuth() Option
OptionDisableMutualAuth is an option to disable MutualAuth (enabled by default)
func OptionEnforceFqConfig ¶
func OptionEnforceFqConfig(f *fqconfig.FilterQueue) Option
OptionEnforceFqConfig is an option to override filter queues.
func OptionEnforceLinuxProcess ¶
func OptionEnforceLinuxProcess() Option
OptionEnforceLinuxProcess is an option to request support for linux process support.
func OptionMonitors ¶
OptionMonitors is an option to provide configurations for monitors.
func OptionPacketLogs ¶
func OptionPacketLogs() Option
OptionPacketLogs is an option to enable packet level logging.
func OptionPolicyResolver ¶
func OptionPolicyResolver(r PolicyResolver) Option
OptionPolicyResolver is an option to provide an external policy resolver implementation.
func OptionProcMountPoint ¶
OptionProcMountPoint is an option to provide proc mount point.
func OptionSecret ¶
OptionSecret is an option to provide an external datapath service implementation.
func OptionTargetNetworks ¶
OptionTargetNetworks is an option to provide target network configuration.
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 events.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, policy *policy.PUPolicy) error }
A PolicyUpdater has the ability to receive an update for a specific policy.
type SecretsUpdater ¶
type SecretsUpdater interface { // UpdateSecrets updates the secrets of running enforcers managed by trireme. Remote enforcers will get the secret updates with the next policy push UpdateSecrets(secrets secrets.Secrets) error }
SecretsUpdater provides an interface to update the secrets of enforcers managed by trireme at runtime
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 // processor.ProcessingUnitsHandler // CreatePURuntime is called when a monitor detects creation of a new ProcessingUnit. CreatePURuntime(contextID string, runtimeInfo *policy.PURuntime) error // HandlePUEvent is called by all monitors when a PU event is generated. The implementer // is responsible to update all components by explicitly adding a new PU. HandlePUEvent(contextID string, event events.Event) error // PolicyUpdater // UpdatePolicy updates the policy of the isolator for a container. UpdatePolicy(contextID string, policy *policy.PUPolicy) error // SecretsUpdater // UpdateSecrets updates the secrets of running enforcers managed by trireme. Remote enforcers will get the secret updates with the next policy push UpdateSecrets(secrets secrets.Secrets) error }
Trireme is the main interface to the Trireme package.
type UIDMonitorOption ¶
type UIDMonitorOption func(*uidmonitor.Config)
UIDMonitorOption is provided using functional arguments.
func SubOptionMonitorUIDExtractor ¶
func SubOptionMonitorUIDExtractor(extractor events.EventMetadataExtractor) UIDMonitorOption
SubOptionMonitorUIDExtractor provides a way to specify metadata extractor for UID monitors.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
mock
Package mockcollector is a generated GoMock package.
|
Package mockcollector is a generated GoMock package. |
policyenforcer/mock
Package mockpolicyenforcer is a generated GoMock package.
|
Package mockpolicyenforcer is a generated GoMock package. |
proxy
Package enforcerproxy :: This is the implementation of the RPC client It implements the interface of Trireme Enforcer and forwards these requests to the actual remote enforcer instead of implementing locally
|
Package enforcerproxy :: This is the implementation of the RPC client It implements the interface of Trireme Enforcer and forwards these requests to the actual remote enforcer instead of implementing locally |
utils/packet
Package packet support for TCP/IP packet manipulations needed by the Aporeto infrastructure.
|
Package packet support for TCP/IP packet manipulations needed by the Aporeto infrastructure. |
utils/packetgen
Package packetgen "PacketGen" is a Packet Generator library Current version: V1.0, Updates are coming soon
|
Package packetgen "PacketGen" is a Packet Generator library Current version: V1.0, Updates are coming soon |
internal
|
|
monitor/instance/mock
Package mockinstance is a generated GoMock package.
|
Package mockinstance is a generated GoMock package. |
monitor/mock
Package mockmonitor is a generated GoMock package.
|
Package mockmonitor is a generated GoMock package. |
processmon
Package processmon is to manage and monitor remote enforcers.
|
Package processmon is to manage and monitor remote enforcers. |
processmon/mock
Package mockprocessmon is a generated GoMock package.
|
Package mockprocessmon is a generated GoMock package. |
remoteenforcer/internal/statsclient/mock
Package mockstatsclient is a generated GoMock package.
|
Package mockstatsclient is a generated GoMock package. |
remoteenforcer/internal/statscollector/mock
Package mockstatscollector is a generated GoMock package.
|
Package mockstatscollector is a generated GoMock package. |
remoteenforcer/mock
Package mockremoteenforcer is a generated GoMock package.
|
Package mockremoteenforcer is a generated GoMock package. |
supervisor/mock
Package mocksupervisor is a generated GoMock package.
|
Package mocksupervisor is a generated GoMock package. |
supervisor/provider/mock
nolint nolint
|
nolint nolint |
supervisor/proxy
Package supervisorproxy package implements the supervisor interface and forwards the requests on this interface to a remote supervisor over an rpc call.
|
Package supervisorproxy package implements the supervisor interface and forwards the requests on this interface to a remote supervisor over an rpc call. |
Package mocktrireme is a generated GoMock package.
|
Package mocktrireme is a generated GoMock package. |
Package policy describes a generic interface for retrieving policies.
|
Package policy describes a generic interface for retrieving policies. |
rpc
|
|
processor/mock
Package mockprocessor is a generated GoMock package.
|
Package mockprocessor is a generated GoMock package. |
utils
|
|
cgnetcls
Package cgnetcls implements functionality to manage classid for processes belonging to different cgroups
|
Package cgnetcls implements functionality to manage classid for processes belonging to different cgroups |
cgnetcls/mock
Package mockcgnetcls is a generated GoMock package.
|
Package mockcgnetcls is a generated GoMock package. |
contextstore/mock
Package mockcontextstore is a generated GoMock package.
|
Package mockcontextstore is a generated GoMock package. |