payload

package
v0.0.0-...-e9fe98c Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2019 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	BuildPayload(message.Message, map[string]interface{}) ([]byte, error)
}

Builder interface describes a payload generator.

type FilePayload

type FilePayload struct {
	TerminateChannel chan struct{}
}

FilePayload implements a Payloader that simply writes to a file.

func (FilePayload) BuildPayload

func (fp FilePayload) BuildPayload(msg message.Message, data map[string]interface{}) ([]byte, error)

BuildPayload uses the default TidePayload.

func (FilePayload) SendPayload

func (fp FilePayload) SendPayload(destination string, payload []byte) ([]byte, error)

SendPayload sends the results to a file.

type Payloader

type Payloader interface {
	Sender
	Builder
}

Payloader interface is used to build and send payloads to endpoints.

type Sender

type Sender interface {
	SendPayload(destination string, payload []byte) ([]byte, error)
}

Sender interface describes a send message to an endpoint.

type TidePayload

type TidePayload struct {
	Client tide.ClientInterface
}

TidePayload implements the Payloader interface to send payloads to the Tide API.

func (TidePayload) BuildPayload

func (t TidePayload) BuildPayload(msg message.Message, data map[string]interface{}) ([]byte, error)

BuildPayload implements payload.Builder interface to generate Tide API payload.

func (TidePayload) SendPayload

func (t TidePayload) SendPayload(destination string, payload []byte) ([]byte, error)

SendPayload sends a payload message to the Tide API.

Jump to

Keyboard shortcuts

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