logs

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2020 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogsForContainerInPod

func GetLogsForContainerInPod(ctx context.Context, pod *v1.Pod, index uint32, nameSuffix string) ([]*core.TaskLog, error)

func SetLogConfig

func SetLogConfig(logConfig *LogConfig) error

This method should be used for unit testing only

Types

type LogConfig

type LogConfig struct {
	IsCloudwatchEnabled bool   `json:"cloudwatch-enabled" pflag:",Enable Cloudwatch Logging"`
	CloudwatchRegion    string `json:"cloudwatch-region" pflag:",AWS region in which Cloudwatch logs are stored."`
	CloudwatchLogGroup  string `json:"cloudwatch-log-group" pflag:",Log group to which streams are associated."`

	IsKubernetesEnabled bool   `json:"kubernetes-enabled" pflag:",Enable Kubernetes Logging"`
	KubernetesURL       string `json:"kubernetes-url" pflag:",Console URL for Kubernetes logs"`

	IsStackDriverEnabled       bool   `json:"stackdriver-enabled" pflag:",Enable Log-links to stackdriver"`
	GCPProjectName             string `json:"gcp-project" pflag:",Name of the project in GCP"`
	StackdriverLogResourceName string `json:"stackdriver-logresourcename" pflag:",Name of the logresource in stackdriver"`
}

Log plugins configs

func GetLogConfig

func GetLogConfig() *LogConfig

func (LogConfig) GetPFlagSet

func (cfg LogConfig) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in LogConfig and its nested types. The format of the flags is json-name.json-sub-name... etc.

Jump to

Keyboard shortcuts

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