publisher

package
v0.0.0-...-e2755d2 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePublishRequest

func ValidatePublishRequest(ctx context.Context, req *metrov1.PublishRequest) (err error)

ValidatePublishRequest validates the publish request

Types

type Core

type Core struct {
	// contains filtered or unexported fields
}

Core implements IPublisher

func (*Core) Publish

func (p *Core) Publish(ctx context.Context, req *metrov1.PublishRequest) ([]string, error)

Publish messages

type ICore

type ICore interface {
	Publish(ctx context.Context, req *metrov1.PublishRequest) ([]string, error)
}

ICore is an interface over publisher core

func NewCore

func NewCore(bs brokerstore.IBrokerStore) ICore

NewCore returns a new publisher

type IPublisher

type IPublisher interface {
	// the grpc proto is used here as well, to optimise for serialization
	// a little unclean but optimal
	Publish(ctx context.Context, req *metrov1.PublishRequest) ([]string, error)
}

IPublisher is interface over high level publisher

Jump to

Keyboard shortcuts

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