whalefriend

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package whalefriend implements a containerizer.Containerizer that discovers containers from container engines supported by the @thediveo/whalewatcher module, such as Docker and containerd (moby & friends).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, watchers []watcher.Watcher, opts ...Option) containerizer.Containerizer

New returns a new containerizer.Containerizer using the specified set of container watchers. This also spins up the watchers to constantly watch in the background for any signs of container life and death.

The following options are supported:

  • WithWorkers set the maximum of concurrent workers used when querying the container workload.

Types

type Option added in v0.22.0

type Option func(c *WhaleFriend)

Option represents a function able to set a particular WhaleFriend option state.

func WithWorkers added in v0.22.0

func WithWorkers(num uint) Option

WithWorkers sets the maximum number of workers for querying workload containers from multiple container engines concurrently.

type WhaleFriend

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

WhaleFriend is a containerizer internally backed by one or more Whalewatchers, that is, watcher.Watcher container observers.

func (*WhaleFriend) Close

func (c *WhaleFriend) Close()

Close closes all watcher resources associated with this WhaleFriend.

func (*WhaleFriend) Containers

func (c *WhaleFriend) Containers(
	ctx context.Context, procs model.ProcessTable, pidmap model.PIDMapper,
) []*model.Container

Containers returns the current container state of (alive) containers from all assigned whale watchers.

Jump to

Keyboard shortcuts

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