flux

package
v0.12.5 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleV6

func HandleV6(api API)

HandleV6 Flux events

func HandleWebsocket

func HandleWebsocket(api API)

HandleWebsocket handles Flux WebSocket connections

func ParseFluxEvent

func ParseFluxEvent(reader io.Reader) (flux.Event, error)

ParseFluxEvent for doing flux event from Json into a flux Event struct.

Types

type API

type API struct {
	Server   *http.ServeMux
	Exporter Exporter
	Log      *log.Logger
}

API has the configuration necessary to run a flux API

func NewAPI

func NewAPI(e Exporter, logger *log.Logger) API

NewAPI initialize API configuration

func (*API) Listen

func (a *API) Listen(addr string) error

Listen on addr

type Exporter

type Exporter interface {
	// Send a message through the exporter.
	Send(c context.Context, event flux.Event) error
}

Exporter sends a formatted event to an upstream.

type Message

type Message struct {
	Event flux.Event
}

type ReleaseManagerExporter added in v0.3.0

type ReleaseManagerExporter struct {
	Log         *log.Logger
	Environment string
	Client      httpinternal.Client
}

func (*ReleaseManagerExporter) Send added in v0.3.0

Jump to

Keyboard shortcuts

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