cmd

package
v0.0.0-...-8220668 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute - Execute goamt, returning any errors raised during the operation of the chosen sub-command.

Types

type Pool

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

Pool - Worker pool which concurrently updates/transcodes entries (depending on which constructor is used).

func NewTranscodePool

func NewTranscodePool(db *database.Database) *Pool

NewTranscodePool - Create a new worker pool which will transcode entries from the provided database.

func NewUpdatePool

func NewUpdatePool(db *database.Database) *Pool

NewUpdatePool - Create a new worker pool which will hash and upsert entries into the provided database.

func (*Pool) Start

func (p *Pool) Start(ctx context.Context, threads int) (chan<- value.Entry, <-chan error)

Start - Spawn 'threads' number of workers to process entries queued in the returned entry channel.

func (*Pool) Stop

func (p *Pool) Stop() error

Stop - Gracefully stop the worker pool, draining 'entryStream' in the event that the user interrupted goamt during the convert/update/transcode sub-command.

Jump to

Keyboard shortcuts

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