pubsubtest

package
v0.243.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Eventually = assert.Retry{
	Strategy: &Waiter,
}
View Source
var Waiter = assert.Waiter{
	WaitDuration: time.Millisecond,
	Timeout:      5 * time.Second,
}

Functions

This section is empty.

Types

type AsyncResults

type AsyncResults[Data any] struct {
	// contains filtered or unexported fields
}

func Subscribe

func Subscribe[Data any](tb testing.TB, sub pubsub.Subscriber[Data], ctx context.Context) *AsyncResults[Data]

func (*AsyncResults[Data]) Add

func (r *AsyncResults[Data]) Add(d Data)

func (*AsyncResults[Data]) Eventually

func (r *AsyncResults[Data]) Eventually(tb testing.TB, blk func(testing.TB, []Data))

func (*AsyncResults[Data]) Finish

func (r *AsyncResults[Data]) Finish()

func (*AsyncResults[Data]) ReceivedAt

func (r *AsyncResults[Data]) ReceivedAt() time.Time

func (*AsyncResults[Data]) Subscription

func (r *AsyncResults[Data]) Subscription() pubsub.Subscription[Data]

func (*AsyncResults[Data]) Values

func (r *AsyncResults[Data]) Values() []Data

Jump to

Keyboard shortcuts

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