testutils

package
v1.2.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTestReadMessages

func BuildTestReadMessages(count int64, startTime time.Time, keys []string) []isb.ReadMessage

BuildTestReadMessages builds test isb.ReadMessage which can be used for testing.

func BuildTestReadMessagesIntOffset added in v0.6.4

func BuildTestReadMessagesIntOffset(count int64, startTime time.Time, keys []string) []isb.ReadMessage

BuildTestReadMessagesIntOffset builds test isb.ReadMessage which can be used for testing.

func BuildTestWindowRequests added in v1.2.0

func BuildTestWindowRequests(count int64, startTime time.Time, windowOp window.Operation) []window.TimedWindowRequest

BuildTestWindowRequests builds test window.TimedWindowRequest which can be used for testing.

func BuildTestWriteMessages

func BuildTestWriteMessages(count int64, startTime time.Time, keys []string) []isb.Message

BuildTestWriteMessages builds test isb.Message which can be used for testing.

func CopyUDFTestApply

func CopyUDFTestApply(ctx context.Context, readMessage *isb.ReadMessage) ([]*isb.WriteMessage, error)

CopyUDFTestApply applies a copy UDF that simply copies the input to output.

func CopyUDFTestApplyStream added in v0.8.1

func CopyUDFTestApplyStream(ctx context.Context, readMessage *isb.ReadMessage, writeMessageCh chan<- isb.WriteMessage) error

func ReadMessagesLen

func ReadMessagesLen(ctx context.Context, options *redis.UniversalOptions, streamName string, expectedValue int64) bool

ReadMessagesLen is used to test the length of the messages read as they arrive on the stream If a stream already has 5 elements which have been read and then we add another set of elements of 10 the total number would be 15.

Types

type PayloadForTest

type PayloadForTest struct {
	Key   string
	Value int64
}

PayloadForTest is a dummy payload for testing.

Jump to

Keyboard shortcuts

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