cloudevents

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTokenFilter

func NewTokenFilter(config TokenFilterConfig) libHTTP.Filter

NewTokenFilter returns a component that implements the http.Filter interface and can conditionally allow or disallow a request on the basis of a recognized token having been provided.

Types

type Service

type Service interface {
	// Handle handles a CloudEvent.
	Handle(context.Context, cloudEvents.Event) error
}

Service is an interface for components that can handle CloudEvents. Implementations of this interface are transport-agnostic.

func NewService

func NewService(eventsClient core.EventsClient) Service

NewService returns an implementation of the Service interface for handling CloudEvents.

type TokenFilterConfig

type TokenFilterConfig interface {
	// AddToken adds a token to the TokenFilterConfig instance's internal map of
	// sources to tokens. It hashes the token as it does this so that plain text
	// tokens do not float around in memory long-term.
	AddToken(source, token string)
	// contains filtered or unexported methods
}

func NewTokenFilterConfig

func NewTokenFilterConfig() TokenFilterConfig

Jump to

Keyboard shortcuts

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