sqs

package
v1.91.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	Message string `json:"Message"`
}

SQS Message Format

type Client

type Client interface {
	ListenAndServeQueue(ctx context.Context) []ConceptUpdate
	SendEvents(ctx context.Context, messages []Event) error
	RemoveMessageFromQueue(ctx context.Context, receiptHandle *string) error
	Healthcheck() fthealth.Check
}

func NewClient

func NewClient(awsRegion string, queueUrl string, messagesToProcess int, visibilityTimeout int, waitTime int) (Client, error)

type ConceptChanges

type ConceptChanges struct {
	ChangedRecords []Event  `json:"events"`
	UpdatedIds     []string `json:"updatedIDs"`
}

Events

type ConceptEvent

type ConceptEvent struct {
	Type string `json:"eventType"`
}

type ConceptUpdate

type ConceptUpdate struct {
	UUID          string
	Bookmark      string
	ReceiptHandle *string
}

type ConcordanceEvent

type ConcordanceEvent struct {
	Type  string `json:"eventType"`
	OldID string `json:"oldID"`
	NewID string `json:"newID"`
}

type Event

type Event struct {
	ConceptType   string      `json:"type"`
	ConceptUUID   string      `json:"uuid"`
	AggregateHash string      `json:"aggregateHash"`
	TransactionID string      `json:"transactionID"`
	EventDetails  interface{} `json:"eventDetails"`
}

type Message

type Message struct {
	Records []Record `json:"Records"`
}

type NotificationClient

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

func (*NotificationClient) Healthcheck

func (c *NotificationClient) Healthcheck() fthealth.Check

func (*NotificationClient) ListenAndServeQueue

func (c *NotificationClient) ListenAndServeQueue(ctx context.Context) []ConceptUpdate

func (*NotificationClient) RemoveMessageFromQueue

func (c *NotificationClient) RemoveMessageFromQueue(ctx context.Context, receiptHandle *string) error

func (*NotificationClient) SendEvents

func (c *NotificationClient) SendEvents(ctx context.Context, messages []Event) error

type Record

type Record struct {
	S3       s3     `json:"s3"`
	Bookmark string `json:"bookmark"`
}

Jump to

Keyboard shortcuts

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