Documentation
¶
Index ¶
- func NewFixedSizeObserver[T interface{}](config FixedSizeObserverConfiguration) (types.FixedSizeObserver[T], error)
- func NewGrpcClient[T interface{}](config GrpcClientConfiguration[T]) (types.GrpcClient[T], error)
- func NewGrpcStreamDecorator[T interface{}](config GrpcStreamDecoratorConfiguration) (types.GrpcStreamDecorator[T], error)
- type FixedSizeObserverConfiguration
- type GrpcClientConfiguration
- type GrpcStreamDecoratorConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFixedSizeObserver ¶
func NewFixedSizeObserver[T interface{}](config FixedSizeObserverConfiguration) (types.FixedSizeObserver[T], error)
func NewGrpcClient ¶
func NewGrpcClient[T interface{}](config GrpcClientConfiguration[T]) (types.GrpcClient[T], error)
func NewGrpcStreamDecorator ¶
func NewGrpcStreamDecorator[T interface{}](config GrpcStreamDecoratorConfiguration) (types.GrpcStreamDecorator[T], error)
Types ¶
type FixedSizeObserverConfiguration ¶
type FixedSizeObserverConfiguration struct {
Ctx context.Context
SubscribersChannelLength *int
// SkipOnFail skip not delivered messages or retry delivery them unlimited
SkipOnFail bool
// SkipPublishWithoutSubscribers skip element publishing without subscribers
SkipPublishWithoutSubscribers bool
// ElementsCheckInterval sleep time between checking of elements existence
ElementsCheckInterval *time.Duration
// SubscribersCheckInterval sleep time between checking of subscribers
SubscribersCheckInterval *time.Duration
}
type GrpcClientConfiguration ¶
type GrpcClientConfiguration[T interface{}] struct {
Ctx context.Context
ServerStream grpc.ServerStream
ClientStream grpc.ClientStream
MessagesCallback func(ctx context.Context, grpcClient types.GrpcClient[T], msg *T) error
ErrorsCallback *func(grpcClient types.GrpcClient[T], err error) error
SkipMessagesIfClientWithoutId bool
MessagesChannelSize *int
GenerateId bool
}
type GrpcStreamDecoratorConfiguration ¶
type GrpcStreamDecoratorConfiguration struct {
Ctx context.Context
ServerStream grpc.ServerStream
ClientStream grpc.ClientStream
ChannelSize *int
}
Click to show internal directories.
Click to hide internal directories.