dockerutils

package
v0.0.0-...-f49aa48 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MergedDir           = "MergedDir"
	AttrIsDockerJsonLog = "isDockerJsonLog"
)
View Source
const (
	// A virtual path that represents the standard output of the container
	DockerJsonLogFile = "/virtual/stdout/json.log"
)

Variables

This section is empty.

Functions

func DetectSock

func DetectSock() (string, bool)

func ExtractEventAction

func ExtractEventAction(rawAction string) string

action 形如 'dir' 'exec_create: bash -c sc stop app', 对于后者我们提取出 exec_create

func NewClientFromEnv

func NewClientFromEnv(addrs ...string) (*dockersdk.Client, types.Ping, error)

NewClientFromEnv create a docker client based on the agreed environment configuration information.

Types

type DockerLog

type DockerLog struct {
	Stream string
	Log    string
	Time   string
}

docker json log model: https://docs.docker.com/config/containers/logging/json-file/

func DecodeJsonLog

func DecodeJsonLog(line string) (*DockerLog, error)

Jump to

Keyboard shortcuts

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