broker

package
v0.0.0-...-60b3127 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOG_KEY_TO_CH = "key to channel"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer interface {
	Consume(ctx context.Context, msg *acv1.CloudEvent, stream *connect.ServerStream[acv1.ConsumeResponse]) error
}

func NewConsumer

func NewConsumer(consumerRegistrationChan chan register) Consumer

type Controller

type Controller interface {
	Consumer
	Producer
}

func NewController

func NewController(logger chassis.Logger) Controller

type Producer

type Producer interface {
	Produce(ctx context.Context, inputStream *connect.BidiStream[acv1.ProduceRequest, acv1.ProduceResponse]) error
}

func NewProducer

func NewProducer(produceChan chan *acv1.CloudEvent) Producer

type Rpc

Given the producer, and consumer will have to share the same in memory data structure to send message to consumers when received from a producer. It's worth keeping the rpc services defined seperatly but implement using the same handler layer

func NewRPC

func NewRPC(logger chassis.Logger, controller Controller) Rpc

Jump to

Keyboard shortcuts

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