Documentation
¶
Index ¶
- type AMQPClient
- type Channel
- func (ch *Channel) ConsumeMessageOnce(ctx context.Context, cancelFunc context.CancelFunc, queueName string) error
- func (ch *Channel) GetNewQueue(name string, isDurable bool, isTypeQuoeum bool) (*amqp.Queue, error)
- func (ch *Channel) PublishMessageOnce(ctx context.Context, queueName string, message string) error
- type Client
- type ConnectionQueue
- func (c *ConnectionQueue) GetAMQPChannel(key string) *Channel
- func (c *ConnectionQueue) GetAMQPConnection(key string) *AMQPClient
- func (c *ConnectionQueue) GetClientWithKey(key string) *Client
- func (c *ConnectionQueue) GetHTTPConnection(key string) *HTTPClient
- func (c *ConnectionQueue) SetClientWithKey(key string, client *Client)
- type HTTPClient
- func (c *HTTPClient) GetClassicQueues() ([]rmqhttp.QueueInfo, error)
- func (c *HTTPClient) GetNodeName() (string, error)
- func (c *HTTPClient) GetQueues() ([]rmqhttp.QueueInfo, error)
- func (c *HTTPClient) GetQuorumQueues() ([]rmqhttp.QueueInfo, error)
- func (c *HTTPClient) HasNodeAnyClassicQueue(queues []rmqhttp.QueueInfo, node string) bool
- func (c *HTTPClient) IsAllNodesRunningInCluster(replicas int) (bool, error)
- func (c *HTTPClient) IsNodePrimaryReplica(queues []rmqhttp.QueueInfo, node string) bool
- type KubeDBClientBuilder
- func (o *KubeDBClientBuilder) GetAMQPconnURL(username string, password string, vhost string) string
- func (o *KubeDBClientBuilder) GetHTTPconnURL() string
- func (o *KubeDBClientBuilder) GetRabbitMQClient() (*Client, error)
- func (o *KubeDBClientBuilder) GetVirtualHostFromURL(url string) (vhost string)
- func (o *KubeDBClientBuilder) WithAMQPClientDisabled() *KubeDBClientBuilder
- func (o *KubeDBClientBuilder) WithAMQPURL(url string) *KubeDBClientBuilder
- func (o *KubeDBClientBuilder) WithConnectionName(connName string) *KubeDBClientBuilder
- func (o *KubeDBClientBuilder) WithContext(ctx context.Context) *KubeDBClientBuilder
- func (o *KubeDBClientBuilder) WithHTTPClientEnabled() *KubeDBClientBuilder
- func (o *KubeDBClientBuilder) WithHTTPURL(url string) *KubeDBClientBuilder
- func (o *KubeDBClientBuilder) WithPod(podName string) *KubeDBClientBuilder
- func (o *KubeDBClientBuilder) WithVHost(vhost string) *KubeDBClientBuilder
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
func (*Channel) ConsumeMessageOnce ¶ added in v0.1.0
func (*Channel) GetNewQueue ¶ added in v0.1.0
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
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 (o *KubeDBClientBuilder) WithContext(ctx context.Context) *KubeDBClientBuilder
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
Click to show internal directories.
Click to hide internal directories.