amqp

package
v0.0.0-...-c3f992c Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeoutDefaultSecs   int           = 60
	TimeoutInterruptSecs int           = 60
	Poll                 time.Duration = time.Duration(2) * time.Second
)

Variables

This section is empty.

Functions

func ClientStatusIn

func ClientStatusIn(status ClientStatus, statuses ...ClientStatus) bool

ClientStatusIn returns true if the given "status" is present in the status slice

Types

type Client

type Client interface {
	Deploy() error
	Status() ClientStatus
	Running() bool
	Interrupt()
	Wait() ClientStatus
	Result() ResultData
}

type ClientStatus

type ClientStatus int
const (
	Starting ClientStatus = iota
	Running
	Success
	Error
	Timeout
	Interrupted
	Unknown
)

type Message

type Message struct {
	Address       string
	Content       string
	ContentSHA1   string
	Id            string
	CorrelationId string
	ReplyTo       string
	Expiration    int
	Priority      int
	Ttl           int
	UserId        string
}

type Param

type Param struct {
	Name, Value string
}

Data types for AMQP clients

type ReceiverBuilder

type ReceiverBuilder interface {
	New(name string, data framework.ContextData, url string) ReceiverBuilder
	Messages(count int) ReceiverBuilder
	Timeout(timeout int) ReceiverBuilder
	Param(name string, value string) ReceiverBuilder
	Build() (Client, error)
}

ReceiverBuilder minimalist sample builder for AMQP Receivers

type ResultData

type ResultData struct {
	Messages  []Message
	Delivered int
	Released  int
	Modified  int
}

type SenderBuider

type SenderBuider interface {
	New(name string, data framework.ContextData, url string) SenderBuider
	Messages(count int) SenderBuider
	Timeout(timeout int) SenderBuider
	Param(name string, value string) SenderBuider
	MessageContent(content string) SenderBuider
	Build() (Client, error)
}

SenderBuilder minimalist sample builder for AMQP Senders

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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