SQLStreams

the messaging platform that is just Postgres

You last visited on 9999-99-99 Show what's new since then

API reference

Edit this page
Posted: 2026-09-12 · Report this thread
brandon Site Admin brandon profile Posts: 677

Everything a program spells lives in github.com/agentstax/sqlstreams/client: one client over your pool, a handle per resource named from it, the verbs on the handle they act on. The shape of the API explains why it looks that way; this board is the lookup table.

you holdyou get it fromverbsthread
Clientsqlstreams.NewClient(ctx, pool, cfg)Streams, Stream, Schedulers, Scheduler, System, Manager, InTransactionClient
*pgxpool.Poolsqlstreams.NewPostgresPool or pgxpool.Newyours to closePostgres pool
StreamHandle[T]client.Stream[T](name)Register, Get, Migrate, MigrationVersion, Rename, Destroy, Health, CompactionHeads, Consumers, and the handles under itStream
KeyHandle[T]stream.Key(messageKey)CompactionHead, LockCompactionHead, MessagesMessage key
ConsumerHandle[T], ConsumerInstance[T]stream.Consumer(name), then RegisterRegister, Get, Workers, Destroy, Binding; ConsumeConsumer
ProducerHandle[T], ProducerInstance[T]stream.Producer(), then RegisterRegister; Produce, ProduceBatch, ProduceFunc, ProduceInTx, ProduceFuncInTxProducer
SchedulerHandle, SchedulerInstance[T]client.Scheduler(name), then RegisterRegister, Get, Suspend, Unsuspend, Run, Status, Messages, Destroy; ScheduleScheduler
SystemHandleclient.System()Register, Get, Migrate, MigrationVersion, MigrateStreams, Destroy, BindingsSystem
ManagerHandleclient.Manager()RunManager
the metrics handles.Metrics() on the system, a stream, a consumerDefinitions, Snapshot, Latest, History, the built-in selectors, Metric, ProducerMetrics
the alert handles.Alerts() on the system, a stream, a consumerDefinitions, Latest, History, the built-in selectors, AlertAlerts
MessageOptions, RetryPolicyliterals inside configs and optionsFill, Clamp, ResolveConcurrency, Equal; CalculateDelay, CalculateTotalDelayMessage options
DiagnosticError, DiagnosticEvent, Ownerreturned errors, the Err* and Event* variablesGetCode, Recovery, Problem, Fix, With, errors.IsErrors and events

Every thread reads the same way: what the value is and how you get one, its verbs, its config fields with their defaults, then the traps. A SQL code in a table links to that code’s own thread on Troubleshooting.