peercall

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package peercall holds the tiny typed clients doze-aws services use to call each other — hand-rolled requests in the target service's own wire format, so aws-sdk-go stays a test-only dependency. All calls are best-effort: callers log and drop on failure, they never crash a publish path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LambdaInvoke

func LambdaInvoke(dir peers.Directory, function string, payload []byte) ([]byte, error)

LambdaInvokeAsync fires an Event-type invocation of a function. LambdaInvoke fires a synchronous (RequestResponse) invocation and returns the function's response payload. Used by Secrets Manager rotation, which drives a rotation function step by step.

func LambdaInvokeAsync

func LambdaInvokeAsync(dir peers.Directory, function string, payload []byte) error

func SNSPublish

func SNSPublish(dir peers.Directory, topicARN, message string) error

SNSPublish publishes a message to a topic by ARN (Query protocol).

func SQSDelete

func SQSDelete(dir peers.Directory, queue, receiptHandle string) error

SQSDelete acknowledges one received message.

func SQSSend

func SQSSend(dir peers.Directory, queue, body string, attrs map[string]string) error

SQSSend sends one message to a queue by name (SQS JSON protocol).

Types

type SQSMessage

type SQSMessage struct {
	MessageID     string `json:"MessageId"`
	ReceiptHandle string `json:"ReceiptHandle"`
	Body          string `json:"Body"`
}

SQSReceive long-polls a queue for up to max messages (used by Lambda event source mappings).

func SQSReceive

func SQSReceive(dir peers.Directory, queue string, max, waitSeconds int) ([]SQSMessage, error)

Jump to

Keyboard shortcuts

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