Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) Ack(m *Message) error
- func (c *Client) Begin() *Transaction
- func (c *Client) BeginWithError(ctx context.Context) (*Transaction, error)
- func (c *Client) Disconnect() error
- func (c *Client) Nack(m *Message) error
- func (c *Client) Send(destination, contentType string, body []byte, opts *SendOptions) (err error)
- func (c *Client) Server() string
- func (c *Client) Session() string
- func (c *Client) Subscribe(destination string, opts *SubscribeOptions) (*Subscription, error)
- type Listener
- type ListenerError
- type Message
- type Options
- type RootModule
- type SendOptions
- type StatsReadWriteClose
- type Stomp
- type SubscribeOptions
- type Subscription
- type Transaction
- type VerboseReadWriteClose
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotConnected = errors.New("not connected")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the Stomp conn wrapper.
func (*Client) BeginWithError ¶
func (c *Client) BeginWithError(ctx context.Context) (*Transaction, error)
BeginWithError is used to start a transaction, but also returns the error.
func (*Client) Disconnect ¶
Disconnect will disconnect from the STOMP server.
func (*Client) Send ¶
func (c *Client) Send(destination, contentType string, body []byte, opts *SendOptions) (err error)
Send sends a message to the STOMP server.
func (*Client) Subscribe ¶
func (c *Client) Subscribe(destination string, opts *SubscribeOptions) (*Subscription, error)
Subscribe creates a subscription on the STOMP server.
type Message ¶
type Message struct { *stomp.Message Subscription *Subscription // contains filtered or unexported fields }
Message is a decorator to add string and json methods
type Options ¶
type Options struct { Addr string Protocol string Path string Query string Timeout string TLS bool Headers map[string]string Host string User string Pass string MessageSendTimeout string ReceiptTimeout string Heartbeat struct { Incoming string Outgoing string } ReadBufferSize int ReadChannelCapacity int WriteBufferSize int WriteChannelCapacity int Verbose bool InsecureSkipTLSVerify bool }
type RootModule ¶
type RootModule struct{}
func New ¶
func New() *RootModule
func (*RootModule) NewModuleInstance ¶
func (*RootModule) NewModuleInstance(vu modules.VU) modules.Instance
type SendOptions ¶
type StatsReadWriteClose ¶
type StatsReadWriteClose struct { io.ReadWriteCloser // contains filtered or unexported fields }
type Stomp ¶
type Stomp struct {
// contains filtered or unexported fields
}
Stomp is the k6 extension for a Stomp client.
type SubscribeOptions ¶
type Subscription ¶
type Subscription struct { *stomp.Subscription // contains filtered or unexported fields }
func NewSubscription ¶
func NewSubscription(client *Client, sc *stomp.Subscription, listener Listener, listenerError ListenerError) *Subscription
func (*Subscription) Continue ¶ added in v0.0.25
func (s *Subscription) Continue() error
func (*Subscription) Read ¶
func (s *Subscription) Read() (msg *Message, err error)
func (*Subscription) Unsubscribe ¶
func (s *Subscription) Unsubscribe(opts ...func(*frame.Frame) error) error
type Transaction ¶
type Transaction struct { *stomp.Transaction // contains filtered or unexported fields }
func (*Transaction) Ack ¶
func (tx *Transaction) Ack(m *Message) error
func (*Transaction) Nack ¶
func (tx *Transaction) Nack(m *Message) error
func (*Transaction) Send ¶
func (tx *Transaction) Send(destination, contentType string, body []byte, opts *SendOptions) (err error)
type VerboseReadWriteClose ¶
type VerboseReadWriteClose struct {
io.ReadWriteCloser
}
Click to show internal directories.
Click to hide internal directories.