SDK

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerServer

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

func NewConsumerServer

func NewConsumerServer(rdAddr string, repo types.Repository) *ConsumerServer

func (*ConsumerServer) AddHandlers

func (cs *ConsumerServer) AddHandlers(consumers map[string]types.ConsumerFn) *ConsumerServer

func (*ConsumerServer) Start

func (cs *ConsumerServer) Start() error

func (*ConsumerServer) WithConsumerServer

func (cs *ConsumerServer) WithConsumerServer(rdAddr string, repo types.Repository) *ConsumerServer

type Producer

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

func NewProducer

func NewProducer(rdAddr string, repo types.Repository, defaultOpts *types.Opts) *Producer

func (Producer) Close

func (p Producer) Close()

func (Producer) Producer

func (p Producer) Producer(ctx context.Context, eventName string, payload any, fn types.ConsumerFn, opts ...types.Opts) error

func (Producer) SagaProducer

func (p Producer) SagaProducer(ctx context.Context, eventName string, payload any, opts ...types.Opts) error

type SagaPattern

type SagaPattern struct {
	ConsumerServer

	Consumers        []types.ConsumerInput
	Options          types.Opts
	SequencePayloads bool
	// contains filtered or unexported fields
}

func NewSagaPattern

func NewSagaPattern(rdAddr string, repo types.Repository, consumers []types.ConsumerInput, options types.Opts, sequencePayloads bool) *SagaPattern

func (SagaPattern) Close

func (sp SagaPattern) Close()

func (SagaPattern) Consumer

func (sp SagaPattern) Consumer(ctx context.Context, payload types.PayloadInput) error

Jump to

Keyboard shortcuts

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