Marketplace

providers

Other

Runtime, config-driven selection of capability backends for togo — swap impl/exec/compute/data/queue/storage backends over CLI, .env, or settings

togo-framework
bash
togo install togo-framework/providers

Install

bash
togo install togo-framework/providers

Runtime, config-driven selection of which backend is active for a capability — swap it over CLI / .env / settings without recompiling.

togo already has the registry (RegisterProviderFunc), the capability contracts (togo.Cache / Queue / Storage / Broker), the container (k.Set/Get), and the <capability>-<backend> plugin convention (storage-s3, realtime-nats, …). The one missing piece is picking which backend wins at runtime. This package adds exactly that — and nothing else. It stores no config itself; the settings plugin is the store.

Selection order (highest wins)

ini
1. env        TOGO_<CAP>_PROVIDER=iceberg      # or a CLI flag that sets it
2. settings   providers.<cap>.active           # togo.yaml / settings plugin
3. default    the backend registered with def=true

Use it — in a backend plugin

go
import "github.com/togo-framework/providers"

func init() {
  togo.RegisterProviderFunc("db-iceberg", togo.PriorityService, func(k *togo.Kernel) error {
    // installs itself as the "data" service ONLY if selected (def=false → opt-in)
    providers.Use(k, providers.CapData, "iceberg", newIceberg(k), false)
    return nil
  })
}

Read provider config the dynamic way (env → settings → default; secrets env-only):

go
url   := providers.Value(k, providers.CapExecute, "coder", "url",   "http://localhost:7080", false)
token := providers.Value(k, providers.CapExecute, "coder", "token", "",                      true) // secret

Capabilities

Constant
Contract
Backends
CapCache CapQueue CapStorage CapRealtimeexisting (togo core)e.g. storage-s3, queue-nats, realtime-nats
CapImplement CapExecuteautopilotclaude/omnigent, local/coder
CapComputeworkerworker-local/beam/spark/flink/databricks
CapData CapCatalog CapSharedb / catalog / sharingpg/iceberg/bigquery/databricks, …
Rows per page
1–4 of 4
Page 1 of 1

Install

bash
togo install togo-framework/providers

<div align="center"> <h3>💎 Premium sponsors</h3> <p> <a href="https://id8media.com"><img src=".github/assets/id8media.svg" height="44" alt="ID8 Media" /></a> &nbsp;&nbsp;&nbsp;&nbsp; <a href="https://one-studio.co"><img src=".github/assets/one-studio.jpeg" height="44" alt="One Studio" /></a> </p> <p><sub>Support togo — <a href="https://github.com/sponsors/fadymondy">become a sponsor</a>.</sub></p> </div>