Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateRetentionValue ¶ added in v0.78.0
Added function to check if value is an accepted number of log retention days
func ValidateTagsInput ¶ added in v0.78.0
Check if the tags input is valid
Types ¶
type ByTimestamp ¶
type ByTimestamp []*cloudwatchlogs.InputLogEvent
func (ByTimestamp) Len ¶
func (inputLogEvents ByTimestamp) Len() int
func (ByTimestamp) Less ¶
func (inputLogEvents ByTimestamp) Less(i, j int) bool
func (ByTimestamp) Swap ¶
func (inputLogEvents ByTimestamp) Swap(i, j int)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Possible exceptions are combination of common errors (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/CommonErrors.html) and API specific erros (e.g. https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutLogEvents.html#API_PutLogEvents_Errors)
func NewClient ¶
func NewClient(logger *zap.Logger, awsConfig *aws.Config, buildInfo component.BuildInfo, logGroupName string, logRetention int64, tags map[string]*string, sess *session.Session, componentName string) *Client
NewClient create Client
func (*Client) CreateStream ¶
Prepare the readiness for the log group and log stream.
func (*Client) PutLogEvents ¶
func (client *Client) PutLogEvents(input *cloudwatchlogs.PutLogEventsInput, retryCnt int) error
PutLogEvents mainly handles different possible error could be returned from server side, and retries them if necessary.
type Event ¶
type Event struct { InputLogEvent *cloudwatchlogs.InputLogEvent // The time which log generated. GeneratedTime time.Time // Identify what is the stream of destination of this event StreamKey }
Event struct to present a log event.
type LogStreamManager ¶ added in v0.88.0
type LogStreamManager interface { // Initialize a stream so that it can receive logs // This will make sure that the stream exists and if it does not exist, // It will create one. Implementations of this method MUST be safe for concurrent use. InitStream(streamKey StreamKey) error }
Manages the creation of streams
func NewLogStreamManager ¶ added in v0.88.0
func NewLogStreamManager(svcStructuredLog Client) LogStreamManager
type MultiStreamPusherFactory ¶ added in v0.88.0
type MultiStreamPusherFactory interface {
CreateMultiStreamPusher() Pusher
}
Factory for a Pusher that has capability of sending events to multiple log streams
func NewMultiStreamPusherFactory ¶ added in v0.88.0
func NewMultiStreamPusherFactory(logStreamManager LogStreamManager, client Client, logger *zap.Logger) MultiStreamPusherFactory
Creates a new MultiStreamPusherFactory