inmemory

package
v1.13.4 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWrappedInMemory

func NewWrappedInMemory(t *testing.T, fopts ...Option) pubsub.PubSub

Types

type Option

type Option func(*options)

Option is a function that configures the process.

func WithFeatures

func WithFeatures(features ...pubsub.Feature) Option

func WithPublishFn

func WithPublishFn(fn func(ctx context.Context, req *pubsub.PublishRequest) error) Option

type WrappedInMemory

type WrappedInMemory struct {
	pubsub.PubSub
	// contains filtered or unexported fields
}

Wrapped is a wrapper around inmemory pubsub to ensure that Init and Close are called only once.

func (*WrappedInMemory) Close

func (w *WrappedInMemory) Close() error

func (*WrappedInMemory) Init

func (w *WrappedInMemory) Init(ctx context.Context, metadata pubsub.Metadata) error

func (*WrappedInMemory) Publish

func (w *WrappedInMemory) Publish(ctx context.Context, req *pubsub.PublishRequest) error

Jump to

Keyboard shortcuts

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