cloudwatch

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoTagValue     = fmt.Errorf("not enough dots in the tag to satisfy the index position")
	ErrMissingTagName = fmt.Errorf("tag name not found")
	ErrMissingSubName = fmt.Errorf("sub-tag name not found")
)

Errors output by the help procedures.

Functions

func LogFormatHandler added in v1.2.0

func LogFormatHandler(format string) request.NamedHandler

LogFormatHandler returns an http request handler that sets an HTTP header. The header is used to indicate the format of the logs being sent.

Types

type Event added in v1.4.0

type Event struct {
	TS     time.Time
	Record map[interface{}]interface{}
	Tag    string
	// contains filtered or unexported fields
}

Event is the input data and contains a log entry. The group and stream are added during processing.

type LogsClient

LogsClient contains the CloudWatch API calls used by this plugin

type OutputPlugin

type OutputPlugin struct {
	PluginInstanceID int
	// contains filtered or unexported fields
}

OutputPlugin is the CloudWatch Logs Fluent Bit output plugin

func NewOutputPlugin

func NewOutputPlugin(config OutputPluginConfig) (*OutputPlugin, error)

NewOutputPlugin creates a OutputPlugin object

func (*OutputPlugin) AddEvent

func (output *OutputPlugin) AddEvent(e *Event) int

AddEvent accepts a record and adds it to the buffer for its stream, flushing the buffer if it is full the return value is one of: FLB_OK, FLB_RETRY API Errors lead to an FLB_RETRY, and all other errors are logged, the record is discarded and FLB_OK is returned

func (*OutputPlugin) Flush

func (output *OutputPlugin) Flush() error

Flush sends the current buffer of records.

type OutputPluginConfig

type OutputPluginConfig struct {
	Region               string
	LogGroupName         string
	DefaultLogGroupName  string
	LogStreamPrefix      string
	LogStreamName        string
	DefaultLogStreamName string
	LogKey               string
	RoleARN              string
	AutoCreateGroup      bool
	AutoCreateStream     bool
	NewLogGroupTags      string
	LogRetentionDays     int64
	CWEndpoint           string
	STSEndpoint          string
	ExternalID           string
	CredsEndpoint        string
	PluginInstanceID     int
	LogFormat            string
	ExtraUserAgent       string
}

OutputPluginConfig is the input information used by NewOutputPlugin to create a new OutputPlugin

func (OutputPluginConfig) Validate

func (config OutputPluginConfig) Validate() error

Validate checks the configuration input for an OutputPlugin instances

type TaskMetadata added in v1.5.0

type TaskMetadata struct {
	Cluster string `json:"Cluster,omitempty"`
	TaskARN string `json:"TaskARN,omitempty"`
	TaskID  string `json:"TaskID,omitempty"`
}

TaskMetadata it the task metadata from ECS V3 endpoint

Directories

Path Synopsis
Package mock_cloudwatch is a generated GoMock package.
Package mock_cloudwatch is a generated GoMock package.

Jump to

Keyboard shortcuts

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