Documentation ¶
Index ¶
Constants ¶
const DefaultAgentNamePrefix = "serverless-agent"
DefaultAgentNamePrefix serverless agent name prefix used when registering the agent
const DefaultAgentPoolSize = 5
DefaultAgentPoolSize default agent size if one is not specified
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionFunc ¶
type ActionFunc func(agentInstance *AgentInstance, resultsChan chan *AgentResult)
ActionFunc async agent action function
type AgentInstance ¶
type AgentInstance struct {
// contains filtered or unexported fields
}
AgentInstance instance of the serverless agent
func NewAgentInstance ¶
func NewAgentInstance(cfg *config.Config, index int, tags []string) *AgentInstance
NewAgentInstance create a new agent instance
func (AgentInstance) ConfigKey ¶
func (ai AgentInstance) ConfigKey() string
ConfigKey return the key used to store the agent instances configuration
func (AgentInstance) EnvironmentName ¶
func (ai AgentInstance) EnvironmentName() string
EnvironmentName return the Environment Name of the agent instance
func (AgentInstance) EnvironmentNumber ¶
func (ai AgentInstance) EnvironmentNumber() string
EnvironmentNumber return the Environment Number of the agent instance
func (AgentInstance) Name ¶
func (ai AgentInstance) Name() string
Name return the name of the agent instance
func (AgentInstance) Tags ¶
func (ai AgentInstance) Tags() []string
Tags return the tags for the agent instance
type AgentPool ¶
type AgentPool struct { Agents []*AgentInstance // contains filtered or unexported fields }
AgentPool used to store a pool of agents which are created on launch
func (*AgentPool) PollAgents ¶
PollAgents send a heartbeat to all the agents in the pool then check for jobs using ping
type AgentResult ¶
AgentResult agent result from operation
type BuildkiteWorker ¶
type BuildkiteWorker struct {
// contains filtered or unexported fields
}
BuildkiteWorker handler for lambda events
func NewBuildkiteWorker ¶
func NewBuildkiteWorker(agentPool *AgentPool) *BuildkiteWorker
NewBuildkiteWorker create a new handler
func (*BuildkiteWorker) Handler ¶
func (bkw *BuildkiteWorker) Handler(ctx context.Context, evt *events.CloudWatchEvent) error
Handler process the cloudwatch scheduled event