This section is empty.


This section is empty.


func ExecuteCommandFromArguments

func ExecuteCommandFromArguments(arguments map[string]interface{}) error

    ExecuteCommandFromArguments processes the command from the arguments

    func ParseServices

    func ParseServices(ports []string) ([]common.Service, error)

      ParseServices parses strings with the services and returns them in an validated slice


      type CLIRequest

      type CLIRequest struct {
      	// Request is the type of the request
      	Request RequestType
      	// Cgroup is only provided for delete cgroup requests
      	Cgroup string
      	// Executable is the path to the executable
      	Executable string
      	// Parameters are the parameters of the executable
      	Parameters []string
      	// Labels are the user labels attached to the request
      	Labels []string
      	// ServiceName is a user defined service name
      	ServiceName string
      	// Services are the user defined services (protocol, port)
      	Services []common.Service
      	// HostPolicy indicates that this is a host policy
      	HostPolicy bool
      	// NetworkOnly indicates that the request is only for traffic coming from the network
      	NetworkOnly bool
      	// UIDPOlicy indicates that the request is for a UID policy
      	UIDPolicy bool
      	// AutoPort indicates that auto port feature is enabled for the PU
      	AutoPort bool

        CLIRequest captures all CLI parameters

        type RequestProcessor

        type RequestProcessor struct {
        	// contains filtered or unexported fields

          RequestProcessor is an instance of the processor

          func NewCustomRequestProcessor

          func NewCustomRequestProcessor(address string) *RequestProcessor

            NewCustomRequestProcessor creates a new request processor

            func NewRequestProcessor

            func NewRequestProcessor() *RequestProcessor

              NewRequestProcessor creates a default request processor

              func (*RequestProcessor) CreateAndRun

              func (r *RequestProcessor) CreateAndRun(c *CLIRequest) error

                CreateAndRun creates a processing unit

                func (*RequestProcessor) DeleteCgroup

                func (r *RequestProcessor) DeleteCgroup(c *CLIRequest) error

                  DeleteCgroup will issue a delete command based on the cgroup This is used mainly by the cleaner.

                  func (*RequestProcessor) DeleteService

                  func (r *RequestProcessor) DeleteService(c *CLIRequest) error

                    DeleteService will issue a delete command

                    func (*RequestProcessor) ExecuteRequest

                    func (r *RequestProcessor) ExecuteRequest(c *CLIRequest) error

                      ExecuteRequest executes the command with an RPC request

                      func (*RequestProcessor) ParseCommand

                      func (r *RequestProcessor) ParseCommand(arguments map[string]interface{}) (*CLIRequest, error)

                        ParseCommand parses a command based on the above specification This is a helper function for CLIs like in Trireme Example. Proper use is through the CLIRequest structure

                        type RequestType

                        type RequestType int

                          RequestType is the type of the request

                          const (
                          	// CreateRequest requests a create event
                          	CreateRequest RequestType = iota
                          	// DeleteCgroupRequest requests deletion based on the cgroup - issued by the kernel
                          	// DeleteServiceRequest requests deletion by the service ID

                          Source Files