Documentation ¶
Index ¶
- func SetDefaultQueueDurability(cfg *Config)
- type Config
- func (c *Config) AmqpUrl() string
- func (c Config) ConsumerTag() string
- func (c Config) DeadLetterExchange() string
- func (c Config) DeadLetterRoutingKey() string
- func (c Config) ExchangeIsAutoDelete() bool
- func (c Config) ExchangeIsDurable() bool
- func (c Config) ExchangeName() string
- func (c Config) ExchangeType() string
- func (c Config) HasDeadLetterExchange() bool
- func (c Config) HasDeadLetterRouting() bool
- func (c Config) HasExchange() bool
- func (c Config) HasMessageTTL() bool
- func (c Config) HasPriority() bool
- func (c Config) IsVerbose() bool
- func (c Config) MessageTTL() int32
- func (c Config) MustDeclareQueue() bool
- func (c Config) PrefetchCount() int
- func (c Config) PrefetchIsGlobal() bool
- func (c Config) Priority() int32
- func (c Config) QueueIsAutoDelete() bool
- func (c Config) QueueIsDurable() bool
- func (c Config) QueueIsExclusive() bool
- func (c Config) QueueIsNoWait() bool
- func (c Config) QueueName() string
- func (c Config) RoutingKeys() []string
- func (c Config) WithDateTime() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultQueueDurability ¶
func SetDefaultQueueDurability(cfg *Config)
SetDefaultQueueDurability sets queue durable to true to keep backwards compatibility
Types ¶
type Config ¶
type Config struct { RabbitMq struct { AmqpUrl string Host string Username string Password string Port string Vhost string Queue string Compression bool Onfailure int Stricfailure bool } Prefetch struct { Count int Global bool } QueueSettings struct { Routingkey []string MessageTTL int DeadLetterExchange string DeadLetterRoutingKey string Priority int Nodeclare bool Durable bool Exclusive bool AutoDelete bool NoWait bool } Exchange struct { Name string Autodelete bool Type string Durable bool } Logs struct { Error string Info string NoDateTime bool Verbose bool } }
func CreateFromString ¶
func LoadAndParse ¶
LoadAndParse creates a new instance of config by parsing the content of teh given file.
func (Config) ConsumerTag ¶
ConsumerTag returns the tag used to identify the consumer.
func (Config) DeadLetterExchange ¶
DeadLetterExchange returns the configured dead letter exchange name.
func (Config) DeadLetterRoutingKey ¶
DeadLetterRoutingKey returns the configured key for the dead letter routing.
func (Config) ExchangeIsAutoDelete ¶
ExchangeIsAutoDelete return whether the exchange should be auto deleted or not.
func (Config) ExchangeIsDurable ¶
ExchangeIsDurable returns whether the exchange should be durable or not.
func (Config) ExchangeName ¶
ExchangeName returns the name of the configured exchange.
func (Config) ExchangeType ¶
ExchangeType checks the configuration and returns the appropriate exchange type.
func (Config) HasDeadLetterExchange ¶
HasDeadLetterExchange checks if a dead letter exchange is configured.
func (Config) HasDeadLetterRouting ¶
HasDeadLetterRouting checks if a dead letter routing key is configured.
func (Config) HasExchange ¶
HasExchange checks if an exchange is configured.
func (Config) HasMessageTTL ¶
HasMessageTTL checks if a message TTL is configured.
func (Config) HasPriority ¶
HasPriority checks if priority is configured
func (Config) MessageTTL ¶
MessageTTL returns the configured message TTL.
func (Config) MustDeclareQueue ¶
MustDeclareQueue return if the consumer should declare the queue or if the queue is expected to be already declared.
func (Config) PrefetchCount ¶
PrefetchCount returns the configured prefetch count of the QoS settings.
func (Config) PrefetchIsGlobal ¶
PrefetchIsGlobal returns if the prefetch count is defined globally for all consumers or locally for just each single consumer.
func (Config) QueueIsAutoDelete ¶
QueueIsAutoDelete checks if queue should be declared 'autoDelete'
func (Config) QueueIsDurable ¶
QueueIsDurable checks if queue should be declared durable. Defaults to true to keep backwards compatibility
func (Config) QueueIsExclusive ¶
QueueIsExclusive checks if queue should be declared exclusive
func (Config) QueueIsNoWait ¶
QueueIsNoWait checks if queue should be declared 'noWait'
func (Config) RoutingKeys ¶
RoutingKeys returns the configured keys for message routing.
func (Config) WithDateTime ¶
WithDateTime checks if log entries should be logged with date and time.