kvstore

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 kvstore provides a versioned JSONB key-value store with optimistic concurrency control. It is a thin HTTP API over a kv_store table with tenant isolation.

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 {
	MaxValueSize int `json:"max_value_size"` // max JSON value bytes; default 1 MB
}

Config controls kvstore behaviour.

type Plugin

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

Plugin implements a versioned JSONB key-value store with tenant isolation.

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 parses optional configuration and sets safe defaults.

func (*Plugin) Migrations

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

Migrations returns the database schema for the key-value store. Tables are idempotent (IF NOT EXISTS) and safe to run multiple times.

func (*Plugin) RegisterRoutes

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

Jump to

Keyboard shortcuts

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