Documentation ¶
Index ¶
- type AMQPBroker
- func (broker *AMQPBroker) Evacuate()
- func (broker *AMQPBroker) Healthy() bool
- func (broker *AMQPBroker) Initialize(config config.Config, jobManifest *job.Manifest) bool
- func (broker *AMQPBroker) IsRunning() bool
- func (broker *AMQPBroker) PublishMessage(event event.Event) error
- func (broker *AMQPBroker) Start() error
- func (broker *AMQPBroker) Stop() error
- func (broker *AMQPBroker) Teardown()
- type AmqpMessageWrapper
- type Shim
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMQPBroker ¶
type AMQPBroker struct {
// contains filtered or unexported fields
}
AMQPBroker represents the primary natsshim communication instance
func (*AMQPBroker) Evacuate ¶
func (broker *AMQPBroker) Evacuate()
func (*AMQPBroker) Healthy ¶
func (broker *AMQPBroker) Healthy() bool
Healthy checks the health of the broker
func (*AMQPBroker) Initialize ¶
Initialize creates a new natsshim connection
func (*AMQPBroker) IsRunning ¶
func (broker *AMQPBroker) IsRunning() bool
func (*AMQPBroker) PublishMessage ¶
func (broker *AMQPBroker) PublishMessage(event event.Event) error
PublishResult result will publish the worker result to the message queue
func (*AMQPBroker) Start ¶
func (broker *AMQPBroker) Start() error
Start creates a new subscription and executes the messageCallback on new messages
func (*AMQPBroker) Stop ¶
func (broker *AMQPBroker) Stop() error
func (*AMQPBroker) Teardown ¶
func (broker *AMQPBroker) Teardown()
Teardown the natsshim connection and all natsshim services
type AmqpMessageWrapper ¶
type AmqpMessageWrapper struct {
// contains filtered or unexported fields
}
func (AmqpMessageWrapper) GetData ¶
func (wrapper AmqpMessageWrapper) GetData() []byte
type Shim ¶
type Shim interface { // Initial setup for all broker connections and runtime state Initialize(config.Config, *job.Manifest) bool // Initial setup for all broker connections and runtime state Evacuate() // Gracefully disconnect broker from any external resources Teardown() // Start the broker to enable message recieving Start() error // Rreturn true if the broker is currently active (if Start was called) IsRunning() bool // Stop message recieving, while still keeping open fundamental connections to external resources Stop() error // Healthcheck to verify that the broker is not stuck. This will restart the container if it fails and healthchecks are set up correctly Healthy() bool // Publish new message to broker. This is used for chaining events. PublishMessage(event.Event) error }
Click to show internal directories.
Click to hide internal directories.