receiver

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executable

type Executable interface {
	Exec(context.Context, []byte) error
}

Executable provides Exec method for action.

type HTTPAction

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

HTTPAction implements action for HTTP.

func NewHTTPAction

func NewHTTPAction(header http.Header, method, url string) *HTTPAction

NewHTTPAction returns a new http action.

func (*HTTPAction) Exec

func (a *HTTPAction) Exec(ctx context.Context, payload []byte) error

Exec executes pubsub action.

type Subscriber

type Subscriber interface {
	Subscribe(ctx context.Context, subscription string, fn func(context.Context, []byte) bool) error
}

Subscriber provides pubsub subscriber.

func New

func New(ctx context.Context) (Subscriber, error)

New returns Subscriber.

Jump to

Keyboard shortcuts

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