events

package
v0.0.0-...-90106bd Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

ErrInternal indicates some unexpected internal failure.

View Source
var ErrInvalid = errors.New("events: invalid request")

Functions

This section is empty.

Types

type Service

type Service interface {
	SetStream(ctx context.Context, topic string, limit uint32) (err error)
	NewPublisher(ctx context.Context, topic string) (p Writer, err error)
}

func NewLoggingMiddleware

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

func NewService

func NewService(client ServiceClient) Service

func NewServiceMock

func NewServiceMock() Service

type Writer

type Writer interface {
	io.Closer

	// Write writes the specified messages and returns the accepted count preserving the order.
	// Returns io.EOF if the destination file/connection/whatever is closed.
	Write(ctx context.Context, msgs []*pb.CloudEvent) (ackCount uint32, err error)
}

func NewPublisherMock

func NewPublisherMock() Writer

Jump to

Keyboard shortcuts

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