backend

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package backend forwards requests to SQS and HTTP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPBackend

func HTTPBackend(ctx context.Context, tracer trace.Tracer, backendURL string, body io.Reader) error

HTTPBackend forwards body to http backend.

func SqsListener

func SqsListener(app *SqsApplication)

SqsListener runs sqs application.

func SqsSend

func SqsSend(ctx context.Context, tracer trace.Tracer, queue SqsQueue, sqsMessage types.Message)

SqsSend only submits message to SQS. attribute with traceID must have been set in sqsMessage.

Types

type SqsApplication

type SqsApplication struct {
	QueueInput  SqsQueue
	QueueOutput SqsQueue
	Tracer      trace.Tracer
	BackendURL  string
}

SqsApplication holds sqs application.

type SqsQueue

type SqsQueue struct {
	SqsClient *sqs.Client
	URL       string
}

SqsQueue holds sqs client.

func NewSqsClient

func NewSqsClient(caller, queueURL, roleArn, roleSessionName, endpointURL string) SqsQueue

NewSqsClient creates sqs client.

Jump to

Keyboard shortcuts

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