package
0.0.0-20241106164905-f55fc5c4c439
Repository: https://github.com/snowplow/snowbridge.git
Documentation: pkg.go.dev
# Functions
CreateAWSLocalstackDynamoDBTables creates all the DynamoDB tables kinsumer requires and polls them until each table is in ACTIVE state.
CreateAWSLocalstackKinesisStream creates a new Kinesis stream and polls until the stream is in an ACTIVE state.
CreateAWSLocalstackSQSQueue creates a new SQS queue.
CreatePubsubResourcesAndWrite creates PubSub integration resources, and writes numMsgs.
CreatePubSubTopicAndSubscription creates and returns a pubsub topic & supscription, using the pubsub emulator.
DefaultTestWriteBuilder returns a function which replaces the write function, outputting any messages it finds to be handled via a channel.
DelayedAckTestWriteBuilder delays every third ack, to test the case where some messages are processed slower than others.
DeleteAWSLocalstackDynamoDBTables creates all tables that kinsumer requires.
DeleteAWSLocalstackKinesisStream deletes an existing Kinesis stream.
DeleteAWSLocalstackSQSQueue deletes an existing SQS queue.
GenRandomString can produce a random string of any provided length which is useful for testing situations that might have byte limitations.
GetAWSLocalstackDynamoDBClient returns a DynamoDB client.
GetAWSLocalstackKinesisClient returns a Kinesis client.
GetAWSLocalstackSession will return an AWS session ready to interact with localstack.
GetAWSLocalstackSQSClient returns an SQS client.
GetSequentialTestMessages will return an array of messages ready to be used for testing targets and sources.
GetTestMessages will return an array of messages ready to be used for testing targets and sources.
InitMockPubsubServer creates a mock PubSub Server for testing.
PutNRecordsIntoKinesis puts n records into a kinesis stream.
PutProvidedDataIntoKinesis puts the provided data into a kinsis stream.
PutProvidedDataIntoSQS puts the provided data into an SQS queue.
ReadAndReturnMessages takes a source, runs the read function, and outputs all messages found in a slice, against which we may run assertions.
SetupAWSLocalstackSQSQueueWithMessages creates a new SQS queue and stubs it with a random set of messages.
WriteProvidedDataToPubSubTopic writes the provided data to a provided PubSub topic, blocking until all msgs are sent.
WriteToPubSubTopic simply writes data to a provided PubSub topic, blocking until all msgs are sent.
# Variables
AWSLocalstackEndpoint is the default endpoint localstack runs under.
AWSLocalstackRegion is the default region we are using for testing.