Documentation ¶
Index ¶
- func GetSQSProjects(credFiles []string) (urls map[string]struct{}, err kv.Error)
- type SQS
- func (sq *SQS) Exists(ctx context.Context, subscription string) (exists bool, err kv.Error)
- func (sq *SQS) GetShortQName(qt *task.QueueTask) (shortName string, err kv.Error)
- func (sq *SQS) HasWork(ctx context.Context, subscription string) (hasWork bool, err kv.Error)
- func (sq *SQS) Refresh(ctx context.Context, qNameMatch *regexp.Regexp, qNameMismatch *regexp.Regexp) (known map[string]interface{}, err kv.Error)
- func (sq *SQS) Responder(ctx context.Context, subscription string, encryptKey *rsa.PublicKey) (sender chan *runnerReports.Report, err kv.Error)
- func (sq *SQS) Work(ctx context.Context, qt *task.QueueTask) (msgProcessed bool, resource *server.Resource, err kv.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
NewSQS creates an SQS data structure using set set of credentials (creds) for an sqs queue (sqs)
func (*SQS) Exists ¶
Exists tests for the presence of a subscription, typically a queue name on the configured sqs server.
func (*SQS) GetShortQName ¶
func (*SQS) HasWork ¶
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.