aws_ext

package
v0.0.0-...-598a827 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSQSProjects

func GetSQSProjects(credFiles []string) (urls map[string]struct{}, err kv.Error)

GetSQSProjects can be used to get a list of the SQS servers and the main URLs that are accessible to them

Types

type SQS

type SQS struct {
	// contains filtered or unexported fields
}

SQS encapsulates an AWS based SQS queue and associated it with a project

func NewSQS

func NewSQS(project string, creds string, w wrapper.Wrapper) (queue *SQS, err kv.Error)

NewSQS creates an SQS data structure using set set of credentials (creds) for an sqs queue (sqs)

func (*SQS) Exists

func (sq *SQS) Exists(ctx context.Context, subscription string) (exists bool, err kv.Error)

Exists tests for the presence of a subscription, typically a queue name on the configured sqs server.

func (*SQS) GetShortQName

func (sq *SQS) GetShortQName(qt *task.QueueTask) (shortName string, err kv.Error)

func (*SQS) HasWork

func (sq *SQS) HasWork(ctx context.Context, subscription string) (hasWork bool, err kv.Error)

HasWork will look at the SQS queue to see if there is any pending work. The function is called in an attempt to see if there is any point in processing new work without a lot of overhead. In the case of SQS at the moment we always assume there is work.

func (*SQS) Refresh

func (sq *SQS) Refresh(ctx context.Context, qNameMatch *regexp.Regexp, qNameMismatch *regexp.Regexp) (known map[string]interface{}, err kv.Error)

Refresh uses a regular expression to obtain matching queues from the configured SQS server on AWS (sqs).

func (*SQS) Responder

func (sq *SQS) Responder(ctx context.Context, subscription string, encryptKey *rsa.PublicKey) (sender chan *runnerReports.Report, err kv.Error)

Responder is used to open a connection to an existing response queue if one was made available and also to provision a channel into which the runner can place report messages

func (*SQS) Work

func (sq *SQS) Work(ctx context.Context, qt *task.QueueTask) (msgProcessed bool, resource *server.Resource, err kv.Error)

Work is invoked by the queue handling software within the runner to get the specific queue implementation to process potential work that could be waiting inside the queue.

Jump to

Keyboard shortcuts

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