gstream

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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