cloudwatch

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Eventer added in v0.0.11

type Eventer struct {
	// contains filtered or unexported fields
}

Eventer logs events to CloudWatch Logs.

func NewEventer added in v0.0.11

func NewEventer(
	client cloudwatchlogsiface.CloudWatchLogsAPI, group, stream string, options ...EventerOption,
) *Eventer

NewEventer returns a *CloudWatchLogger. It does create the group or stream until the first event is logged.

func (*Eventer) Close added in v0.0.11

func (c *Eventer) Close() error

func (*Eventer) Event added in v0.0.11

func (c *Eventer) Event(typ string, fieldPairs ...interface{})

Event implements Eventer.

func (*Eventer) Init added in v0.0.11

func (c *Eventer) Init(ctx context.Context) error

Init initializes the group and stream used by c. It will only attempt initialization once, subsequently returning the result of that attempt.

func (*Eventer) String added in v0.0.11

func (c *Eventer) String() string

type EventerOption added in v0.0.11

type EventerOption func(*opts)

func OptNow added in v0.0.11

func OptNow(now func() time.Time) EventerOption

OptNow configures NewEventer to obtain timestamps from now. now must be non-nil.

Example use case: reducing precision to make it more difficult to correlate which events likely came from the same user (who may have done a few things in one minute, etc.).

Jump to

Keyboard shortcuts

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