This section is empty.


This section is empty.


func NewReply

func NewReply(rID uint64, replyCode protocol.NotificationReplyCode, data string) *protocol.NotificationReply

NewReply constructs a new protocol notification reply


type Client

type Client struct {
	// contains filtered or unexported fields

Client holds the connection information of a client.

func NewClient

func NewClient(path string, stats *statistics.Statistics, rules *rule.Loader) *Client

NewClient creates and configures a new client.

func (*Client) Ask

func (c *Client) Ask(con *conman.Connection) (*rule.Rule, bool)

Ask sends a request to the server, with the values of a connection to be allowed or denied.

func (*Client) Connected

func (c *Client) Connected() bool

Connected checks if the client has established a connection with the server.

func (*Client) DefaultAction

func (c *Client) DefaultAction() rule.Action

DefaultAction returns the default configured action for

func (*Client) DefaultDuration

func (c *Client) DefaultDuration() rule.Duration

DefaultDuration returns the default duration configured for a rule. For example it can be: once, always, "until restart".

func (*Client) InterceptUnknown

func (c *Client) InterceptUnknown() bool

InterceptUnknown returns

func (*Client) ProcMonitorMethod

func (c *Client) ProcMonitorMethod() string

ProcMonitorMethod returns the monitor method configured. If it's not present in the config file, it'll return an emptry string.

func (*Client) Subscribe

func (c *Client) Subscribe()

Subscribe opens a connection with the server (UI), to start receiving notifications. It firstly sends the daemon status and configuration.

type Config

type Config struct {
	DefaultAction     string
	DefaultDuration   string
	InterceptUnknown  bool
	ProcMonitorMethod string
	LogLevel          *uint32

Config holds the values loaded from configFile


Path Synopsis