testutils

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_testutils_proto protoreflect.FileDescriptor

Functions

func NewTestBus

func NewTestBus(next psrpc.MessageBus, opts ...TestBusOption) psrpc.MessageBus

Types

type AtomicFailureRate

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

func NewAtomicFailureRate

func NewAtomicFailureRate(v float64) AtomicFailureRate

func (*AtomicFailureRate) Rate

func (g *AtomicFailureRate) Rate() float64

func (*AtomicFailureRate) SetRate

func (g *AtomicFailureRate) SetRate(v float64)

type Channel added in v0.6.0

type Channel = bus.Channel

type LaggyMessage added in v0.6.0

type LaggyMessage struct {
	Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"`
	SentAt int64  `protobuf:"varint,2,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"`
	Body   []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*LaggyMessage) Descriptor deprecated added in v0.6.0

func (*LaggyMessage) Descriptor() ([]byte, []int)

Deprecated: Use LaggyMessage.ProtoReflect.Descriptor instead.

func (*LaggyMessage) GetBody added in v0.6.0

func (x *LaggyMessage) GetBody() []byte

func (*LaggyMessage) GetOrigin added in v0.6.0

func (x *LaggyMessage) GetOrigin() string

func (*LaggyMessage) GetSentAt added in v0.6.0

func (x *LaggyMessage) GetSentAt() int64

func (*LaggyMessage) ProtoMessage added in v0.6.0

func (*LaggyMessage) ProtoMessage()

func (*LaggyMessage) ProtoReflect added in v0.6.0

func (x *LaggyMessage) ProtoReflect() protoreflect.Message

func (*LaggyMessage) Reset added in v0.6.0

func (x *LaggyMessage) Reset()

func (*LaggyMessage) String added in v0.6.0

func (x *LaggyMessage) String() string

type PublishHandler

type PublishHandler = bus.PublishHandler

type PublishInterceptor

type PublishInterceptor = bus.PublishInterceptor

type ReadHandler

type ReadHandler = bus.ReadHandler

type SubscribeInterceptor

type SubscribeInterceptor = bus.SubscribeInterceptor

type TestBusOption

type TestBusOption = bus.TestBusOption

func WithBusOptions added in v0.6.0

func WithBusOptions(opts ...TestBusOption) TestBusOption

func WithLaggyBus added in v0.6.0

func WithLaggyBus(id string, latency latencyFunc) TestBusOption

func WithPublishInterceptor

func WithPublishInterceptor(interceptor PublishInterceptor) TestBusOption

func WithSubscribeInterceptor

func WithSubscribeInterceptor(interceptor SubscribeInterceptor) TestBusOption

func WithUnreliableBus

func WithUnreliableBus(rate AtomicFailureRate) TestBusOption

func WithUnreliableBusChannel

func WithUnreliableBusChannel(rate AtomicFailureRate, channelFilter string) TestBusOption

Jump to

Keyboard shortcuts

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