inmemory

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: 7 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 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) Features added in v1.18.0

func (w *WrappedInMemory) Features() []pubsub.Feature

Features overrides the embedded inmemory.PubSub's static feature list so test framework consumers can inject features via WithFeatures. Without this override the embedded PubSub's Features() would shadow w.features and WithFeatures would be silently ignored.

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