imageworker

package
v0.0.0-...-a903c70 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

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

Worker implements Observer[string] to receive Docker image names from Observables. The received images are added to a queue for processing. Items in the queue is read by one or more worker go-routings when the Worker is started, and the handler.Handle is called with the gived image name

func New

func New(handler handler.Handler) *Worker

New returns a new Worker

func (*Worker) Receive

func (w *Worker) Receive(obj observe.ImageInfo)

Receive implementation of Observer

func (*Worker) Start

func (w *Worker) Start(workers uint, stop <-chan struct{}) error

Start the worker in its own goroutine

Jump to

Keyboard shortcuts

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