trireme-lib: go.aporeto.io/trireme-lib/controller/pkg/remoteenforcer Index | Files | Directories

package remoteenforcer

import "go.aporeto.io/trireme-lib/controller/pkg/remoteenforcer"

Index

Package Files

interfaces.go remoteenforcer_linux.go type.go

Constants

const (
    // InitEnforcer is string for invoking RPC
    InitEnforcer = "RemoteEnforcer.InitEnforcer"
    //Unenforce is string for invoking RPC
    Unenforce = "RemoteEnforcer.Unenforce"
    //Enforce is string for invoking RPC
    Enforce = "RemoteEnforcer.Enforce"
    // EnforcerExit is string for invoking RPC
    EnforcerExit = "RemoteEnforcer.EnforcerExit"
    // UpdateSecrets is string for invoking updatesecrets RPC
    UpdateSecrets = "RemoteEnforcer.UpdateSecrets"
    // SetTargetNetworks is string for invoking SetTargetNetworks RPC
    SetTargetNetworks = "RemoteEnforcer.SetTargetNetworks"
    // EnableIPTablesPacketTracing enable iptables trace mode
    EnableIPTablesPacketTracing = "RemoteEnforcer.EnableIPTablesPacketTracing"
    // EnableDatapathPacketTracing enable datapath packet tracing
    EnableDatapathPacketTracing = "RemoteEnforcer.EnableDatapathPacketTracing"
    // SetLogLevel is string for invoking set log level RPC
    SetLogLevel = "RemoteEnforcer.SetLogLevel"
)

func LaunchRemoteEnforcer Uses

func LaunchRemoteEnforcer(service packetprocessor.PacketProcessor, zapConfig zap.Config) error

LaunchRemoteEnforcer launches a remote enforcer

type RemoteEnforcer Uses

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

RemoteEnforcer : This is the structure for maintaining state required by the remote enforcer. It is a cache of variables passed by the controller to the remote enforcer and other handles required by the remote enforcer to talk to the external processes

Why is this public when all members are private ? For golang RPC server requirements

func (*RemoteEnforcer) EnableDatapathPacketTracing Uses

func (s *RemoteEnforcer) EnableDatapathPacketTracing(req rpcwrapper.Request, resp *rpcwrapper.Response) error

EnableDatapathPacketTracing enable nfq datapath packet tracing

func (*RemoteEnforcer) EnableIPTablesPacketTracing Uses

func (s *RemoteEnforcer) EnableIPTablesPacketTracing(req rpcwrapper.Request, resp *rpcwrapper.Response) error

EnableIPTablesPacketTracing enables iptables trace packet tracing

func (*RemoteEnforcer) Enforce Uses

func (s *RemoteEnforcer) Enforce(req rpcwrapper.Request, resp *rpcwrapper.Response) error

Enforce this method calls the enforce method on the enforcer created during initenforcer

func (*RemoteEnforcer) EnforcerExit Uses

func (s *RemoteEnforcer) EnforcerExit(req rpcwrapper.Request, resp *rpcwrapper.Response) error

EnforcerExit is processing messages from the remote that are requesting an exit. In this case we simply cancel the context.

func (*RemoteEnforcer) InitEnforcer Uses

func (s *RemoteEnforcer) InitEnforcer(req rpcwrapper.Request, resp *rpcwrapper.Response) error

InitEnforcer is a function called from the controller using RPC. It intializes data structure required by the remote enforcer

func (*RemoteEnforcer) SetLogLevel Uses

func (s *RemoteEnforcer) SetLogLevel(req rpcwrapper.Request, resp *rpcwrapper.Response) error

SetLogLevel sets log level.

func (*RemoteEnforcer) SetTargetNetworks Uses

func (s *RemoteEnforcer) SetTargetNetworks(req rpcwrapper.Request, resp *rpcwrapper.Response) error

SetTargetNetworks calls the same method on the actual enforcer

func (*RemoteEnforcer) Unenforce Uses

func (s *RemoteEnforcer) Unenforce(req rpcwrapper.Request, resp *rpcwrapper.Response) error

Unenforce this method calls the unenforce method on the enforcer created from initenforcer

func (*RemoteEnforcer) UpdateSecrets Uses

func (s *RemoteEnforcer) UpdateSecrets(req rpcwrapper.Request, resp *rpcwrapper.Response) error

UpdateSecrets updates the secrets used by the remote enforcer

type RemoteIntf Uses

type RemoteIntf interface {
    // InitEnforcer is a function called from the controller using RPC.
    // It intializes data structure required by the remote enforcer
    InitEnforcer(req rpcwrapper.Request, resp *rpcwrapper.Response) error

    //Unenforce this method calls the unenforce method on the enforcer created from initenforcer
    Unenforce(req rpcwrapper.Request, resp *rpcwrapper.Response) error

    //Enforce this method calls the enforce method on the enforcer created during initenforcer
    Enforce(req rpcwrapper.Request, resp *rpcwrapper.Response) error

    // EnforcerExit this method is called when  we received a killrpocess message from the controller
    // This allows a graceful exit of the enforcer
    EnforcerExit(req rpcwrapper.Request, resp *rpcwrapper.Response) error
}

RemoteIntf is the interface implemented by the remote enforcer

Directories

PathSynopsis
internal/counterclient
internal/counterclient/mockcounterclientPackage mockcounterclient is a generated GoMock package.
internal/debugclient
internal/debugclient/mockdebugclientPackage mockdebugclient is a generated GoMock package.
internal/dnsreportclient
internal/dnsreportclient/mockdnsreportPackage mock_dnsreportclient is a generated GoMock package.
internal/statsclient
internal/statsclient/mockstatsclientPackage mockstatsclient is a generated GoMock package.
internal/statscollector
internal/statscollector/mockstatscollectorPackage mockstatscollector is a generated GoMock package.
internal/tokenissuer
internal/tokenissuer/mocktokenclientPackage mocktokenclient is a generated GoMock package.
mockremoteenforcerPackage mockremoteenforcer is a generated GoMock package.

Package remoteenforcer imports 27 packages (graph) and is imported by 6 packages. Updated 2019-09-12. Refresh now. Tools for package owners.