Documentation
¶
Overview ¶
Package kafka provides a RoadRunner jobs plugin that registers the Apache Kafka driver.
The Plugin type implements the RoadRunner endure plugin lifecycle (Init, Name, Weight, Collects) and exposes two factory methods — DriverFromConfig and DriverFromPipeline — that delegate to the kafkajobs package for the actual driver construction. Configuration is read from the .rr.yaml file under the "kafka" key.
The plugin declares three dependency-injection interfaces:
- Logger — provides a named *slog.Logger instance.
- Configurer — unmarshals configuration sections and checks their existence.
- Tracer — supplies an OpenTelemetry TracerProvider for distributed tracing.
Index ¶
- type Configurer
- type Logger
- type Plugin
- func (p *Plugin) Collects() []*dep.In
- func (p *Plugin) DriverFromConfig(ctx context.Context, configKey string, pq jobs.Queue, pipeline jobs.Pipeline) (jobs.Driver, error)
- func (p *Plugin) DriverFromPipeline(ctx context.Context, pipe jobs.Pipeline, pq jobs.Queue) (jobs.Driver, error)
- func (p *Plugin) Init(log Logger, cfg Configurer) error
- func (p *Plugin) Name() string
- func (p *Plugin) Weight() uint
- type Tracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configurer ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func (*Plugin) DriverFromConfig ¶
func (p *Plugin) DriverFromConfig(ctx context.Context, configKey string, pq jobs.Queue, pipeline jobs.Pipeline) (jobs.Driver, error)
DriverFromConfig constructs kafka driver from the .rr.yaml configuration
type Tracer ¶
type Tracer interface {
Tracer() *sdktrace.TracerProvider
}
Click to show internal directories.
Click to hide internal directories.