Documentation
¶
Index ¶
- func WithBulkStatusFn(...) func(*options)
- func WithInitialHealth(health bool) func(*options)
- func WithListTopicSubscriptions(...) func(*options)
- type Option
- type Subscriber
- func (s *Subscriber) AssertBulkEventChanLen(t *testing.T, l int)
- func (s *Subscriber) AssertEventChanLen(t *testing.T, l int)
- func (s *Subscriber) Cleanup(t *testing.T)
- func (s *Subscriber) ExpectPublishError(t *testing.T, ctx context.Context, daprd *daprd.Daprd, ...)
- func (s *Subscriber) ExpectPublishNoReceive(t *testing.T, ctx context.Context, daprd *daprd.Daprd, ...)
- func (s *Subscriber) ExpectPublishReceive(t *testing.T, ctx context.Context, daprd *daprd.Daprd, ...)
- func (s *Subscriber) Port(t *testing.T) int
- func (s *Subscriber) Receive(t *testing.T, ctx context.Context) *rtv1.TopicEventRequest
- func (s *Subscriber) ReceiveBulk(t *testing.T, ctx context.Context) *rtv1.TopicEventBulkRequest
- func (s *Subscriber) ReceiveBulkEventIDs(t *testing.T, ctx context.Context) []string
- func (s *Subscriber) Run(t *testing.T, ctx context.Context)
- func (s *Subscriber) SetHealth(healthy bool)
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
Types ¶
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
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) 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
ReceiveBulkEventIDs returns the cloud event IDs of the entries of the next bulk delivery, in the order they were delivered.
func (*Subscriber) SetHealth ¶ added in v1.14.0
func (s *Subscriber) SetHealth(healthy bool)
Click to show internal directories.
Click to hide internal directories.