cloudwatch

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudwatchInput

type CloudwatchInput struct {
	helper.InputOperator
	// contains filtered or unexported fields
}

CloudwatchInput is an operator that reads input from AWS Cloudwatch Logs.

func (*CloudwatchInput) Start

func (c *CloudwatchInput) Start() error

Start will start generating log entries.

func (*CloudwatchInput) Stop

func (c *CloudwatchInput) Stop() error

Stop will stop generating logs.

type CloudwatchInputConfig

type CloudwatchInputConfig struct {
	helper.InputConfig `yaml:",inline"`

	// LogGroupName is deprecated but still supported for compatibility with older configurations
	LogGroupName string `json:"log_group_name,omitempty" yaml:"log_group_name,omitempty"`

	// LogGroups is a list of log groups
	LogGroups []string `json:"log_groups,omitempty" yaml:"log_groups,omitempty"`

	// LogGroupPrefix is used to append to LogGroups and can be used in conjunction with LogGroups
	LogGroupPrefix string `json:"log_group_prefix,omitempty" yaml:"log_group_prefix,omitempty"`

	// Region is the AWS region to target
	Region string `json:"region,omitempty" yaml:"region,omitempty"`

	// optional
	LogStreamNamePrefix string          `json:"log_stream_name_prefix,omitempty" yaml:"log_stream_name_prefix,omitempty"`
	LogStreamNames      []*string       `json:"log_stream_names,omitempty" yaml:"log_stream_names,omitempty"`
	Profile             string          `json:"profile,omitempty" yaml:"profile,omitempty"`
	EventLimit          int64           `json:"event_limit,omitempty" yaml:"event_limit,omitempty"`
	PollInterval        helper.Duration `json:"poll_interval,omitempty" yaml:"poll_interval,omitempty"`
	StartAt             string          `json:"start_at,omitempty" yaml:"start_at,omitempty"`
}

CloudwatchInputConfig is the configuration of a AWS Cloudwatch Logs input operator.

func NewCloudwatchConfig

func NewCloudwatchConfig(operatorID string) *CloudwatchInputConfig

NewCloudwatchConfig creates a new AWS Cloudwatch Logs input config with default values

func (*CloudwatchInputConfig) Build

func (c *CloudwatchInputConfig) Build(buildContext operator.BuildContext) ([]operator.Operator, error)

Build will build a AWS Cloudwatch Logs input operator.

type Persister

type Persister struct {
	DB helper.Persister
}

Persister ensures data is persisted across shutdowns

func (*Persister) Read

func (p *Persister) Read(key string) (int64, error)

Read is a helper function to get persisted data

func (*Persister) Write

func (p *Persister) Write(key string, value int64)

Write is a helper function to set persisted data

Jump to

Keyboard shortcuts

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