Documentation
¶
Index ¶
- type AMQP
- type AMQPEndpoint
- type Config
- func (c Config) CommandAMQP() (AMQP, error)
- func (c Config) CompletionAMQP() (AMQP, error)
- func (c Config) GetDockerConfig() entity.DockerConfig
- func (c Config) GetLogger() (*logrus.Logger, error)
- func (c Config) GetRestConfig() entity.RestConfig
- func (c Config) GetVolumeConfig() command.VolumeConfig
- type Consume
- type Publish
- type Queue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMQP ¶
type AMQP struct { //QueueName the name of the queue to connect to QueueName string //Queue is the configuration for the queue Queue Queue //Consume is the configuration of the consumer Consume Consume //Publish is the configuration for the publishing of messages Publish Publish Endpoint AMQPEndpoint }
AMQP is the configuration for AMQP
type AMQPEndpoint ¶
type AMQPEndpoint struct { QueueProtocol string `mapstructure:"queueProtocol"` QueueUser string `mapstructure:"queueUser"` QueuePassword string `mapstructure:"queuePassword"` QueueHost string `mapstructure:"queueHost"` QueuePort int `mapstructure:"queuePort"` QueueVHost string `mapstructure:"queueVHost"` }
AMQPEndpoint is the configuration needed to connect to a rabbitmq vhost
func GetAMQPEndpoint ¶
func GetAMQPEndpoint() (AMQPEndpoint, error)
GetAMQPEndpoint gets AMQPEndpoint from the values in viper
type Config ¶
type Config struct { MaxMessageRetries int64 `mapstructure:"maxMessageRetries"` QueueMaxConcurrency int64 `mapstructure:"queueMaxConcurrency"` CompletionQueueName string `mapstructure:"completionQueueName"` CommandQueueName string `mapstructure:"commandQueueName"` DockerCACertPath string `mapstructure:"dockerCACertPath"` DockerCertPath string `mapstructure:"dockerCertPath"` DockerKeyPath string `mapstructure:"dockerKeyPath"` //LocalMode indicates that Genesis is operating in standalone mode LocalMode bool `mapstructure:"localMode"` VolumeDriver string `mapstructure:"volumeDriver"` VolumeDriverOpts map[string]string `mapstructure:"volumeDriverOpts"` Verbosity string `mapstructure:"verbosity"` Listen string `mapstructure:"listen"` }
Config groups all of the global configuration parameters into a single struct
func (Config) CommandAMQP ¶
CommandAMQP gets the AMQP for the command queue
func (Config) CompletionAMQP ¶
CompletionAMQP gets the AMQP for the completion queue
func (Config) GetDockerConfig ¶
func (c Config) GetDockerConfig() entity.DockerConfig
GetDockerConfig extracts the fields of this object representing DockerConfig
func (Config) GetRestConfig ¶
func (c Config) GetRestConfig() entity.RestConfig
GetRestConfig extracts the fields of this object representing RestConfig
func (Config) GetVolumeConfig ¶
func (c Config) GetVolumeConfig() command.VolumeConfig
GetVolumeConfig extracts the fields of this object representing VolumeConfig
type Consume ¶
type Consume struct { //Consumer is the name of the consumer Consumer string `mapstructure:"consumer"` //AutoAck causes the server to acknowledge deliveries to this consumer prior to writing the delivery to the network AutoAck bool //Exclusive: when true, the server will ensure that this is the sole consumer from this queue //This should always be false. Exclusive bool //NoLocal is not supported by RabbitMQ NoLocal bool //NoWait: do not wait for the server to confirm the request and immediately begin deliveries NoWait bool `mapstructure:"consumerNoWait"` //Args contains addition arguments to be provided Args amqp.Table }
Consume is the configuration of the consumer of messages from the queue
func GetConsume ¶
GetConsume gets Consume from the values in viper
type Publish ¶
type Publish struct { Mandatory bool `mapstructure:"publishMandatory"` Immediate bool `mapstructure:"publishImmediate"` Exchange string `mapstructure:"exchange"` }
Publish is the configuration for the publishing of messages
func GetPublish ¶
GetPublish gets Publish from the values in viper
type Queue ¶
type Queue struct { //Durable sets the queue to be persistent Durable bool `mapstructure:"queueDurable"` //AutoDelete tells the queue to drop messages if there are not any consumers AutoDelete bool `mapstructure:"queueAutoDelete"` //Exclusive queues are only accessible by the connection that declares them Exclusive bool //NoWait is true, the queue will assume to be declared on the server NoWait bool //Args contains addition arguments to be provided Args amqp.Table }
Queue is the configuration of the queue to be created if the queue does not yet exist