handler

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// PubsubEvents is the CloudEvents Pubsub protocol to pull
	// messages as events.
	Subscription *pubsub.Subscription

	// Processor is the processor to process events.
	Processor processors.Interface

	// Timeout is the timeout for processing each individual event.
	Timeout time.Duration
	// contains filtered or unexported fields
}

Handler pulls Pubsub messages as events and processes them with chain of processors.

func (*Handler) IsAlive added in v0.15.0

func (h *Handler) IsAlive() bool

IsAlive indicates whether the handler is alive.

func (*Handler) Start

func (h *Handler) Start(ctx context.Context, done func(error))

Start starts the handler. done func will be called if the pubsub inbound is closed.

func (*Handler) Stop

func (h *Handler) Stop()

Stop stops the handlers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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