process

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	HttpDefaultMethod      = "POST"
	HttpDefaultTimeout     = 120
	HttpDefaultContentType = "text/plain"
)

Variables

View Source
var (
	ErrFail   = errors.New("process failed")
	ErrFatal  = errors.New("process failed with fatal error")
	ErrConfig = errors.New("configuration error")
)

Functions

This section is empty.

Types

type Http added in v0.2.0

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

func NewHttp added in v0.2.0

func NewHttp(config HttpConfig) (*Http, error)

func (*Http) Run added in v0.2.0

type HttpConfig added in v0.2.0

type HttpConfig struct {
	SubscriberUrl string `koanf:"subscriber_url"`
	Method        string `koanf:"method"`
	Timeout       int    `koanf:"timeout"`
	FatalCodes    []int  `koanf:"fatal_codes"`
	ContentType   string `koanf:"content_type"`
}

type Processor

type Processor interface {
	Run(ctx context.Context, msg queue.Message, f transform.TransformationFunc) error
}

func New

func New(config any) (Processor, error)

Jump to

Keyboard shortcuts

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