mirror of
https://github.com/hexolan/stocklet.git
synced 2026-03-26 11:41:18 +00:00
feat: go report card
fix: comment and log misspellings
This commit is contained in:
@@ -87,7 +87,7 @@ func (c *kafkaController) Start() {
|
||||
case messaging.Payment_Processing_Topic:
|
||||
c.consumePaymentProcessedEventTopic(ft)
|
||||
default:
|
||||
log.Warn().Str("topic", ft.Topic).Msg("consumer: recieved records from unexpected topic")
|
||||
log.Warn().Str("topic", ft.Topic).Msg("consumer: received records from unexpected topic")
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -99,7 +99,7 @@ func (c *kafkaController) Stop() {
|
||||
}
|
||||
|
||||
func (c *kafkaController) consumeStockReservationEventTopic(ft kgo.FetchTopic) {
|
||||
log.Info().Str("topic", ft.Topic).Msg("consumer: recieved records from topic")
|
||||
log.Info().Str("topic", ft.Topic).Msg("consumer: received records from topic")
|
||||
|
||||
// Process each message from the topic
|
||||
ft.EachRecord(func(record *kgo.Record) {
|
||||
@@ -117,7 +117,7 @@ func (c *kafkaController) consumeStockReservationEventTopic(ft kgo.FetchTopic) {
|
||||
}
|
||||
|
||||
func (c *kafkaController) consumePaymentProcessedEventTopic(ft kgo.FetchTopic) {
|
||||
log.Info().Str("topic", ft.Topic).Msg("consumer: recieved records from topic")
|
||||
log.Info().Str("topic", ft.Topic).Msg("consumer: received records from topic")
|
||||
|
||||
// Process each message from the topic
|
||||
ft.EachRecord(func(record *kgo.Record) {
|
||||
|
||||
@@ -38,7 +38,7 @@ type ShippingService struct {
|
||||
}
|
||||
|
||||
// Interface for database methods
|
||||
// Flexibility for implementing seperate controllers for different databases (e.g. Postgres, MongoDB, etc)
|
||||
// Flexibility for implementing separate controllers for different databases (e.g. Postgres, MongoDB, etc)
|
||||
type StorageController interface {
|
||||
GetShipment(ctx context.Context, shipmentId string) (*pb.Shipment, error)
|
||||
GetShipmentItems(ctx context.Context, shipmentId string) ([]*pb.ShipmentItem, error)
|
||||
@@ -48,7 +48,7 @@ type StorageController interface {
|
||||
}
|
||||
|
||||
// Interface for event consumption
|
||||
// Flexibility for seperate controllers for different messaging systems (e.g. Kafka, NATS, etc)
|
||||
// Flexibility for separate controllers for different messaging systems (e.g. Kafka, NATS, etc)
|
||||
type ConsumerController interface {
|
||||
messaging.ConsumerController
|
||||
|
||||
|
||||
Reference in New Issue
Block a user