drivers

package
v0.0.0-...-cae10da Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	// Send takes at least a Payload and Route, returning the id of the message, error on fail
	Send(payload string, route []string) (string, error)
	// Recv takes a set of receive options, returning an array of events, error on fail
	Recv(receiveopts *pipes.ReceiveOptions) ([]*messages.Event, error)
	// Ack takes an id and a step, returning error on fail
	Ack(id, step string) error
	// Complete takes an id and a step, return error on fail
	Complete(id, step string) error
	// AppendLog takes an id, step, code, and message, returning error on fail
	AppendLog(id, step string, code int32, message string) error
	// AddStepsAfter takes an id, step, and set of new steps, returning error on fail
	AddStepsAfter(id, after string, steps []string) error
	// Decorate takes an id and set of set of decorations, returning error on fail
	Decorate(id string, decorations []*pipes.Decoration) []error
	// GetDecorations takes an id and set of keys, returning the decorations for each key (null on no-key)
	GetDecorations(id string, keys []string) ([]*pipes.Decoration, error)
}

type GRPCDriver

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

func NewGRPCDriver

func NewGRPCDriver(url, apikey string) *GRPCDriver

func (GRPCDriver) Ack

func (d GRPCDriver) Ack(id, step string) error

Ack takes an id and a step, returning error on fail

func (GRPCDriver) AddStepsAfter

func (d GRPCDriver) AddStepsAfter(id, after string, steps []string) error

AddStepsAfter takes an id, step, and set of new steps, returning error on fail

func (GRPCDriver) AppendLog

func (d GRPCDriver) AppendLog(id, step string, code int32, message string) error

AppendLog takes an id, step, code, and message, returning error on fail

func (GRPCDriver) Complete

func (d GRPCDriver) Complete(id, step string) error

Complete takes an id and a step, return error on fail

func (GRPCDriver) Decorate

func (d GRPCDriver) Decorate(id string, decorations []*pipes.Decoration) []error

Decorate takes an id and set of set of decorations, returning error on fail

func (GRPCDriver) GetDecorations

func (d GRPCDriver) GetDecorations(id string, keys []string) ([]*pipes.Decoration, error)

GetDecorations takes an id and set of keys, returning the decorations for each key (null on no-key)

func (GRPCDriver) Recv

func (d GRPCDriver) Recv(receiveopts *pipes.ReceiveOptions) ([]*messages.Event, error)

Recv takes a set of receive options, returning an array of events, error on fail

func (GRPCDriver) Send

func (d GRPCDriver) Send(payload string, route []string) (string, error)

Send takes at least a Payload and Route, returning the id of the message, error on fail

type HTTPDriver

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

func NewHTTPDriver

func NewHTTPDriver(url, apikey string) *HTTPDriver

func (HTTPDriver) Ack

func (d HTTPDriver) Ack(id, step string) error

Ack takes an id and a step, returning error on fail

func (HTTPDriver) AddStepsAfter

func (d HTTPDriver) AddStepsAfter(id, after string, steps []string) error

AddStepsAfter takes an id, step, and set of new steps, returning error on fail

func (HTTPDriver) AppendLog

func (d HTTPDriver) AppendLog(id, step string, code int32, message string) error

AppendLog takes an id, step, code, and message, returning error on fail

func (HTTPDriver) Complete

func (d HTTPDriver) Complete(id, step string) error

Complete takes an id and a step, return error on fail

func (HTTPDriver) Decorate

func (d HTTPDriver) Decorate(id string, decorations []*pipes.Decoration) []error

Decorate takes an id and set of set of decorations, returning error on fail

func (HTTPDriver) GetDecorations

func (d HTTPDriver) GetDecorations(id string, keys []string) ([]*pipes.Decoration, error)

GetDecorations takes an id and set of keys, returning the decorations for each key (null on no-key)

func (HTTPDriver) Recv

func (d HTTPDriver) Recv(receiveopts *pipes.ReceiveOptions) ([]*messages.Event, error)

func (HTTPDriver) Send

func (d HTTPDriver) Send(payload string, route []string) (string, error)

type HTTPResponse

type HTTPResponse struct {
	Topic  string `json:"topic"`
	Text   string `json:"text"`
	Status int    `json:"status"`
}

type HTTPResponses

type HTTPResponses []HTTPResponse

Jump to

Keyboard shortcuts

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