Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MqModule = fx.Provide( func(ap mfx.AppParams, i MQImplementations) (out MessageQueueResult, err error) { deployment := utility.ParseDeployments(ap.Deployment) err = out.Execute(deployment, i) return }, )
View Source
var NatsModule = fx.Provide( func(l *zap.Logger, s SettingsParams) (out NatsResult, err error) { err = out.Execute(l, s) return }, )
View Source
var SettingModule = fx.Provide( func() (out SettingsResult, err error) { err = out.LoadFromEnv() return }, )
Functions ¶
func NewNatsMessageQueue ¶
For CLI testing purposes
Types ¶
type MQImplementations ¶
type MQImplementations struct { fx.In NatsMQ miface.MessageQueue `name:"NatsMQ" optional:"true"` KafkaMQ miface.MessageQueue `name:"KafkaMQ" optional:"true"` NsqMQ miface.MessageQueue `name:"NsqMQ" optional:"true"` LocalMQ miface.MessageQueue `name:"LocalMQ" optional:"true"` }
type MessageQueueParams ¶
type MessageQueueParams struct { fx.In MessageQueue miface.MessageQueue `name:"MessageQueue"` }
type MessageQueueResult ¶
type MessageQueueResult struct { fx.Out MessageQueue miface.MessageQueue `name:"MessageQueue"` }
func (*MessageQueueResult) Execute ¶
func (g *MessageQueueResult) Execute(deploy utility.Deployments, i MQImplementations) (err error)
type NatsResult ¶
type NatsResult struct { fx.Out NatsMQ miface.MessageQueue `name:"NatsMQ"` }
func (*NatsResult) Execute ¶
func (k *NatsResult) Execute(logger *zap.Logger, s SettingsParams) (err error)
type SettingsParams ¶
type SettingsResult ¶
type SettingsResult struct { fx.Out NatsUrl string `name:"NatsUrl" envconfig:"NATS_URL" default:"nats://localhost:4222"` }
func (*SettingsResult) LoadFromEnv ¶
func (ar *SettingsResult) LoadFromEnv() (err error)
Click to show internal directories.
Click to hide internal directories.