cloudwatch

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 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"`

	// required
	LogGroupName string `json:"log_group_name,omitempty" yaml:"log_group_name,omitempty"`
	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
}

func (*Persister) Read

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

Helper function to get persisted data

func (*Persister) Write

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

Helper function to set persisted data

Jump to

Keyboard shortcuts

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