qeclients

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: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Python  AmqpQEClientImpl = iota
	Timeout int              = 60
)

Variables

This section is empty.

Functions

func NewAmqpReceiver

func NewAmqpReceiver(impl AmqpQEClientImpl, name string, ctx framework.ContextData, url string, count int) (amqp.Client, error)

NewAmqpReceiver Builds a very basic Amqp Receiver client using one of the available QE clients.

func NewAmqpSender

func NewAmqpSender(impl AmqpQEClientImpl, name string, ctx framework.ContextData, url string, count int, body string) (amqp.Client, error)

NewAmqpSender Builds a very basic Amqp Sender client using one of the available QE Clients. Message body will be truncated if it exceeds 256 bytes. TODO If Message content (body) is large, create a secret and mount it within the client Pod

Probably something to be done at the "topology setup".

func NewReceiverBuilder

func NewReceiverBuilder(impl AmqpQEClientImpl) amqp.ReceiverBuilder

func NewSenderBuilder

func NewSenderBuilder(impl AmqpQEClientImpl) amqp.SenderBuider

Types

type AmqpClientCommon

type AmqpClientCommon struct {
	Context     framework.ContextData
	Name        string
	Url         string
	Messages    int
	Timeout     int
	Params      []amqp.Param
	Pod         *v1.Pod
	Timedout    bool
	Interrupted bool

	Mutex sync.Mutex
	// contains filtered or unexported fields
}

Common implementation for Clients running in containers

func (*AmqpClientCommon) Deploy

func (a *AmqpClientCommon) Deploy() error

func (*AmqpClientCommon) Interrupt

func (a *AmqpClientCommon) Interrupt()

func (*AmqpClientCommon) Result

func (a *AmqpClientCommon) Result() amqp.ResultData

func (*AmqpClientCommon) Running

func (a *AmqpClientCommon) Running() bool

func (*AmqpClientCommon) Status

func (a *AmqpClientCommon) Status() amqp.ClientStatus

func (*AmqpClientCommon) Wait

Wait Waits for client to complete running (successfully or not), until pre-defined client's timeout.

func (*AmqpClientCommon) WaitFor

func (a *AmqpClientCommon) WaitFor(secs int) amqp.ClientStatus

WaitFor Waits for client to complete running (successfully or not), until given timeout.

func (*AmqpClientCommon) WaitForStatus

func (a *AmqpClientCommon) WaitForStatus(secs int, statuses ...amqp.ClientStatus) amqp.ClientStatus

WaitForStatus Waits till client status matches one of the given statuses or till it times out

type AmqpPythonReceiver

type AmqpPythonReceiver struct {
	AmqpClientCommon
}

AmqpPythonReceiver cli-proton-python-receiver

type AmqpPythonReceiverBuilder

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

AmqpPythonReceiverBuilder can be used to produce a cli-proton-python-receiver

func (*AmqpPythonReceiverBuilder) Build

func (*AmqpPythonReceiverBuilder) Messages

func (*AmqpPythonReceiverBuilder) New

func (*AmqpPythonReceiverBuilder) Param

func (*AmqpPythonReceiverBuilder) Timeout

func (a *AmqpPythonReceiverBuilder) Timeout(timeout int) amqp.ReceiverBuilder

type AmqpPythonSender

type AmqpPythonSender struct {
	AmqpClientCommon
	Content string
}

AmqpPythonSender amqp Client implementation

type AmqpPythonSenderBuilder

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

AmqpPythonSenderBuilder amqp SenderBuilder implementation

func (*AmqpPythonSenderBuilder) Build

func (a *AmqpPythonSenderBuilder) Build() (amqp.Client, error)

func (*AmqpPythonSenderBuilder) MessageContent

func (a *AmqpPythonSenderBuilder) MessageContent(content string) amqp.SenderBuider

func (*AmqpPythonSenderBuilder) Messages

func (a *AmqpPythonSenderBuilder) Messages(count int) amqp.SenderBuider

func (*AmqpPythonSenderBuilder) New

func (*AmqpPythonSenderBuilder) Param

func (a *AmqpPythonSenderBuilder) Param(name string, value string) amqp.SenderBuider

func (*AmqpPythonSenderBuilder) Timeout

func (a *AmqpPythonSenderBuilder) Timeout(timeout int) amqp.SenderBuider

type AmqpQEClientImpl

type AmqpQEClientImpl int

AmqpQEClientImpl specifies the available Amqp QE Clients

type MessageDict

type MessageDict struct {
	Address         string            `json:"address"`
	Annotations     string            `json:"annotations"`
	Content         string            `json:"Content"`
	ContentEncoding string            `json:"content_enconding"`
	ContentType     string            `json:"content_type"`
	CorrelationId   string            `json:"correlation_id"`
	CreationTime    float32           `json:"creation_time"`
	DeliveryCount   int               `json:"delivery_count"`
	Durable         bool              `json:"durable"`
	Expiration      int               `json:"expiration"`
	FirstAcquirer   bool              `json:"first_acquirer"`
	GroupId         string            `json:"group_id"`
	GroupSequence   int               `json:"group_sequence"`
	RouterLink      int               `json:"routerLink"`
	Id              string            `json:"id"`
	Inferred        bool              `json:"inferred"`
	Instructions    string            `json:"instructions"`
	Priority        int               `json:"priority"`
	Properties      map[string]string `json:"properties"`
	ReplyTo         string            `json:"reply_to"`
	ReplyToGroupId  string            `json:"reply_to_group_id"`
	Subject         string            `json:"subject"`
	Ttl             int               `json:"ttl"`
	UserId          string            `json:"user_id"`
}

MessageDict represents a message logged by cli-proton-python as a dictionary

func (MessageDict) ToMessage

func (m MessageDict) ToMessage() amqp.Message

Jump to

Keyboard shortcuts

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