kafka

package module
v6.0.0-beta.6 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 8 Imported by: 0

README

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configurer

type Configurer interface {
	// UnmarshalKey takes a single key and unmarshal it into a Struct.
	UnmarshalKey(name string, out any) error

	// Has checks if a config section exists.
	Has(name string) bool
}

type Logger

type Logger interface {
	NamedLogger(name string) *slog.Logger
}

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

func (*Plugin) Collects

func (p *Plugin) Collects() []*dep.In

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

func (*Plugin) DriverFromPipeline

func (p *Plugin) DriverFromPipeline(ctx context.Context, pipe jobs.Pipeline, pq jobs.Queue) (jobs.Driver, error)

DriverFromPipeline constructs kafka driver from pipeline

func (*Plugin) Init

func (p *Plugin) Init(log Logger, cfg Configurer) error

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) Weight

func (p *Plugin) Weight() uint

type Tracer

type Tracer interface {
	Tracer() *sdktrace.TracerProvider
}

Directories

Path Synopsis
Package kafkajobs implements the core Apache Kafka jobs driver for RoadRunner.
Package kafkajobs implements the core Apache Kafka jobs driver for RoadRunner.

Jump to

Keyboard shortcuts

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