Help us shape the future of Go! Take the 2026 Go Developer Survey

logs

package
v1.300073.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection struct {
	// file based logs
	Files *Files
	// windows events
	WinEvents *Events
	// journald logs
	Journald *Journald
}

func (*Collection) AddJournald added in v1.300070.0

func (config *Collection) AddJournald(logGroupName, logStreamName string, units []string, priority string, matches []map[string]string, filters []*JournaldFilter, retention int)

func (*Collection) AddLogFile

func (config *Collection) AddLogFile(filePath, logGroupName, logStreamName string, timestampFormat, timezone, multiLineStartPattern, encoding string, retention int, logGroupClass string)

func (*Collection) AddWindowsEvent

func (config *Collection) AddWindowsEvent(eventName, logGroupName, logStreamName, eventFormat string, eventLevels []string, eventIDs []int, filters []*EventFilter, retention int, logGroupClass string)

func (*Collection) ToMap

func (config *Collection) ToMap(ctx *runtime.Context) (string, map[string]interface{})

type Config

type Config struct {
	FilePath              string `file_path`
	LogGroup              string `log_group_name`
	LogStream             string `log_stream_name`
	LogGroupClass         string `log_group_class`
	TimestampFormat       string `timestamp_format`
	Timezone              string `timezone`
	MultiLineStartPattern string `multi_line_start_pattern`
	Encoding              string `encoding`
	Retention             int    `retention_in_days`
}

func (*Config) ToMap

func (config *Config) ToMap(ctx *runtime.Context) (string, map[string]interface{})

type EventConfig

type EventConfig struct {
	EventName     string         `json:"event_name"`
	EventLevels   []string       `json:"event_levels"`
	EventIDs      []int          `json:"event_ids"`
	Filters       []*EventFilter `json:"filters"`
	EventFormat   string         `json:"event_format"`
	LogGroup      string         `json:"log_group_name"`
	LogStream     string         `json:"log_stream_name"`
	LogGroupClass string         `json:"log_group_class"`
	Retention     int            `json:"retention_in_days"`
}

func (*EventConfig) ToMap

func (config *EventConfig) ToMap(ctx *runtime.Context) (string, map[string]interface{})

type EventFilter added in v1.300059.0

type EventFilter struct {
	Type       string `json:"type"`
	Expression string `json:"expression"`
}

type Events

type Events struct {
	EventConfigs []*EventConfig
}

func (*Events) AddWindowsEvent

func (config *Events) AddWindowsEvent(eventName, logGroupName, logStreamName, eventFormat string, eventLevels []string, eventIDs []int, filters []*EventFilter, retention int, logGroupClass string)

func (*Events) ToMap

func (config *Events) ToMap(ctx *runtime.Context) (string, map[string]interface{})

type Files

type Files struct {
	FileConfigs []*Config
}

func (*Files) AddLogFile

func (config *Files) AddLogFile(filePath, logGroupName, logStreamName string, timestampFormat, timezone, multiLineStartPattern, encoding string, retention int, logGroupClass string)

func (*Files) ToMap

func (config *Files) ToMap(ctx *runtime.Context) (string, map[string]interface{})

type Journald added in v1.300070.0

type Journald struct {
	JournaldConfigs []*JournaldConfig
}

func (*Journald) AddJournald added in v1.300070.0

func (config *Journald) AddJournald(logGroupName, logStreamName string, units []string, priority string, matches []map[string]string, filters []*JournaldFilter, retention int)

func (*Journald) ToMap added in v1.300070.0

func (config *Journald) ToMap(ctx *runtime.Context) (string, map[string]interface{})

type JournaldConfig added in v1.300070.0

type JournaldConfig struct {
	LogGroup        string              `json:"log_group_name"`
	LogStream       string              `json:"log_stream_name"`
	Units           []string            `json:"units"`
	Priority        string              `json:"priority"`
	Matches         []map[string]string `json:"matches"`
	Filters         []*JournaldFilter   `json:"filters"`
	RetentionInDays int                 `json:"retention_in_days"`
}

func (*JournaldConfig) ToMap added in v1.300070.0

func (config *JournaldConfig) ToMap(_ *runtime.Context) (string, map[string]interface{})

type JournaldFilter added in v1.300070.0

type JournaldFilter struct {
	Type       string `json:"type"`
	Expression string `json:"expression"`
}

Jump to

Keyboard shortcuts

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