Documentation ¶
Index ¶
- Constants
- func NewAmqpReceiver(impl AmqpQEClientImpl, name string, ctx framework.ContextData, url string, ...) (amqp.Client, error)
- func NewAmqpSender(impl AmqpQEClientImpl, name string, ctx framework.ContextData, url string, ...) (amqp.Client, error)
- func NewReceiverBuilder(impl AmqpQEClientImpl) amqp.ReceiverBuilder
- func NewSenderBuilder(impl AmqpQEClientImpl) amqp.SenderBuider
- type AmqpClientCommon
- func (a *AmqpClientCommon) Deploy() error
- func (a *AmqpClientCommon) Interrupt()
- func (a *AmqpClientCommon) Result() amqp.ResultData
- func (a *AmqpClientCommon) Running() bool
- func (a *AmqpClientCommon) Status() amqp.ClientStatus
- func (a *AmqpClientCommon) Wait() amqp.ClientStatus
- func (a *AmqpClientCommon) WaitFor(secs int) amqp.ClientStatus
- func (a *AmqpClientCommon) WaitForStatus(secs int, statuses ...amqp.ClientStatus) amqp.ClientStatus
- type AmqpPythonReceiver
- type AmqpPythonReceiverBuilder
- func (a *AmqpPythonReceiverBuilder) Build() (amqp.Client, error)
- func (a *AmqpPythonReceiverBuilder) Messages(count int) amqp.ReceiverBuilder
- func (a *AmqpPythonReceiverBuilder) New(name string, data framework.ContextData, url string) amqp.ReceiverBuilder
- func (a *AmqpPythonReceiverBuilder) Param(name string, value string) amqp.ReceiverBuilder
- func (a *AmqpPythonReceiverBuilder) Timeout(timeout int) amqp.ReceiverBuilder
- type AmqpPythonSender
- type AmqpPythonSenderBuilder
- func (a *AmqpPythonSenderBuilder) Build() (amqp.Client, error)
- func (a *AmqpPythonSenderBuilder) MessageContent(content string) amqp.SenderBuider
- func (a *AmqpPythonSenderBuilder) Messages(count int) amqp.SenderBuider
- func (a *AmqpPythonSenderBuilder) New(name string, data framework.ContextData, url string) amqp.SenderBuider
- func (a *AmqpPythonSenderBuilder) Param(name string, value string) amqp.SenderBuider
- func (a *AmqpPythonSenderBuilder) Timeout(timeout int) amqp.SenderBuider
- type AmqpQEClientImpl
- type MessageDict
Constants ¶
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 ¶
func (a *AmqpClientCommon) Wait() amqp.ClientStatus
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 (a *AmqpPythonReceiverBuilder) Build() (amqp.Client, error)
func (*AmqpPythonReceiverBuilder) Messages ¶
func (a *AmqpPythonReceiverBuilder) Messages(count int) amqp.ReceiverBuilder
func (*AmqpPythonReceiverBuilder) New ¶
func (a *AmqpPythonReceiverBuilder) New(name string, data framework.ContextData, url string) amqp.ReceiverBuilder
func (*AmqpPythonReceiverBuilder) Param ¶
func (a *AmqpPythonReceiverBuilder) Param(name string, value string) amqp.ReceiverBuilder
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 (a *AmqpPythonSenderBuilder) New(name string, data framework.ContextData, url string) amqp.SenderBuider
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