agent

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg config.Config, store storage.Store, back backend.Backend, logger log.Logger) int

Run executes the agent using the given config and backend. It uses SQS for its internal queues. When the function finishes it returns an exit code of 0 if the agent terminated gracefully, either by receiving a TERM signal or because it passed more time than configured without reading a message.

func RunWithQueues added in v1.1.3

func RunWithQueues(cfg config.Config, store storage.Store, back backend.Backend, statesQueue queue.Writer, jobsQueue AgentQueueReader, logger log.Logger) int

RunWithQueues is like Run but accepts custom queue implementations. The fields config.Config.SQSReader and config.Config.SQSWriter must be zero.

Types

type AgentQueueReader added in v1.1.3

type AgentQueueReader interface {
	queue.Reader
	SetMessageProcessor(queue.MessageProcessor)
}

An AgentQueueReader is a queue.Reader that provides a callback to set a custom message processor.

Jump to

Keyboard shortcuts

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