pilot

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2018 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const DOCKER_HOME_PATH = "/var/lib/docker/"
View Source
const ENV_FILEBEAT_OUTPUT = "FILEBEAT_OUTPUT"
View Source
const ENV_FLUENTD_OUTPUT = "FLUENTD_OUTPUT"
View Source
const ENV_LOGGING_OUTPUT = "LOGGING_OUTPUT"
View Source
const ENV_PILOT_CREATE_SYMLINK = "PILOT_CREATE_SYMLINK"
View Source
const ENV_PILOT_LOG_PREFIX = "PILOT_LOG_PREFIX"
View Source
const ENV_PILOT_TYPE = "PILOT_TYPE"
View Source
const ENV_SERVICE_LOGS_TEMPL = "%s_logs_"
View Source
const ERR_ALREADY_STARTED = "already started"
View Source
const FILEBEAT_CONF_DIR = FILEBEAT_CONF_HOME + "/prospectors.d"
View Source
const FILEBEAT_CONF_FILE = FILEBEAT_CONF_HOME + "/filebeat.yml"
View Source
const FILEBEAT_CONF_HOME = "/etc/filebeat"
View Source
const FILEBEAT_EXEC_BIN = "/usr/bin/filebeat"
View Source
const FILEBEAT_LOG_DIR = "/var/log/filebeat"
View Source
const FILEBEAT_REGISTRY_FILE = "/var/lib/filebeat/registry"
View Source
const FLUENTD_CONF_HOME = "/etc/fluentd/conf.d"
View Source
const KUBELET_HOME_PATH = "/var/lib/kubelet/"
View Source
const LABEL_K8S_CONTAINER_NAME = "io.kubernetes.container.name"
View Source
const LABEL_K8S_POD_NAMESPACE = "io.kubernetes.pod.namespace"
View Source
const LABEL_POD = "io.kubernetes.pod.name"
View Source
const LABEL_PROJECT = "com.docker.compose.project"
View Source
const LABEL_PROJECT_SWARM_MODE = "com.docker.stack.namespace"
View Source
const LABEL_SERVICE = "com.docker.compose.service"
View Source
const LABEL_SERVICE_LOGS_TEMPL = "%s.logs."
View Source
const LABEL_SERVICE_SWARM_MODE = "com.docker.swarm.service.name"
View Source
const PILOT_FILEBEAT = "filebeat"
View Source
const PILOT_FLUENTD = "fluentd"
View Source
const SYMLINK_LOGS_BASE = "/acs/log/"

Variables

View Source
var NODE_NAME = os.Getenv("NODE_NAME")

Functions

func Convert

func Convert(info *LogInfoNode) (map[string]string, error)

func Register

func Register(format string, converter FormatConverter)

func Run

func Run(tpl string, baseDir string) error

Types

type Config

type Config struct {
	Paths []string `config:"paths"`
}

type FileInode

type FileInode struct {
	Inode  uint64 `json:"inode,"`
	Device uint64 `json:"device,"`
}

type FilebeatPiloter

type FilebeatPiloter struct {
	// contains filtered or unexported fields
}

func (*FilebeatPiloter) ConfHome

func (p *FilebeatPiloter) ConfHome() string

func (*FilebeatPiloter) ConfPathOf

func (p *FilebeatPiloter) ConfPathOf(container string) string

func (*FilebeatPiloter) Name

func (p *FilebeatPiloter) Name() string

func (*FilebeatPiloter) OnDestroyEvent

func (p *FilebeatPiloter) OnDestroyEvent(container string) error

func (*FilebeatPiloter) Reload

func (p *FilebeatPiloter) Reload() error

func (*FilebeatPiloter) Start

func (p *FilebeatPiloter) Start() error

func (*FilebeatPiloter) Stop

func (p *FilebeatPiloter) Stop() error

type FluentdPiloter

type FluentdPiloter struct {
	// contains filtered or unexported fields
}

func (*FluentdPiloter) ConfHome

func (p *FluentdPiloter) ConfHome() string

func (*FluentdPiloter) ConfPathOf

func (p *FluentdPiloter) ConfPathOf(container string) string

func (*FluentdPiloter) Name

func (p *FluentdPiloter) Name() string

func (*FluentdPiloter) OnDestroyEvent

func (p *FluentdPiloter) OnDestroyEvent(container string) error

func (*FluentdPiloter) Reload

func (p *FluentdPiloter) Reload() error

func (*FluentdPiloter) Start

func (p *FluentdPiloter) Start() error

func (*FluentdPiloter) Stop

func (p *FluentdPiloter) Stop() error

type FormatConverter

type FormatConverter func(info *LogInfoNode) (map[string]string, error)

type LogConfig

type LogConfig struct {
	Name         string
	HostDir      string
	ContainerDir string
	Format       string
	FormatConfig map[string]string
	File         string
	Tags         map[string]string
	Target       string
	EstimateTime bool
	Stdout       bool
}

type LogInfoNode

type LogInfoNode struct {
	// contains filtered or unexported fields
}

type Pilot

type Pilot struct {
	// contains filtered or unexported fields
}

func New

func New(tplStr string, baseDir string) (*Pilot, error)

type Piloter

type Piloter interface {
	Name() string
	Start() error
	Reload() error
	Stop() error
	ConfHome() string
	ConfPathOf(container string) string
	OnDestroyEvent(container string) error
}

func NewFilebeatPiloter

func NewFilebeatPiloter(base string) (Piloter, error)

func NewFluentdPiloter

func NewFluentdPiloter() (Piloter, error)

type RegistryState

type RegistryState struct {
	Source      string        `json:"source"`
	Offset      int64         `json:"offset"`
	Timestamp   time.Time     `json:"timestamp"`
	TTL         time.Duration `json:"ttl"`
	Type        string        `json:"type"`
	FileStateOS FileInode
}

type SimpleConverter

type SimpleConverter struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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