output

package
v0.0.0-...-5849f30 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartOutput

func StartOutput(out Sink, outChannel *chan interface{}) error

Types

type DefaultSink

type DefaultSink struct{}

DefaultSource is an implementation of the SourceIface used to create inputs

func (*DefaultSink) Create

func (*DefaultSink) Create(config SinkConfig) (Sink, error)

type FileConfig

type FileConfig struct {
	Path string `json:"path"`
}

type FileOutput

type FileOutput struct {
	FileName string
	// contains filtered or unexported fields
}

func (*FileOutput) Close

func (f *FileOutput) Close() error

func (*FileOutput) Init

func (f *FileOutput) Init(...interface{}) error

func (*FileOutput) Sink

func (f *FileOutput) Sink(input *chan interface{})

type Level

type Level int
const (
	ErrorLevel Level = iota
	WarnLevel
	InfoLevel
)

func ParseLevel

func ParseLevel(lvl string) (Level, error)

func (Level) String

func (l Level) String() string

type OutputEvent

type OutputEvent struct {
	Source      string
	EventTime   time.Time
	EventType   string
	Name        string
	Level       Level
	EventId     string
	Entity      string
	SourceIP    string
	Body        map[string]interface{}
	Occurrences int
}

type SQSOutput

type SQSOutput struct {
	QueueUrl string
	Region   string
	// contains filtered or unexported fields
}

func (*SQSOutput) Close

func (o *SQSOutput) Close() error

func (*SQSOutput) Init

func (o *SQSOutput) Init(...interface{}) error

func (*SQSOutput) Sink

func (o *SQSOutput) Sink(input *chan interface{})

type Sink

type Sink interface {
	Sink(*chan interface{})
	Init(...interface{}) error
	Close() error
}

Sink is an interface for output implementations

type SinkConfig

type SinkConfig struct {
	Type       string     `json:"type"`
	FileConfig FileConfig `json:"file_config,omitempty"`
	SqsConfig  SqsConfig  `json:"sqs_config,omitempty"`
}

type SinkIface

type SinkIface interface {
	Create(config SinkConfig) (Sink, error)
}

SourceIface provides an interface for creating input sources

type SqsConfig

type SqsConfig struct {
	QueueUrl string `json:"queueUrl"`
	Region   string `json:"region"`
}

Jump to

Keyboard shortcuts

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