reader

package
v0.0.0-...-71fdf4a Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const KeySubId = "x-awakari-sub-id"

Variables

View Source
var ErrInternal = errors.New("reader: internal failure")

Functions

func NewPublisherMock

func NewPublisherMock() model.MessageWriter

Types

type NewStreamFunc

type NewStreamFunc func(ctx context.Context, subId string) (stream Service_PublishMessagesClient, err error)

type PublisherPool

type PublisherPool interface {
	Get(ctx context.Context, subId string) (mw model.MessageWriter, err error)
	Remove(subId string)
}

func NewPublisherPool

func NewPublisherPool(newStreamFunc NewStreamFunc, limit uint32) (pool PublisherPool)

type Service

type Service interface {
	MessagePublisher(ctx context.Context, subId string) (mw model.MessageWriter, err error)
}

func NewLoggingMiddleware

func NewLoggingMiddleware(svc Service, log *slog.Logger) Service

func NewService

func NewService(client ServiceClient, poolCfg config.ReaderPoolConfig) (svc Service)

func NewServiceMock

func NewServiceMock() Service

Jump to

Keyboard shortcuts

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