channelprovider

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelProvider

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

ChannelProvider is container for logger and connection pool, has method to get channel.

func NewChannelProvider

func NewChannelProvider(logger *gologger.CustomLogger, username string, password string) *ChannelProvider

NewChannelProvider gives you a new channel provider. It takes the list of servers from "rabbitmq" in config

func NewChannelProviderWithServers

func NewChannelProviderWithServers(logger *gologger.CustomLogger, rabbitMqServers []string, username string, password string) *ChannelProvider

NewChannelProviderWithServers gives you a new channel provider. You have to pass a list of rabbitmq servers.

func (*ChannelProvider) GetChannel

func (cp *ChannelProvider) GetChannel() (*amqp.Channel, error)

GetChannel creates and returns a channel

Jump to

Keyboard shortcuts

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