kafkaconnect

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package kafkaconnect provides Kafka publish and consume capabilities for workflows. It exposes CRUD routes for managing Kafka configurations, a produce host function for publishing messages, and a background consumer loop that polls for messages and logs them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() plugin.Plugin

New creates a new Plugin instance.

Types

type Config

type Config struct {
	RestProxyURL string `json:"rest_proxy_url,omitempty"` // Confluent REST Proxy URL
}

Config holds optional configuration for the kafka-connect plugin.

type Plugin

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

Plugin implements Kafka publish and consume integration for workflows.

func (*Plugin) Info

func (p *Plugin) Info() plugin.PluginInfo

Info returns plugin metadata for discovery and documentation.

func (*Plugin) Init

func (p *Plugin) Init(ctx context.Context, env *plugin.Environment) error

Init initializes the plugin with the given environment. It creates an HTTP client with a 10-second timeout for REST proxy requests.

func (*Plugin) Migrations

func (p *Plugin) Migrations() []plugin.Migration

Migrations returns the database schema for Kafka config storage. Tables are idempotent (IF NOT EXISTS) and safe to run multiple times.

func (*Plugin) RegisterHostFunctions

func (p *Plugin) RegisterHostFunctions(scope plugin.FuncRegistry) error

RegisterHostFunctions registers workflow-callable functions on the scoped function registry. The plugin name is implicit -- each plugin gets its own scope, so function names need not be globally unique.

func (*Plugin) RegisterRoutes

func (p *Plugin) RegisterRoutes(mux *http.ServeMux) error

func (*Plugin) Run

func (p *Plugin) Run(ctx context.Context) error

Run starts the consumer polling loop. It runs every 5 seconds, reading messages from all enabled Kafka configs and publishing them as events through the event-triggers system. Returns when ctx is cancelled.

Jump to

Keyboard shortcuts

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