types

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeHTTPClient

func MakeHTTPClient(insecure bool, maxConnections int, timeout time.Duration) *fasthttp.Client

MakeHTTPClient generates an HTTP Client setting basic properties including timeouts

Types

type Exchange added in v1.0.0

type Exchange struct {
	Name        string
	Topics      []string
	Declare     bool
	Type        string
	Durable     bool
	AutoDeleted bool
}

Exchange Definition of a RabbitMQ Exchange

func (*Exchange) EnsureCorrectType added in v1.0.0

func (e *Exchange) EnsureCorrectType()

EnsureCorrectType is responsible to make sure that the read-in type is one of the allowed which right now is direct or topic. If it is not a valid type, will default to direct.

type Invoker

type Invoker interface {
	Invoke(topic string, invocation *OpenFaaSInvocation) error
}

Invoker is the Interface used by the OpenFaaS Connector SDK to perform invocations of Lambdas based on a provided topic and message

type OpenFaaSInvocation

type OpenFaaSInvocation struct {
	ContentType     string
	ContentEncoding string
	Topic           string
	Message         *[]byte
}

OpenFaaSInvocation represent an Event Specification used during invocation

func NewInvocation

func NewInvocation(delivery amqp.Delivery) *OpenFaaSInvocation

NewInvocation creates a OpenFaaSInvocation from an amqp.Delivery.

type Topology added in v1.0.0

type Topology []struct {
	Name        string   `json:"name"`
	Topics      []string `json:"topics"`
	Declare     bool     `json:"declare"`
	Type        string   `json:"type,omitempty"`
	Durable     bool     `json:"durable,omitempty"`
	AutoDeleted bool     `json:"auto-deleted,omitempty"`
}

Topology definition

func ReadTopologyFromFile added in v1.0.0

func ReadTopologyFromFile(fs afero.Fs, path string) (Topology, error)

ReadTopologyFromFile reads a topology file in yaml format from the specified path. Further it parses the file and returns it already in the Topology struct format.

Jump to

Keyboard shortcuts

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