Documentation ¶
Index ¶
- type Client
- func (client *Client) Clear() error
- func (client *Client) Close()
- func (client *Client) Configure() error
- func (client *Client) Enqueue(data []byte) error
- func (client *Client) EnqueueWithKey(data []byte, messageKey string) error
- func (client *Client) ExpireMessages(enabled bool) error
- func (client *Client) FirstIn() ([]byte, error)
- func (client *Client) GetAllMessagesByKey(key string) ([][]byte, error)
- func (client *Client) LastIn() ([]byte, error)
- func (client *Client) Length() ([]byte, error)
- func (client *Client) ListConsumers() ([]byte, error)
- func (client *Client) NewConsumer(address string) error
- func (client *Client) Pop() error
- func (client *Client) RemoveConsumer(address string) error
- func (client *Client) SetExpireMessagesSeconds(sec uint) error
- func (client *Client) Shift() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Host string // i.e 0.0.0.0:5991 PublicKey string //i.e testing.public.pem UDPAddr *net.UDPAddr // address of UDP end point UDPConn *net.UDPConn // UDP connection ParsedPublicKey any // Parsed public key }
Client is the fairyMQ client structure
func (*Client) Configure ¶ added in v0.2.0
Configure configures public key amongst other things. Must run before anything else
func (*Client) EnqueueWithKey ¶ added in v0.2.0
EnqueueWithKey enqueues a new message into queue with a provided key. Keys are not unique
func (*Client) ExpireMessages ¶ added in v0.2.0
ExpireMessages sets whether queue expires messages or not. Default is 7200 seconds
func (*Client) GetAllMessagesByKey ¶ added in v0.2.2
func (*Client) ListConsumers ¶
ListConsumers lists queue consumers
func (*Client) NewConsumer ¶
NewConsumer adds a new consumer
func (*Client) RemoveConsumer ¶
RemoveConsumer removes consumer
func (*Client) SetExpireMessagesSeconds ¶ added in v0.2.0
SetExpireMessagesSeconds sets queue expire messages seconds configuration
Click to show internal directories.
Click to hide internal directories.