cloudlog

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: May 8, 2018 License: Apache-2.0 Imports: 2 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenServiceLogGroupName added in v0.9.3

func GenServiceLogGroupName(cluster string, service string, serviceUUID string, k8snamespace string) string

GenServiceLogGroupName creates the service log group name: clustername-servicename-serviceUUID.

func GenServiceMemberLogStreamName added in v0.9.3

func GenServiceMemberLogStreamName(memberName string, hostname string, containerID string) string

GenServiceMemberLogStreamName creates the log stream name for one service member: membername/hostname/containerID.

Types

type CloudLog

type CloudLog interface {
	// CreateServiceLogConfig creates the LogConfig for the service to send logs to AWS CloudWatch.
	CreateServiceLogConfig(ctx context.Context, cluster string, service string, serviceUUID string) *LogConfig
	// CreateStreamLogConfig creates the LogConfig for the stateless service, such as the managemen service,
	// or the task of the stateful service, such as init task.
	CreateStreamLogConfig(ctx context.Context, cluster string, service string, serviceUUID string, stream string) *LogConfig
	// InitializeServiceLogConfig creates the log group on AWS CloudWatch.
	InitializeServiceLogConfig(ctx context.Context, cluster string, service string, serviceUUID string) error
	// DeleteServiceLogConfig deletes the log group from AWS CloudWatch.
	DeleteServiceLogConfig(ctx context.Context, cluster string, service string, serviceUUID string) error
}

CloudLog defines the common log interface.

type LogConfig

type LogConfig struct {
	// the log driver name, such as awslogs.
	Name string
	// the log driver options, such as awslogs-region, awslogs-group, etc.
	Options map[string]string
}

LogConfig contains the configs for the log driver.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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