cloudwatchlogs

package module
v0.0.0-...-0dbb8f2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultShift            time.Duration = 1 * time.Second // controls the time shift in past for the first call to CloudwatchLogs API
	DefaultPollingInterval  time.Duration = 5 * time.Second // time between two calls to CloudwatchLogs API
	DefaultBufferSize       uint64        = 200             // buffer size of the channel that transmits Logs to the Plugin
	QueryResultPollInterval time.Duration = 5 * time.Second // time to wait before checking the cloudwatch insight query result
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*cloudwatchlogs.CloudWatchLogs
}

Client represents a client for CloudwatchLogs API

func CreateClient

func CreateClient(sess *session.Session, cfgs *aws.Config) *Client

CreateFilter returns a Filter for CloudwatchLogs API

func (*Client) Open

func (client *Client) Open(context context.Context, filter *Filter, options *Options) (chan *cloudwatchlogs.FilteredLogEvent, chan error)

type Filter

type Filter struct {
	FilterPattern       string
	LogGroupName        string
	LogStreamNamePrefix string
	LogStreamNames      []string
}

Filter represents a filter for retrieving logs from CloudwatchLogs API

func CreateFilter

func CreateFilter(filterPattern, logGroupName, logStreamNamePrefix string, logStreamNames []string) *Filter

CreateFilter returns a Client for retrieving logs from CloudwatchLogs API

type Options

type Options struct {
	Shift           time.Duration
	PollingInterval time.Duration
	BufferSize      uint64
}

Options represents options for calls to CloudwatchLogs API

func CreateOptions

func CreateOptions(shift, pollingInterval time.Duration, bufferSize uint64) *Options

CreateOptions returns Options for retrieving logs from CloudwatchLogs API

Jump to

Keyboard shortcuts

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