service

package
v0.0.0-...-bbe9343 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package service contains the controllers to consume and process kafka messages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Consumer            *consumer.GroupConsumer
	Producer            *producer.Producer
	RefundRequestSchema string
	InitialOffset       int64
	HandleError         func(err error, offset int64, str interface{}) error
	Topic               string
	Retry               *resilience.ServiceRetry
	IsErrorConsumer     bool
	BrokerAddr          []string
	Payments            payment.Payments
	PaymentsAPIURL      string
	Client              *http.Client
	ApiKey              string
}

Service represents service config for refund-request-consumer.

func New

func New(consumerTopic, consumerGroupName string, InitialOffset int64, cfg *config.Config, retry *resilience.ServiceRetry) (*Service, error)

New creates a new instance of service with a given consumerGroup name, consumerTopic, throttleRate and refund-request-consumer config.

func (*Service) Shutdown

func (svc *Service) Shutdown()

func (*Service) Start

func (svc *Service) Start(wg *sync.WaitGroup, c chan os.Signal)

Start begins the service. Messages are consumed from the refund-request topic.

Jump to

Keyboard shortcuts

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