Help us shape the future of Go! Take the 2026 Go Developer Survey

subscriber

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

func WithBulkRoutes

func WithBulkRoutes(routes ...string) Option

func WithHandlerFunc

func WithHandlerFunc(path string, fn http.HandlerFunc) Option

func WithRoutes

func WithRoutes(routes ...string) Option

type PublishRequest

type PublishRequest struct {
	Daprd           *daprd.Daprd
	PubSubName      string
	Topic           string
	Data            string
	DataContentType *string
}

type RouteEvent

type RouteEvent struct {
	Route string
	*event.Event
}

type Subscriber

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

func New

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

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, req PublishRequest)

func (*Subscriber) ExpectPublishNoReceive

func (s *Subscriber) ExpectPublishNoReceive(t *testing.T, ctx context.Context, req PublishRequest)

func (*Subscriber) ExpectPublishReceive

func (s *Subscriber) ExpectPublishReceive(t *testing.T, ctx context.Context, req PublishRequest)

func (*Subscriber) Port

func (s *Subscriber) Port() int

func (*Subscriber) Publish

func (s *Subscriber) Publish(t *testing.T, ctx context.Context, req PublishRequest)

func (*Subscriber) Receive

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

func (*Subscriber) Run

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

Jump to

Keyboard shortcuts

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