api-plugins

module
v5.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT

README

API Plugins

GoDoc Go Report Card Discord

This repository defines Go interface contracts for RoadRunner server plugins. Plugins implement these interfaces so that the Endure dependency injection framework can automatically discover and wire dependencies via its plugin graph. Endure inspects each plugin's Init() method parameters, matches them to registered plugins that implement the required interfaces, and topologically sorts the resulting DAG to determine initialization order.

Packages

Package Description
jobs Job queue interfaces — Driver, Constructor, Pipeline, Message, Job, Queue, and State for async job processing
kv Key-value storage — Storage, Item, and Constructor interfaces with TTL support
lock Lock queue — Item and Queue interfaces for priority-based lock management
logger Logging — Log and Named interfaces wrapping go.uber.org/zap
priority_queue Base priority queue — Item interface with ID, GroupID, Priority
status Status reporting — Status struct with Code field

Usage

A plugin declares its dependencies by accepting interfaces in its Init() method. Endure auto-resolves them from the plugin graph:

type Plugin struct{}

func (p *Plugin) Init(log logger.Log, kv kv.Storage) error {
    log.Info("plugin initialized")
    return nil
}

License

This project is licensed under the MIT License — see the LICENSE file for details.

Directories

Path Synopsis
Package jobs defines interfaces for asynchronous job processing in RoadRunner.
Package jobs defines interfaces for asynchronous job processing in RoadRunner.
Package kv defines interfaces for key-value storage in RoadRunner.
Package kv defines interfaces for key-value storage in RoadRunner.
Package lock defines interfaces for a priority-based lock queue in RoadRunner.
Package lock defines interfaces for a priority-based lock queue in RoadRunner.
Package logger defines logging interfaces for RoadRunner plugins.
Package logger defines logging interfaces for RoadRunner plugins.
Package priorityqueue defines the base Item interface for priority queue elements in RoadRunner.
Package priorityqueue defines the base Item interface for priority queue elements in RoadRunner.
Package status defines the Status struct used to represent service health responses in RoadRunner.
Package status defines the Status struct used to represent service health responses in RoadRunner.

Jump to

Keyboard shortcuts

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