event

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Passed is used to report successful result of a rule check (condition passed)
	Passed = "passed"
	// Failed is used to report unsuccessful result of a rule check (condition failed)
	Failed = "failed"
	// Error is used to report result of a rule check that resulted in an error (unable to evaluate condition)
	Error = "error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data map[string]interface{}

Data defines a key value map for storing attributes of a reported rule event

type Event

type Event struct {
	AgentRuleID      string   `json:"agent_rule_id,omitempty"`
	AgentRuleVersion int      `json:"agent_rule_version,omitempty"`
	Result           string   `json:"result,omitempty"`
	ResourceType     string   `json:"resource_type,omitempty"`
	ResourceID       string   `json:"resource_id,omitempty"`
	Tags             []string `json:"tags"`
	Data             Data     `json:"data,omitempty"`
}

Event describes a log event sent for an evaluated compliance/security rule.

type Reporter

type Reporter interface {
	Report(event *Event)
}

Reporter defines an interface for reporting rule events

func NewReporter

func NewReporter(logSource *config.LogSource, logChan chan *message.Message) Reporter

NewReporter returns an instance of Reporter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL