Documentation
¶
Index ¶
- Variables
- func NewTestBus(next psrpc.MessageBus, opts ...TestBusOption) psrpc.MessageBus
- type AtomicFailureRate
- type Channel
- type LaggyMessage
- func (*LaggyMessage) Descriptor() ([]byte, []int)deprecated
- func (x *LaggyMessage) GetBody() []byte
- func (x *LaggyMessage) GetOrigin() string
- func (x *LaggyMessage) GetSentAt() int64
- func (*LaggyMessage) ProtoMessage()
- func (x *LaggyMessage) ProtoReflect() protoreflect.Message
- func (x *LaggyMessage) Reset()
- func (x *LaggyMessage) String() string
- type PublishHandler
- type PublishInterceptor
- type ReadHandler
- type SubscribeInterceptor
- type TestBusOption
- func WithBusOptions(opts ...TestBusOption) TestBusOption
- func WithLaggyBus(id string, latency latencyFunc) TestBusOption
- func WithPublishInterceptor(interceptor PublishInterceptor) TestBusOption
- func WithSubscribeInterceptor(interceptor SubscribeInterceptor) TestBusOption
- func WithUnreliableBus(rate AtomicFailureRate) TestBusOption
- func WithUnreliableBusChannel(rate AtomicFailureRate, channelFilter string) TestBusOption
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 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
Click to show internal directories.
Click to hide internal directories.