Documentation
¶
Index ¶
Constants ¶
const ( EvConnection = iota EvExec )
events types
const CSV = "csv"
CSV name of the output format, used in json configs
const JSON = "json"
JSON name of the output format, used in our json config
const RFC3164 = "rfc3164"
RFC3164 name of the output format, used in our json config
const RFC5424 = "rfc5424"
RFC5424 name of the output format, used in our json config
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONEventFormat ¶
type JSONEventFormat struct { Event interface{} `json:"Event"` Rule string `json:"Rule"` Action string `json:"Action"` Type uint8 `json:"Type"` }
JSONEventFormat object to be sent to the remote service. TODO: Expand as needed: ebpf events, etc.
func NewJSON ¶
func NewJSON() *JSONEventFormat
NewJSON returns a new Json format, to send events as json. The json is the protobuffer in json format.
func (*JSONEventFormat) Transform ¶
func (j *JSONEventFormat) Transform(args ...interface{}) (out string)
Transform takes input arguments and formats them to JSON format.
type LoggerFormat ¶
type LoggerFormat interface {
Transform(...interface{}) string
}
LoggerFormat is the common interface that every format must meet. Transform expects an arbitrary number of arguments and types, and it must transform them to a string. Arguments can be of type Connection, string, int, etc.
type Rfc3164 ¶
type Rfc3164 struct {
// contains filtered or unexported fields
}
Rfc3164 object
func NewRfc3164 ¶
func NewRfc3164() *Rfc3164
NewRfc3164 returns a new Rfc3164 object, that transforms a message to RFC3164 format.
type Rfc5424 ¶
type Rfc5424 struct {
// contains filtered or unexported fields
}
Rfc5424 object
func NewRfc5424 ¶
func NewRfc5424() *Rfc5424
NewRfc5424 returns a new Rfc5424 object, that transforms a message to RFC5424 format (sort of).