services

package
v0.0.0-...-1ebf370 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaName = "chs-delta"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaService

type KafkaService interface {
	Init(cfg *config.Config) error
	SendMessage(topic, data, contextId string, isDelete bool) error
}

KafkaService defines all Methods needed to successfully send a message onto a Kafka topic.

type KafkaServiceImpl

type KafkaServiceImpl struct {
	P *producer.Producer
	// contains filtered or unexported fields
}

KafkaServiceImpl is a concrete implementation of the KafkaService interface.

func NewKafkaService

func NewKafkaService() KafkaServiceImpl

NewKafkaService returns a KafkaServiceImpl that isn't configured.

func (*KafkaServiceImpl) Init

func (kSvc *KafkaServiceImpl) Init(cfg *config.Config) error

Init initialises a KafkaService using a provided config.

func (*KafkaServiceImpl) SendMessage

func (kSvc *KafkaServiceImpl) SendMessage(topic, data, contextId string, isDelete bool) error

SendMessage publishes a given data string retrieved from a REST request onto a chosen Kafka topic.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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