processor

package
v0.0.0-...-c23655e Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProcessorProvider

func NewProcessorProvider(cfg Config, deps Dependencies) (providers.ProcessorProvider, error)

NewProcessorProvider creates a new processor provider with an active grpc connection.

Types

type Config

type Config struct {
	FaceRecognitionAddress string
}

Config needed for the processor.

type Dependencies

type Dependencies struct {
	Logger         zerolog.Logger
	CircuitBreaker circuitbreaker.CircuitBreaker
	Storer         providers.ImageStorer
}

Dependencies of the processor provider.

type Processor

type Processor struct {
	Dependencies
	Config
	IdentifyClient    facerecog.IdentifyClient
	HealthCheckClient facerecog.HealthCheckClient
}

Processor defines a processor which uses a real database to store and process data.

func (*Processor) ProcessImages

func (p *Processor) ProcessImages(ctx context.Context, in chan int) error

ProcessImages takes a channel for input and waits on that channel for processable items. This channel must never be closed.

Jump to

Keyboard shortcuts

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