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 ¶
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.
Click to show internal directories.
Click to hide internal directories.