rabbitmq

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AMQPClient added in v0.1.0

type AMQPClient struct {
	*amqp.Connection
}

func (*AMQPClient) GetMessagingChannel added in v0.1.0

func (c *AMQPClient) GetMessagingChannel() *Channel

type Channel added in v0.1.0

type Channel struct {
	*amqp.Channel
}

func (*Channel) ConsumeMessageOnce added in v0.1.0

func (ch *Channel) ConsumeMessageOnce(ctx context.Context, cancelFunc context.CancelFunc, queueName string) error

func (*Channel) GetNewQueue added in v0.1.0

func (ch *Channel) GetNewQueue(name string, isDurable bool, isTypeQuoeum bool) (*amqp.Queue, error)

func (*Channel) PublishMessageOnce added in v0.1.0

func (ch *Channel) PublishMessageOnce(ctx context.Context, queueName string, message string) error

type Client

type Client struct {
	AMQPClient
	HTTPClient
	Channel
}

type ConnectionQueue added in v0.5.0

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

func NewConnectionQueue added in v0.5.0

func NewConnectionQueue() *ConnectionQueue

func (*ConnectionQueue) GetAMQPChannel added in v0.5.0

func (c *ConnectionQueue) GetAMQPChannel(key string) *Channel

func (*ConnectionQueue) GetAMQPConnection added in v0.5.0

func (c *ConnectionQueue) GetAMQPConnection(key string) *AMQPClient

func (*ConnectionQueue) GetClientWithKey added in v0.5.0

func (c *ConnectionQueue) GetClientWithKey(key string) *Client

func (*ConnectionQueue) GetHTTPConnection added in v0.5.0

func (c *ConnectionQueue) GetHTTPConnection(key string) *HTTPClient

func (*ConnectionQueue) SetClientWithKey added in v0.5.0

func (c *ConnectionQueue) SetClientWithKey(key string, client *Client)

type HTTPClient added in v0.1.0

type HTTPClient struct {
	*rmqhttp.Client
}

func (*HTTPClient) GetClassicQueues added in v0.1.0

func (c *HTTPClient) GetClassicQueues() ([]rmqhttp.QueueInfo, error)

func (*HTTPClient) GetNodeName added in v0.1.1

func (c *HTTPClient) GetNodeName() (string, error)

func (*HTTPClient) GetQueues added in v0.1.0

func (c *HTTPClient) GetQueues() ([]rmqhttp.QueueInfo, error)

func (*HTTPClient) GetQuorumQueues added in v0.1.0

func (c *HTTPClient) GetQuorumQueues() ([]rmqhttp.QueueInfo, error)

func (*HTTPClient) HasNodeAnyClassicQueue added in v0.1.0

func (c *HTTPClient) HasNodeAnyClassicQueue(queues []rmqhttp.QueueInfo, node string) bool

func (*HTTPClient) IsAllNodesRunningInCluster added in v0.1.0

func (c *HTTPClient) IsAllNodesRunningInCluster(replicas int) (bool, error)

func (*HTTPClient) IsNodePrimaryReplica added in v0.1.0

func (c *HTTPClient) IsNodePrimaryReplica(queues []rmqhttp.QueueInfo, node string) bool

type KubeDBClientBuilder

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

func NewKubeDBClientBuilder

func NewKubeDBClientBuilder(kc client.Client, db *olddbapi.RabbitMQ) *KubeDBClientBuilder

NewKubeDBClientBuilder returns a client builder only for amqp client

func NewKubeDBClientBuilderForHTTP added in v0.1.1

func NewKubeDBClientBuilderForHTTP(kc client.Client, db *olddbapi.RabbitMQ) *KubeDBClientBuilder

NewKubeDBClientBuilderForHTTP returns a KubeDB client builder only for http client

func (*KubeDBClientBuilder) GetAMQPconnURL

func (o *KubeDBClientBuilder) GetAMQPconnURL(username string, password string, vhost string) string

func (*KubeDBClientBuilder) GetHTTPconnURL added in v0.1.0

func (o *KubeDBClientBuilder) GetHTTPconnURL() string

func (*KubeDBClientBuilder) GetRabbitMQClient

func (o *KubeDBClientBuilder) GetRabbitMQClient() (*Client, error)

func (*KubeDBClientBuilder) GetVirtualHostFromURL added in v0.1.0

func (o *KubeDBClientBuilder) GetVirtualHostFromURL(url string) (vhost string)

RabbitMQ server have a default virtual host "/" for custom vhost, it must be appended at the end of the url separated by "/"

func (*KubeDBClientBuilder) WithAMQPClientDisabled added in v0.1.0

func (o *KubeDBClientBuilder) WithAMQPClientDisabled() *KubeDBClientBuilder

func (*KubeDBClientBuilder) WithAMQPURL added in v0.1.0

func (o *KubeDBClientBuilder) WithAMQPURL(url string) *KubeDBClientBuilder

func (*KubeDBClientBuilder) WithConnectionName added in v0.5.0

func (o *KubeDBClientBuilder) WithConnectionName(connName string) *KubeDBClientBuilder

func (*KubeDBClientBuilder) WithContext

func (*KubeDBClientBuilder) WithHTTPClientEnabled added in v0.1.0

func (o *KubeDBClientBuilder) WithHTTPClientEnabled() *KubeDBClientBuilder

func (*KubeDBClientBuilder) WithHTTPURL added in v0.1.0

func (o *KubeDBClientBuilder) WithHTTPURL(url string) *KubeDBClientBuilder

func (*KubeDBClientBuilder) WithPod

func (o *KubeDBClientBuilder) WithPod(podName string) *KubeDBClientBuilder

func (*KubeDBClientBuilder) WithVHost added in v0.1.0

func (o *KubeDBClientBuilder) WithVHost(vhost string) *KubeDBClientBuilder

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳