executor

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecutePipe

func ExecutePipe(execute ExecutionFunc, encode EncoderFunc, input io.Reader, output io.Writer) error

func GetListEncoderTypes

func GetListEncoderTypes() []string

func IsValidEncoderType

func IsValidEncoderType(encodeType string) bool

Types

type EncoderFunc

type EncoderFunc func(w io.Writer, img image.Image) error
var DefaultEncoder EncoderFunc = png.Encode

type ExecutionFunc

type ExecutionFunc func(image image.Image) (image.Image, error)

func ChainExecutions

func ChainExecutions(executions ...ExecutionFunc) ExecutionFunc

ChainExecutions create ExecutionFunc that execute all executions one by one. If one of executions returns error result ExecutionFunc stops execution and return error

type Executor

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

func NewExecutor

func NewExecutor(settings dto.ExecutorSettings, executionFunc ExecutionFunc) *Executor

NewExecutor creates Executor with settings and execution func. All args should be valid!

func (*Executor) Execute

func (e *Executor) Execute() error

Jump to

Keyboard shortcuts

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