subscriber

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithBulkStatusFn added in v1.19.0

func WithBulkStatusFn(fn func(ctx context.Context, entryIDs []string) map[string]rtv1.TopicEventResponse_TopicEventResponseStatus) func(*options)

WithBulkStatusFn sets the status the app answers each entry of a bulk delivery with, given the delivery's entry IDs in order. Entries without a status are answered SUCCESS. fn is called with the delivery's RPC context, which it may block on to hold the delivery until daprd cancels it.

func WithInitialHealth added in v1.14.0

func WithInitialHealth(health bool) func(*options)

func WithListTopicSubscriptions added in v1.13.2

func WithListTopicSubscriptions(fn func(ctx context.Context, in *emptypb.Empty) (*rtv1.ListTopicSubscriptionsResponse, error)) func(*options)

Types

type Option

type Option func(*options)

type Subscriber

type Subscriber struct {
	// contains filtered or unexported fields
}

func New

func New(t *testing.T, fopts ...Option) *Subscriber

func (*Subscriber) AssertBulkEventChanLen added in v1.13.2

func (s *Subscriber) AssertBulkEventChanLen(t *testing.T, l int)

func (*Subscriber) AssertEventChanLen

func (s *Subscriber) AssertEventChanLen(t *testing.T, l int)

func (*Subscriber) Cleanup

func (s *Subscriber) Cleanup(t *testing.T)

func (*Subscriber) ExpectPublishError

func (s *Subscriber) ExpectPublishError(t *testing.T, ctx context.Context, daprd *daprd.Daprd, req *rtv1.PublishEventRequest)

func (*Subscriber) ExpectPublishNoReceive

func (s *Subscriber) ExpectPublishNoReceive(t *testing.T, ctx context.Context, daprd *daprd.Daprd, req *rtv1.PublishEventRequest)

func (*Subscriber) ExpectPublishReceive

func (s *Subscriber) ExpectPublishReceive(t *testing.T, ctx context.Context, daprd *daprd.Daprd, req *rtv1.PublishEventRequest)

func (*Subscriber) Port

func (s *Subscriber) Port(t *testing.T) int

func (*Subscriber) Receive

func (s *Subscriber) Receive(t *testing.T, ctx context.Context) *rtv1.TopicEventRequest

func (*Subscriber) ReceiveBulk added in v1.13.2

func (s *Subscriber) ReceiveBulk(t *testing.T, ctx context.Context) *rtv1.TopicEventBulkRequest

func (*Subscriber) ReceiveBulkEventIDs added in v1.19.0

func (s *Subscriber) ReceiveBulkEventIDs(t *testing.T, ctx context.Context) []string

ReceiveBulkEventIDs returns the cloud event IDs of the entries of the next bulk delivery, in the order they were delivered.

func (*Subscriber) Run

func (s *Subscriber) Run(t *testing.T, ctx context.Context)

func (*Subscriber) SetHealth added in v1.14.0

func (s *Subscriber) SetHealth(healthy bool)

Jump to

Keyboard shortcuts

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