service

package
v0.0.0-...-1ecf039 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2022 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Nsq struct {
		Address string
	}
	Producer struct {
		Address string
	}
}

Config is everything that this service needs to work.

type Dependencies

type Dependencies struct {
	ImageProvider providers.ImageProvider
	SendProvider  providers.SendProvider
	Logger        zerolog.Logger
}

Dependencies are providers which this service operates with.

type Path

type Path struct {
	Path string `json:"path"`
}

Path is a single path of an image to process.

type Paths

type Paths struct {
	Paths []Path `json:"paths"`
}

Paths is a batch of paths to process.

type Service

type Service interface {
	Run(ctx context.Context) error
}

Service interface defines a service which can Run something.

func New

func New(cfg Config, deps Dependencies) Service

New creates a new service will all its needed configuration.

Jump to

Keyboard shortcuts

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