cloudwatch

package
v0.0.0-...-44c758a Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Eventer

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

Eventer logs events to CloudWatch Logs.

func NewEventer

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

func (c *Eventer) Close() error

func (*Eventer) Event

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

Event implements Eventer.

func (*Eventer) Init

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

func (c *Eventer) String() string

type EventerOption

type EventerOption func(*opts)

func OptNow

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