watcher

package
v0.0.0-...-64e30f5 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DockerFilterContainer = filters.Arg("type", string(docker_events.ContainerEventType))
	DockerFilterStart     = filters.Arg("event", string(docker_events.ActionStart))
	DockerFilterStop      = filters.Arg("event", string(docker_events.ActionStop))
	DockerFilterDie       = filters.Arg("event", string(docker_events.ActionDie))
	DockerFilterKill      = filters.Arg("event", string(docker_events.ActionKill))
	DockerFilterPause     = filters.Arg("event", string(docker_events.ActionPause))
	DockerFilterUnpause   = filters.Arg("event", string(docker_events.ActionUnPause))

	NewDockerFilter = filters.NewArgs
)

https://docs.docker.com/reference/api/engine/version/v1.47/#tag/System/operation/SystemPingHead

Functions

func DockerrFilterContainer

func DockerrFilterContainer(nameOrID string) filters.KeyValuePair

Types

type DirWatcher

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

func NewDirectoryWatcher

func NewDirectoryWatcher(ctx context.Context, dirPath string) *DirWatcher

func (*DirWatcher) Add

func (h *DirWatcher) Add(relPath string) Watcher

func (*DirWatcher) Events

func (h *DirWatcher) Events(_ context.Context) (<-chan Event, <-chan E.NestedError)

type DockerListOptions

type DockerListOptions = docker_events.ListOptions

type DockerWatcher

type DockerWatcher struct {
	logrus.FieldLogger
	// contains filtered or unexported fields
}

func NewDockerWatcher

func NewDockerWatcher(host string) DockerWatcher

func NewDockerWatcherWithClient

func NewDockerWatcherWithClient(client D.Client) DockerWatcher

func (DockerWatcher) Events

func (w DockerWatcher) Events(ctx context.Context) (<-chan Event, <-chan E.NestedError)

func (DockerWatcher) EventsWithOptions

func (w DockerWatcher) EventsWithOptions(ctx context.Context, options DockerListOptions) (<-chan Event, <-chan E.NestedError)

type Event

type Event = events.Event

type Watcher

type Watcher interface {
	Events(ctx context.Context) (<-chan Event, <-chan E.NestedError)
}

func NewConfigFileWatcher

func NewConfigFileWatcher(filename string) Watcher

create a new file watcher for file under ConfigBasePath.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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