Documentation
¶
Index ¶
- Constants
- func DockerLogCmd(container, destDir string, since time.Time) string
- type ContainerNotFoundError
- type Docker
- type DockerConfig
- type DockerNoLogsError
- type DockerNotFoundError
- type Journald
- type JournaldConfig
- type JournaldNotFound
- type JournaldPermissionError
- type JournaldServiceNotEnabled
Constants ¶
View Source
const JournaldTimeLayout = "2006-01-02 15:04:05"
JournaldTimeLayout custom go time layouts must match the reference time Jan 2 15:04:05 2006 MST
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContainerNotFoundError ¶ added in v0.5.0
type ContainerNotFoundError struct {
// contains filtered or unexported fields
}
func (ContainerNotFoundError) Error ¶ added in v0.5.0
func (e ContainerNotFoundError) Error() string
type Docker ¶
type Docker struct {
// Container is the name of the docker container to get logs from
Container string `json:"container"`
// DestDir is the directory we will write the logs to
DestDir string `json:"destDir"`
// Since marks the beginning of the time range to include logs
Since time.Time `json:"since"`
// Redactions includes any redactions to apply to the output of the runner.
Redactions []*redact.Redact `json:"redactions"`
// Timeout specifies the amount of time that the runner should be allowed to execute before cancellation.
Timeout runner.Timeout `json:"timeout"`
// contains filtered or unexported fields
}
Docker allows logs to be retrieved for a docker container
func NewDocker ¶
func NewDocker(cfg DockerConfig) *Docker
NewDocker returns a runner with an identifier and fully configured docker runner
func NewDockerWithContext ¶ added in v0.5.0
func NewDockerWithContext(ctx context.Context, cfg DockerConfig) *Docker
NewDockerWithContext returns a runner with an identifier and fully configured docker runner, which includes a provided context.
type DockerConfig ¶ added in v0.5.0
type DockerConfig struct {
// Container is the name of the docker container to get logs from
Container string
// DestDir is the directory we will write the logs to
DestDir string
// Since marks the beginning of the time range to include logs
Since time.Time
// Redactions includes any redactions to apply to the output of the runner.
Redactions []*redact.Redact
// Timeout specifies the amount of time that the runner should be allowed to execute before cancellation.
Timeout time.Duration
}
type DockerNoLogsError ¶
type DockerNoLogsError struct {
// contains filtered or unexported fields
}
func (DockerNoLogsError) Error ¶
func (e DockerNoLogsError) Error() string
type DockerNotFoundError ¶
type DockerNotFoundError struct {
// contains filtered or unexported fields
}
func (DockerNotFoundError) Error ¶
func (e DockerNotFoundError) Error() string
func (DockerNotFoundError) Unwrap ¶
func (e DockerNotFoundError) Unwrap() error
type Journald ¶
type Journald struct {
Service string `json:"service"`
DestDir string `json:"destDir"`
Since time.Time `json:"since"`
Until time.Time `json:"until"`
// Redactions includes any redactions to apply to the output of the runner.
Redactions []*redact.Redact `json:"redactions"`
// Timeout specifies the amount of time that the runner should be allowed to execute before cancellation.
Timeout runner.Timeout `json:"timeout"`
// contains filtered or unexported fields
}
func NewJournald ¶
func NewJournald(cfg JournaldConfig) *Journald
NewJournald sets the defaults for the journald runner
func NewJournaldWithContext ¶ added in v0.5.0
func NewJournaldWithContext(ctx context.Context, cfg JournaldConfig) *Journald
NewJournaldWithContext sets the defaults for the journald runner, including a context.
type JournaldConfig ¶ added in v0.5.0
type JournaldConfig struct {
Service string
DestDir string
Since time.Time
Until time.Time
// Redactions includes any redactions to apply to the output of the runner.
Redactions []*redact.Redact
// Timeout specifies the amount of time that the runner should be allowed to execute before cancellation.
Timeout time.Duration
}
type JournaldNotFound ¶
type JournaldNotFound struct {
// contains filtered or unexported fields
}
func (JournaldNotFound) Error ¶
func (e JournaldNotFound) Error() string
func (JournaldNotFound) Unwrap ¶
func (e JournaldNotFound) Unwrap() error
type JournaldPermissionError ¶
type JournaldPermissionError struct {
// contains filtered or unexported fields
}
func (JournaldPermissionError) Error ¶
func (e JournaldPermissionError) Error() string
func (JournaldPermissionError) Unwrap ¶
func (e JournaldPermissionError) Unwrap() error
type JournaldServiceNotEnabled ¶
type JournaldServiceNotEnabled struct {
// contains filtered or unexported fields
}
func (JournaldServiceNotEnabled) Error ¶
func (e JournaldServiceNotEnabled) Error() string
func (JournaldServiceNotEnabled) Unwrap ¶
func (e JournaldServiceNotEnabled) Unwrap() error
Click to show internal directories.
Click to hide internal directories.