Categorygithub.com/DoNewsCode/core-otfranz
modulepackage
0.1.0
Repository: https://github.com/donewscode/core-otfranz.git
Documentation: pkg.go.dev

# README

core-otfranz

Using franz-go as kafka backend of core.

The core/otkafka is based on kafka-go.

# Functions

FranzLogAdapter return an log adapter bridging kitlog and kgo.Logger.
NewClient takes a *kgo.Client and returns a decorated Client.
Providers is a set of dependencies including Factory,Maker and exported configs.
WithInterceptor instructs the Providers to accept the Interceptor so that users can change config during runtime.
WithReload toggles whether the factory should reload cached instances upon OnReload event.

# Structs

Client is a decorator around *kgo.Client that provides tracing capabilities.
Config is a configuration object used to create new instances of *kgo.Client.
Factory is a *di.Factory that creates *kafka.Client.

# Interfaces

Maker models a Factory.

# Type aliases

Interceptor is an interceptor that makes last minute change to a *Config during kgo.Client's creation.
ProvidersOptionFunc is the type of functional providersOption for Providers.