messaging

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const IncidentTopic = "incidents"

Variables

View Source
var DefaultCorrelation = &CorrelationImpl{}

Functions

This section is empty.

Types

type Command

type Command struct {
	CommandId string `json:"command_id"`
	Data      string `json:"data"`
}

type Consumer

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

func (*Consumer) Stop

func (this *Consumer) Stop()

type Correlation

type Correlation interface {
	Get(id string) (messages.ProtocolMsg, error)
	Set(id string, element messages.ProtocolMsg) error
}

type CorrelationImpl

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

func (*CorrelationImpl) Get

func (this *CorrelationImpl) Get(id string) (messages.ProtocolMsg, error)

func (*CorrelationImpl) Set

func (this *CorrelationImpl) Set(id string, element messages.ProtocolMsg) error

type Factory

type Factory struct {
	Config      configuration.Config
	Correlation Correlation
	IdProvider  func() string
}

func (Factory) NewConsumer

func (this Factory) NewConsumer(ctx context.Context, config util.Config, respoinseListener func(msg string) error, errorListener func(msg string) error) (err error)

func (Factory) NewProducer

func (this Factory) NewProducer(ctx context.Context, config util.Config) (com.ProducerInterface, error)

type Incidents

type Incidents interface {
	Handle(command messages.KafkaIncidentsCommand) error
}

type Producer

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

func (*Producer) Close

func (this *Producer) Close()

func (*Producer) Log

func (this *Producer) Log(logger *log.Logger)

func (*Producer) Produce

func (this *Producer) Produce(topic string, message string) (err error)

func (*Producer) ProduceWithKey

func (this *Producer) ProduceWithKey(topic string, _ string, message string) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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