dockertarget

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

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

Metrics holds a set of Docker target metrics.

func NewMetrics

func NewMetrics(reg prometheus.Registerer) *Metrics

NewMetrics creates a new set of Docker target metrics. If reg is non-nil, the metrics will be registered.

type Target

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

Target enables reading Docker container logs.

func NewTarget

func NewTarget(metrics *Metrics, logger log.Logger, handler loki.EntryHandler, position positions.Positions, containerID string, labels model.LabelSet, relabelConfig []*relabel.Config, client client.APIClient) (*Target, error)

NewTarget starts a new target to read logs from a given container ID.

func (*Target) Details

func (t *Target) Details() map[string]string

Details returns target-specific details.

func (*Target) Hash

func (t *Target) Hash() uint64

Hash is used when comparing targets in tasks.

func (*Target) LabelsStr

func (t *Target) LabelsStr() string

LabelsStr returns the target's original labels string representation.

func (*Target) Name

func (t *Target) Name() string

Name reports the container name.

func (*Target) Path

func (t *Target) Path() string

Path returns the target's container name.

func (*Target) Ready

func (t *Target) Ready() bool

Ready reports whether the target is running.

func (*Target) StartIfNotRunning

func (t *Target) StartIfNotRunning()

StartIfNotRunning starts processing container logs. The operation is idempotent , i.e. the processing cannot be started twice.

func (*Target) Stop

func (t *Target) Stop()

Stop shuts down the target.

Jump to

Keyboard shortcuts

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