httpbackend

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultClientTimeoutSec = 30

DefaultClientTimeoutSec defines a default timeout in seconds for our http client

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

Backend notifies about a job completion by executing an HTTP request.

func (*Backend) DeliveryReports

func (b *Backend) DeliveryReports() <-chan job.Callback

DeliveryReports returns a channel of successfully emmited callbacks. Failures are returned directly by Notify() as errors.

func (*Backend) ID

func (b *Backend) ID() string

ID returns "http"

func (*Backend) Notify

func (b *Backend) Notify(url string, cbInfo job.Callback) error

Notify notifies a url about a job completion denoted by cbInfo.

func (*Backend) Start

func (b *Backend) Start(ctx context.Context, cfg map[string]interface{}) error

Start starts the backend based on configuration provided by cfg.

func (*Backend) Stop

func (b *Backend) Stop() error

Stop shuts down the backend

Jump to

Keyboard shortcuts

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