amqp

package module
v0.0.0-...-ef5cc6b Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 11 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New() *Client

func (*Client) Ack

func (self *Client) Ack(id uint64) error

func (*Client) Close

func (self *Client) Close()

func (Client) Closed

func (self Client) Closed() bool

func (*Client) Connect

func (self *Client) Connect() *Client

func (*Client) Consume

func (self *Client) Consume(exchange string, queue string, handler func(amqp091.Delivery))

func (Client) Publish

func (self Client) Publish(exchange string, queue string, body any) Event

type Event

type Event struct {
	ID        string    `json:"id"`
	Body      any       `json:"body"`
	CreatedAt time.Time `json:"created_at"`
}

func (*Event) Decode

func (self *Event) Decode(data []byte) error

func (Event) String

func (self Event) String() string

Jump to

Keyboard shortcuts

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