awslogs

package
v0.0.0-...-fc09d8a Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package awslogs provides functionalities for integrating the awslogs logging driver with shim-loggers-for-containerd.

Index

Constants

View Source
const (

	// RegionKey specifies the AWS logging region.
	RegionKey = "awslogs-region"
	// GroupKey denotes the AWS logging group name.
	GroupKey = "awslogs-group"
	// CreateGroupKey is a flag to create a new AWS logging group.
	CreateGroupKey = "awslogs-create-group"
	// StreamKey specifies the AWS logging stream name.
	StreamKey = "awslogs-stream"
	// CreateStreamKey is a flag to create a new log stream.
	CreateStreamKey = "awslogs-create-stream"
	// MultilinePatternKey defines the pattern for multiline logs.
	MultilinePatternKey = "awslogs-multiline-pattern"
	// DatetimeFormatKey specifies the datetime format of the logs.
	DatetimeFormatKey = "awslogs-datetime-format"
	// CredentialsEndpointKey denotes the AWS credentials endpoint (not actual credentials).
	CredentialsEndpointKey = "awslogs-credentials-endpoint" //nolint:gosec // not credentials
	// EndpointKey is the AWS logging endpoint.
	EndpointKey = "awslogs-endpoint"
)

Variables

This section is empty.

Functions

func WithRegion

func WithRegion(region string) logger.InfoOpt

WithRegion sets awslogs region of logger info.

Types

type Args

type Args struct {
	// Required arguments.
	Group               string
	Region              string
	Stream              string
	CredentialsEndpoint string

	// Optional arguments.
	CreateGroup      string
	CreateStream     string
	MultilinePattern string
	DatetimeFormat   string
	Endpoint         string
}

Args represents AWSlogs driver arguments.

type LoggerArgs

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

LoggerArgs stores global logger args and awslogs specific args.

func InitLogger

func InitLogger(globalArgs *logger.GlobalArgs, awslogsArgs *Args) *LoggerArgs

InitLogger initialize the input arguments.

func (*LoggerArgs) RunLogDriver

func (la *LoggerArgs) RunLogDriver(ctx context.Context, config *logging.Config, ready func() error) error

RunLogDriver initiates an awslogs driver and starts driving container logs to cloudwatch.

Jump to

Keyboard shortcuts

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