event_handlers

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContextKeyLogger                          string = "context_key_logger"
	ContextKeyAzureClient                            = "handlers_context_key_azure_client"
	ContextKeyAzureParentAdministrativeUnitID        = "handlers_context_key_azure_parent_administrative_unit_id"
	ContextKeyKafkaProducer                          = "handlers_context_key_kafka_producer"
	ContextKeyKafkaErrorProducer                     = "handlers_context_key_kafka_error_producer"
)

Variables

This section is empty.

Functions

func CapabilityCreatedHandler

func CapabilityCreatedHandler(ctx context.Context, event kafkamsgs.Event)

func GetAzureParentAdministrativeUnitID

func GetAzureParentAdministrativeUnitID(ctx context.Context) string

func GetLogger

func GetLogger(ctx context.Context) *zap.Logger

func PermanentErrorHandler

func PermanentErrorHandler(ctx context.Context, event kafkamsgs.Event, oerr error)

PermanentErorrHandler writes the original message along with the error to the dead letter queue to be examined later.

Types

type AzureClient

type AzureClient interface {
	CreateAdministrativeUnitGroup(ctx context.Context, requestPayload azure.CreateAdministrativeUnitGroupRequest) (*azure.CreateAdministrativeUnitGroupResponse, error)
}

func GetAzureClient

func GetAzureClient(ctx context.Context) AzureClient

type KafkaProducer

type KafkaProducer interface {
	WriteMessages(ctx context.Context, msgs ...kafka.Message) error
}

func GetKafkaErrorProducer

func GetKafkaErrorProducer(ctx context.Context) KafkaProducer

func GetKafkaProducer

func GetKafkaProducer(ctx context.Context) KafkaProducer

Jump to

Keyboard shortcuts

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