Documentation
¶
Overview ¶
Package mqlite is the native Go SDK for mqlite (design §17.1). The same method set drives two modes:
Open — a remote client talking to an mqlite broker over HTTP.
OpenEmbedded — the queue engine in-process (like goqite), with same-DB
transactional enqueue and a one-line upgrade to a broker.
Settlement methods hang off *Message so the lock token never leaks into user code, and receive comes in two tiers: low-level Receive (you settle) and high-level Receiver.Run (handler returns nil -> Complete, error -> Abandon).
Example (Embedded) ¶
Example_embedded runs the whole queue in-process — no broker, no HTTP — against a local SQLite file, and shows the single-process / single-writer guarantee: a second opener of the same DB is rejected with ErrDBLocked (MQLITE-6 / MQLITE-15).
package main
import (
"context"
"errors"
"fmt"
"log"
"os"
"path/filepath"
"github.com/mqlitehq/mqlite"
)
func main() {
ctx := context.Background()
dir, err := os.MkdirTemp("", "mqlite-example-*")
if err != nil {
log.Fatal(err)
}
defer func() { _ = os.RemoveAll(dir) }()
dsn := "file:" + filepath.Join(dir, "mq.db")
eng, err := mqlite.OpenEmbedded(ctx, dsn)
if err != nil {
log.Fatal(err)
}
defer func() { _ = eng.Close() }()
if err := eng.CreateQueue(ctx, "orders", mqlite.QueueConfig{}); err != nil {
log.Fatal(err)
}
if _, err := eng.SendOne(ctx, "orders", mqlite.OutMessage{Body: []byte("order-42")}); err != nil {
log.Fatal(err)
}
msgs, err := eng.Receive(ctx, "orders", mqlite.RecvOpts{})
if err != nil {
log.Fatal(err)
}
for _, m := range msgs {
fmt.Printf("received: %s\n", m.Body)
_ = m.Complete(ctx) // at-least-once; the handler must be idempotent
}
// Embedded mode is single-writer: a second process — or a second OpenEmbedded on
// the same file — is rejected rather than racing the first.
if _, err := mqlite.OpenEmbedded(ctx, dsn); errors.Is(err, mqlite.ErrDBLocked) {
fmt.Println("second open rejected: single writer")
}
}
Output: received: order-42 second open rejected: single writer
Index ¶
- Constants
- Variables
- func EndpointIdentity(dsn string) (string, error)
- func GenerateKeyID() string
- func GenerateToken() string
- type AbandonOpts
- type AccessKey
- type Client
- func (c *Client) Cancel(ctx context.Context, queue string, seq int64) error
- func (c *Client) Close() error
- func (c *Client) CompleteBatch(ctx context.Context, queue string, msgs ...*Message) ([]SettleResult, error)
- func (c *Client) CreateKey(ctx context.Context, opts CreateKeyOptions) (CreateKeyResult, error)
- func (c *Client) CreateQueue(ctx context.Context, name string, cfg QueueConfig) error
- func (c *Client) DeleteQueue(ctx context.Context, name string) error
- func (c *Client) DeleteQueueWithOptions(ctx context.Context, name string, opts ...DeleteQueueOpts) (DeleteResult, error)
- func (c *Client) DeleteSubscription(ctx context.Context, topic, name string) error
- func (c *Client) DeleteSubscriptionWithOptions(ctx context.Context, topic, name string, opts ...DeleteSubscriptionOpts) (DeleteResult, error)
- func (c *Client) ListKeys(ctx context.Context, afterID string, limit int) (KeyPage, error)
- func (c *Client) ListKeysWithOptions(ctx context.Context, opts ListKeysOptions) (KeyPage, error)
- func (c *Client) ListQueues(ctx context.Context) ([]QueueInfo, error)
- func (c *Client) ListSubscriptions(ctx context.Context) ([]SubscriptionInfo, error)
- func (c *Client) ListSubscriptionsWithOptions(ctx context.Context, opts ListSubscriptionsOptions) (SubscriptionPage, error)
- func (c *Client) Message(queue string, seq int64, lockToken string) *Message
- func (c *Client) Observe(ctx context.Context) (Observation, error)
- func (c *Client) Peek(ctx context.Context, queue string, opts ...PeekOpts) ([]*PeekedMessage, error)
- func (c *Client) Purge(ctx context.Context, queue string, opts ...PurgeOpts) (int, error)
- func (c *Client) Receive(ctx context.Context, queue string, opts ...RecvOpts) ([]*Message, error)
- func (c *Client) Receiver(queue string, opts ...ReceiverOption) *Receiver
- func (c *Client) Redrive(ctx context.Context, dlqQueue string, opts ...RedriveOpts) (int, error)
- func (c *Client) RenewBatch(ctx context.Context, queue string, msgs ...*Message) ([]SettleResult, error)
- func (c *Client) RevokeKey(ctx context.Context, id string) error
- func (c *Client) Send(ctx context.Context, queue string, msgs ...OutMessage) ([]int64, error)
- func (c *Client) SendOne(ctx context.Context, queue string, m OutMessage, opts ...SendOpts) (int64, error)
- func (c *Client) Stats(ctx context.Context, queue string) (Metrics, error)
- func (c *Client) Status(ctx context.Context) (StatusInfo, error)
- func (c *Client) Subscribe(ctx context.Context, topic, name string, f *Filter) error
- func (c *Client) SubscribeWithOptions(ctx context.Context, topic, name string, f *Filter, opts SubscribeOptions) error
- func (c *Client) TestFilter(ctx context.Context, expr string, sample *OutMessage, ...) (FilterTestResult, error)
- type CreateKeyOptions
- type CreateKeyResult
- type DeleteQueueOpts
- type DeleteResult
- type DeleteSubscriptionOpts
- type Embedded
- func (e *Embedded) Cancel(ctx context.Context, queue string, seq int64) error
- func (e *Embedded) Close() error
- func (e *Embedded) Compact(ctx context.Context, full bool) error
- func (e *Embedded) CompleteBatch(ctx context.Context, queue string, msgs ...*Message) ([]SettleResult, error)
- func (e *Embedded) CreateKey(ctx context.Context, opts CreateKeyOptions) (CreateKeyResult, error)
- func (e *Embedded) CreateQueue(ctx context.Context, name string, cfg QueueConfig) error
- func (e *Embedded) DeleteQueue(ctx context.Context, name string) error
- func (e *Embedded) DeleteQueueWithOptions(ctx context.Context, name string, opts ...DeleteQueueOpts) (DeleteResult, error)
- func (e *Embedded) DeleteSubscription(ctx context.Context, topic, name string) error
- func (e *Embedded) DeleteSubscriptionWithOptions(ctx context.Context, topic, name string, opts ...DeleteSubscriptionOpts) (DeleteResult, error)
- func (e *Embedded) Engine() *engine.Engine
- func (e *Embedded) ListKeys(ctx context.Context, afterID string, limit int) (KeyPage, error)
- func (e *Embedded) ListKeysWithOptions(ctx context.Context, opts ListKeysOptions) (KeyPage, error)
- func (e *Embedded) ListQueues(ctx context.Context) ([]QueueInfo, error)
- func (e *Embedded) ListSubscriptions(ctx context.Context) ([]SubscriptionInfo, error)
- func (e *Embedded) ListSubscriptionsWithOptions(ctx context.Context, opts ListSubscriptionsOptions) (SubscriptionPage, error)
- func (e *Embedded) Message(queue string, seq int64, lockToken string) *Message
- func (e *Embedded) Observe(ctx context.Context) (Observation, error)
- func (e *Embedded) Peek(ctx context.Context, queue string, opts ...PeekOpts) ([]*PeekedMessage, error)
- func (e *Embedded) Purge(ctx context.Context, queue string, opts ...PurgeOpts) (int, error)
- func (e *Embedded) Receive(ctx context.Context, queue string, opts ...RecvOpts) ([]*Message, error)
- func (e *Embedded) Receiver(queue string, opts ...ReceiverOption) *Receiver
- func (e *Embedded) Redrive(ctx context.Context, dlqQueue string, opts ...RedriveOpts) (int, error)
- func (e *Embedded) RenewBatch(ctx context.Context, queue string, msgs ...*Message) ([]SettleResult, error)
- func (e *Embedded) RevokeKey(ctx context.Context, id string) error
- func (e *Embedded) Send(ctx context.Context, queue string, msgs ...OutMessage) ([]int64, error)
- func (e *Embedded) SendOne(ctx context.Context, queue string, m OutMessage, opts ...SendOpts) (int64, error)
- func (e *Embedded) Serve(ctx context.Context, addr string, opts ...ServeOption) error
- func (e *Embedded) Stats(ctx context.Context, queue string) (Metrics, error)
- func (e *Embedded) Status(ctx context.Context) (StatusInfo, error)
- func (e *Embedded) Subscribe(ctx context.Context, topic, name string, f *Filter) error
- func (e *Embedded) SubscribeWithOptions(ctx context.Context, topic, name string, f *Filter, opts SubscribeOptions) error
- func (e *Embedded) TestFilter(ctx context.Context, expr string, sample *OutMessage, ...) (FilterTestResult, error)
- func (e *Embedded) Tx(ctx context.Context, fn func(*engine.EngineTx) error) error
- type EmbeddedOption
- func WithClock(now func() int64) EmbeddedOption
- func WithDBAuthToken(tok string) EmbeddedOption
- func WithDLQRetention(maxAge time.Duration, maxCount int, maxBytes int64) EmbeddedOption
- func WithLogger(lg *slog.Logger) EmbeddedOption
- func WithMaxMessageBytes(n int64) EmbeddedOption
- func WithMaxSubscriptions(n int) EmbeddedOption
- func WithSynchronous(mode string) EmbeddedOption
- func WithoutBackground() EmbeddedOption
- type Filter
- type FilterTestResult
- type KeyPage
- type ListKeysOptions
- type ListSubscriptionsOptions
- type Message
- func (m *Message) Abandon(ctx context.Context, opts ...AbandonOpts) error
- func (m *Message) Complete(ctx context.Context) error
- func (m *Message) Defer(ctx context.Context) error
- func (m *Message) LockToken() string
- func (m *Message) Reject(ctx context.Context, opts ...RejectOpts) error
- func (m *Message) Renew(ctx context.Context) error
- type Metrics
- type Observation
- type Option
- type OrderingMode
- type OutMessage
- type PeekOpts
- type PeekedMessage
- type PurgeOpts
- type QueueConfig
- type QueueInfo
- type Receiver
- type ReceiverOption
- type RecvOpts
- type RedriveOpts
- type RejectOpts
- type SendOpts
- type ServeOption
- func WithCORS(origin string) ServeOption
- func WithMetrics(on bool) ServeOption
- func WithMonitorTokens(tokens ...string) ServeOption
- func WithReady(fn func()) ServeOption
- func WithRequestLog(lg *slog.Logger) ServeOption
- func WithTokenCSV(csv string) ServeOption
- func WithTokens(tokens ...string) ServeOption
- func WithUI(on bool) ServeOption
- func WithVersion(v string) ServeOption
- type SettleResult
- type State
- type StatusInfo
- type SubscribeOptions
- type SubscriptionInfo
- type SubscriptionPage
- type SubscriptionPageItem
Examples ¶
Constants ¶
const ( OrderStandard = engine.OrderStandard OrderGroupFIFO = engine.OrderGroupFIFO OrderStrictFIFO = engine.OrderStrictFIFO )
const ( Active = engine.StateActive Locked = engine.StateLocked Deferred = engine.StateDeferred Scheduled = engine.StateScheduled DeadLettered = engine.StateDeadLettered )
const MaxRenewBatch = engine.MaxRenewBatch
MaxRenewBatch is the most messages one RenewBatch call may renew. Renewal must fit in a single statement so that every Ok is decided against ONE clock reading rather than drifting across a chunked write — see engine.MaxRenewBatch. Ok does not promise the lease is still live when you read it; SettleResult.LockedUntil is the deadline that was committed, and that is what to pace yourself by. Receive hands out at most 256 messages, so a consumer never meets this cap by accident; a caller holding more renews in several calls.
const TokenPrefix = authkey.Prefix
TokenPrefix is the conventional prefix for a broker auth token, so a token is recognizable at a glance (and greppable in logs/config). It is a convention, not a requirement — any non-empty string in MQLITE_TOKENS is accepted as a token.
Variables ¶
var ( ErrLockLost = engine.ErrLockLost ErrUnauthenticated = engine.ErrUnauthenticated ErrPermissionDenied = engine.ErrPermissionDenied ErrKeyConflict = engine.ErrKeyConflict ErrOutcomeUnknown = engine.ErrOutcomeUnknown ErrInvalidArgument = engine.ErrInvalidArgument ErrNotFound = engine.ErrNotFound ErrUnsupported = engine.ErrUnsupported ErrQueueNotFound = engine.ErrQueueNotFound ErrDedupConflict = engine.ErrDedupConflict ErrMessageTooLarge = engine.ErrMessageTooLarge ErrNameConflict = engine.ErrNameConflict ErrQueueNotEmpty = engine.ErrQueueNotEmpty ErrSubscriptionNotFound = engine.ErrSubscriptionNotFound ErrSubscriptionNotEmpty = engine.ErrSubscriptionNotEmpty ErrSubscriptionLimit = engine.ErrSubscriptionLimit ErrGroupRequired = engine.ErrGroupRequired // ErrDBLocked is returned by OpenEmbedded when the local file DB is already open // in another process: embedded mode is single-process, single-writer (MQLITE-6). ErrDBLocked = engine.ErrDBLocked // ErrClosed is returned by an operation that starts during or after Close: once Close begins, // new work is refused immediately rather than racing a store being torn down (round-8). ErrClosed = engine.ErrClosed )
Re-exported sentinel errors so callers can use errors.Is on either mode.
Functions ¶
func EndpointIdentity ¶ added in v0.3.0
EndpointIdentity returns the identity of the broker an endpoint string addresses: it is literally the base URL the client would dial, i.e. the string Client.post concatenates the RPC route onto. Two endpoints reach the same broker exactly when this value is equal.
Use it to answer "are these two endpoints the same broker?" — the question that decides whether an ambient token may be reused for an endpoint the caller overrode.
It deliberately does NOT try to canonicalize a URL. Deciding which parts of a URL are "insignificant" is a losing game — the path, percent-escaping, a query, a fragment, an IPv6 zone id and host case all change (or fail to change) where a reverse proxy actually routes the request, and every component you normalize away is a chance to call two different brokers the same and hand one of them the other's credential. Comparing the dialed string itself cannot make that mistake: if the bytes we send differ, we treat it as a different broker and withhold the token. The failure mode is a warning and an explicit --token, never a leak.
What it does normalize is only what parseDSN already normalizes to build the dial target — an insignificant trailing slash (the reported bug: `http://h:6754/` cost the caller their token), the product default port for the custom schemes, and a credential embedded in an `mqlite://token@host` DSN (which is not part of the target).
func GenerateKeyID ¶ added in v0.3.1
func GenerateKeyID() string
GenerateKeyID generates a public access key ID (32 lowercase hex characters). Retain the ID before calling CreateKey so an uncertain result can be reconciled. Like GenerateToken, it panics if the secure random source fails.
func GenerateToken ¶ added in v0.1.1
func GenerateToken() string
GenerateToken mints a fresh broker auth token: the "mqk_" prefix plus 256 bits of crypto/rand, hex-encoded ("mqk_" + 64 lowercase hex characters). Use it to seed MQLITE_TOKENS / WithTokens, or let `mqlite serve` call it automatically when no token is configured (secure by default). It panics if the secure random source fails.
Types ¶
type AbandonOpts ¶
type AbandonOpts struct {
Delay time.Duration // re-hide for this long before redelivery (backoff)
}
AbandonOpts configures a Message.Abandon call.
type AccessKey ¶ added in v0.3.1
AccessKey is public key metadata. It never contains a token or its digest. Permissions are send, listen, or manage (which includes send and listen). All timestamps are UTC epoch milliseconds; zero means no expiry or revocation.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a remote mqlite client (Connect-style JSON over HTTP).
func (*Client) CompleteBatch ¶ added in v0.1.1
func (c *Client) CompleteBatch(ctx context.Context, queue string, msgs ...*Message) ([]SettleResult, error)
CompleteBatch completes many messages in one request (one settlement RPC instead of N), returning a per-message result so a caller can see which sequence numbers settled.
func (*Client) CreateKey ¶ added in v0.3.1
func (c *Client) CreateKey(ctx context.Context, opts CreateKeyOptions) (CreateKeyResult, error)
CreateKey creates a managed credential. The caller must have manage permission. It sends one request and never retries a lost response: retain opts.ID to list and revoke a possibly-created key before issuing a replacement.
func (*Client) CreateQueue ¶
CreateQueue creates or updates a queue.
func (*Client) DeleteQueue ¶ added in v0.3.3
DeleteQueue removes an empty plain queue. An accepted deletion returns nil whether bounded physical cleanup completed in this call or continues in the background. Use DeleteQueueWithOptions to force-discard retained messages or inspect the accepted deletion state.
func (*Client) DeleteQueueWithOptions ¶ added in v0.4.0
func (c *Client) DeleteQueueWithOptions(ctx context.Context, name string, opts ...DeleteQueueOpts) (DeleteResult, error)
DeleteQueueWithOptions returns the accepted deletion state.
func (*Client) DeleteSubscription ¶ added in v0.4.0
DeleteSubscription removes an empty subscription. An accepted deletion returns nil whether bounded physical cleanup completed in this call or continues in the background. Use DeleteSubscriptionWithOptions to force-discard retained messages or inspect the accepted deletion state.
func (*Client) DeleteSubscriptionWithOptions ¶ added in v0.4.0
func (c *Client) DeleteSubscriptionWithOptions(ctx context.Context, topic, name string, opts ...DeleteSubscriptionOpts) (DeleteResult, error)
DeleteSubscriptionWithOptions returns the accepted deletion state.
func (*Client) ListKeys ¶ added in v0.3.1
ListKeys lists managed credentials without secrets in ascending ID order. Limit defaults to 100 and may not exceed 1000. Static administrator tokens are not part of this list. Use ListKeysWithOptions to list newest-created keys first.
func (*Client) ListKeysWithOptions ¶ added in v0.3.1
ListKeysWithOptions lists managed metadata in the requested sort order. Limit defaults to 100 and may not exceed 1000. No token or digest is returned.
func (*Client) ListQueues ¶
ListQueues lists queues/subscriptions.
func (*Client) ListSubscriptions ¶ added in v0.3.0
func (c *Client) ListSubscriptions(ctx context.Context) ([]SubscriptionInfo, error)
ListSubscriptions returns every active, unexpired subscription with its topic and filter expression.
Compatibility note: use ListSubscriptionsWithOptions for bounded inventory and lifecycle reconciliation, including deleting name reservations.
func (*Client) ListSubscriptionsWithOptions ¶ added in v0.4.0
func (c *Client) ListSubscriptionsWithOptions(ctx context.Context, opts ListSubscriptionsOptions) (SubscriptionPage, error)
ListSubscriptionsWithOptions returns one internally consistent subscription page. Separate page requests may observe concurrent roster changes.
func (*Client) Message ¶ added in v0.3.0
CompleteBatch completes many received messages in one round-trip — the fix for the drain N+1 (settling a received batch one HTTP call at a time). Messages should share one queue; a stale lock comes back as Ok=false rather than failing the batch. Message rehydrates a settleable handle for a message you already received but did not settle (e.g. `mqlite receive --no-ack`, then settle in a later invocation). Pass the queue, its SequenceNumber, and the LockToken() from that receive; the returned *Message settles through this Client (Complete/Abandon/Reject/Defer/Renew).
func (*Client) Observe ¶ added in v0.3.2
func (c *Client) Observe(ctx context.Context) (Observation, error)
Observe returns canonical queue, storage, maintenance and HTTP measurements.
func (*Client) Peek ¶
func (c *Client) Peek(ctx context.Context, queue string, opts ...PeekOpts) ([]*PeekedMessage, error)
Peek browses without locking.
func (*Client) Purge ¶
Purge permanently deletes dead-lettered messages (PurgeOpts scopes it; no opts purges the whole DLQ). Returns count deleted.
func (*Client) Receive ¶
Receive claims up to N messages (Peek-Lock by default), with optional long-poll. RecvOpts.Pick fetches previously-deferred messages by seq instead of claiming.
func (*Client) Receiver ¶
func (c *Client) Receiver(queue string, opts ...ReceiverOption) *Receiver
Receiver returns a stateful receive loop bound to this client.
func (*Client) RenewBatch ¶ added in v0.3.0
func (c *Client) RenewBatch(ctx context.Context, queue string, msgs ...*Message) ([]SettleResult, error)
RenewBatch extends the lock lease of many messages in ONE request, returning a per-message result. Renewing a batch with N separate Renew calls costs N round trips — on a slow link that outlasts the very lease it is trying to save (a 64-message batch on a 50ms link needs 3.2s of renewals against a 2s lease), so the locks expire mid-renewal.
SettleResult.LockedUntil is the deadline the broker committed, and it — not Ok — is the fact to pace yourself by. Ok says the lease was live when the broker's STATEMENT finished; the response still has to travel back to you, so on a very short lease it can lapse on the way. Compare LockedUntil against your own clock.
func (*Client) RevokeKey ¶ added in v0.3.1
RevokeKey permanently revokes a managed key. Repeating a successful revocation succeeds; an unknown ID returns ErrNotFound. Static tokens cannot be revoked.
func (*Client) Send ¶
Send enqueues one or many messages in one request/transaction (use SendOne for a single seq return or At() scheduling).
func (*Client) SendOne ¶
func (c *Client) SendOne(ctx context.Context, queue string, m OutMessage, opts ...SendOpts) (int64, error)
SendOne enqueues one message and returns its seq. A dedup conflict (same id, different body) surfaces as ErrDedupConflict. SendOpts.At schedules delayed delivery.
func (*Client) Status ¶ added in v0.3.0
func (c *Client) Status(ctx context.Context) (StatusInfo, error)
Status returns a desensitized snapshot of the broker's backend (never a token or DSN).
func (*Client) Subscribe ¶
Subscribe registers a subscription under a topic with an optional filter.
func (*Client) SubscribeWithOptions ¶ added in v0.4.0
func (c *Client) SubscribeWithOptions(ctx context.Context, topic, name string, f *Filter, opts SubscribeOptions) error
SubscribeWithOptions creates or updates a subscription and optionally assigns a fixed lifetime on first creation. Supplying zero TTL preserves the lifetime of an existing subscription.
func (*Client) TestFilter ¶ added in v0.3.0
func (c *Client) TestFilter(ctx context.Context, expr string, sample *OutMessage, enqueuedAtMs, visibleAtMs int64) (FilterTestResult, error)
TestFilter dry-runs a subscription filter expression: it compiles expr and, when sample is non-nil, evaluates it against that message (nothing is enqueued). Read-only.
type CreateKeyOptions ¶ added in v0.3.1
type CreateKeyOptions = wire.CreateKeyRequest
CreateKeyOptions describes a new broker-wide credential. ID is required: generate it with GenerateKeyID before calling CreateKey and retain it if the response is lost. A repeated ID returns ErrKeyConflict; an existing secret is never returned.
type CreateKeyResult ¶ added in v0.3.1
type CreateKeyResult = wire.CreateKeyResponse
CreateKeyResult contains the credential's metadata and its one-time secret. Store Token securely: neither ListKeys nor a repeated CreateKey can recover it.
type DeleteQueueOpts ¶ added in v0.3.3
type DeleteQueueOpts struct {
Force bool // retire immediately and discard retained messages during bounded cleanup
}
DeleteQueueOpts configures queue deletion.
type DeleteResult ¶ added in v0.4.0
type DeleteResult = engine.DeleteResult
DeleteResult reports whether physical removal is complete or cleanup is pending.
type DeleteSubscriptionOpts ¶ added in v0.4.0
type DeleteSubscriptionOpts struct {
Force bool // retire immediately and discard retained messages during bounded cleanup
}
DeleteSubscriptionOpts configures subscription deletion.
type Embedded ¶
type Embedded struct {
// contains filtered or unexported fields
}
Embedded runs the queue engine in-process (like goqite), exposing the same method set as the remote Client plus same-DB transactional enqueue (Tx) and a one-line upgrade to a network broker (Serve). See design §4.5.
func OpenEmbedded ¶
OpenEmbedded opens the engine on a DB DSN: file:./mq.db | :memory: | libsql://host
func (*Embedded) Close ¶
Close shuts the engine down safely: it stops the background loops, closes the admission gate (any DB operation that starts after shutdown begins fails fast with ErrClosed), wakes empty long-poll Receives with ErrClosed, waits for already-admitted writes and transactions to finish, and only then closes the DB and releases the file lock. Returns the teardown error, if any.
Because it waits for in-flight work, Close MUST NOT be called from inside an operation it would wait for — in particular, not from within a Tx callback (see Tx). Doing so deadlocks.
func (*Embedded) Compact ¶ added in v0.1.1
Compact reclaims free DB pages to the OS: `PRAGMA incremental_vacuum` (no global lock; new local DBs default to auto_vacuum=INCREMENTAL), or a full `VACUUM` when full=true (rewrites the file, global lock — maintenance only). Local-only.
func (*Embedded) CompleteBatch ¶ added in v0.1.1
func (e *Embedded) CompleteBatch(ctx context.Context, queue string, msgs ...*Message) ([]SettleResult, error)
CompleteBatch completes many messages in one transaction, returning a per-message result.
func (*Embedded) CreateKey ¶ added in v0.3.1
func (e *Embedded) CreateKey(ctx context.Context, opts CreateKeyOptions) (CreateKeyResult, error)
CreateKey creates a managed credential in the embedded database. Embedded mode is trusted local administration and does not require a bearer token.
func (*Embedded) CreateQueue ¶
func (*Embedded) DeleteQueue ¶ added in v0.3.3
DeleteQueue removes an empty plain queue. An accepted deletion returns nil whether bounded physical cleanup completed in this call or continues in the background. Use DeleteQueueWithOptions to force-discard retained messages or inspect the accepted deletion state.
func (*Embedded) DeleteQueueWithOptions ¶ added in v0.4.0
func (e *Embedded) DeleteQueueWithOptions(ctx context.Context, name string, opts ...DeleteQueueOpts) (DeleteResult, error)
DeleteQueueWithOptions reports whether physical cleanup is complete.
func (*Embedded) DeleteSubscription ¶ added in v0.4.0
DeleteSubscription removes an empty subscription. An accepted deletion returns nil whether bounded physical cleanup completed in this call or continues in the background. Use DeleteSubscriptionWithOptions to force-discard retained messages or inspect the accepted deletion state.
func (*Embedded) DeleteSubscriptionWithOptions ¶ added in v0.4.0
func (e *Embedded) DeleteSubscriptionWithOptions(ctx context.Context, topic, name string, opts ...DeleteSubscriptionOpts) (DeleteResult, error)
DeleteSubscriptionWithOptions reports whether physical cleanup is complete.
func (*Embedded) ListKeys ¶ added in v0.3.1
ListKeys lists managed metadata in the embedded database in ascending ID order.
func (*Embedded) ListKeysWithOptions ¶ added in v0.3.1
ListKeysWithOptions lists managed metadata in the requested sort order in the embedded database, with the same limits and cursor rules as the HTTP client.
func (*Embedded) ListQueues ¶
func (*Embedded) ListSubscriptions ¶ added in v0.3.0
func (e *Embedded) ListSubscriptions(ctx context.Context) ([]SubscriptionInfo, error)
ListSubscriptions returns every active, unexpired subscription with its topic and filter expression.
Compatibility note: use ListSubscriptionsWithOptions for bounded inventory and lifecycle reconciliation, including deleting name reservations.
func (*Embedded) ListSubscriptionsWithOptions ¶ added in v0.4.0
func (e *Embedded) ListSubscriptionsWithOptions(ctx context.Context, opts ListSubscriptionsOptions) (SubscriptionPage, error)
ListSubscriptionsWithOptions returns one internally consistent subscription page. Separate page requests may observe concurrent roster changes.
func (*Embedded) Message ¶ added in v0.3.0
CompleteBatch completes many received messages in one transaction (mirrors the remote Client method; for the in-process engine there is no round-trip to save, but it keeps the API symmetric and settles atomically). Message rehydrates a settleable handle for a message you already received but did not settle (the embedded twin of Client.Message). Pass the queue, its SequenceNumber, and the LockToken() from that receive; the returned *Message settles through this engine.
func (*Embedded) Observe ¶ added in v0.3.2
func (e *Embedded) Observe(ctx context.Context) (Observation, error)
Observe samples the same canonical observation as the broker. HTTP measurements are explicitly not applicable to an in-process engine.
func (*Embedded) Purge ¶
Purge permanently deletes dead-lettered messages (PurgeOpts scopes it; no opts purges the whole DLQ). Returns count deleted.
func (*Embedded) Receiver ¶
func (e *Embedded) Receiver(queue string, opts ...ReceiverOption) *Receiver
Receiver returns a stateful receive loop bound to the embedded engine.
func (*Embedded) RenewBatch ¶ added in v0.3.0
func (e *Embedded) RenewBatch(ctx context.Context, queue string, msgs ...*Message) ([]SettleResult, error)
RenewBatch extends the lock lease of many messages in ONE STATEMENT — deliberately not a transaction (the embedded twin of Client.RenewBatch), returning a per-message result.
SettleResult.LockedUntil is the deadline actually committed, and it — not Ok — is the fact to pace yourself by. Ok says the lease was live when the STATEMENT finished, which is already in the past by the time you read it: nothing is encoded or sent in embedded mode, but your own handling still takes time and a very short lease can lapse inside it. Compare LockedUntil against your own clock rather than trusting Ok to still hold.
func (*Embedded) RevokeKey ¶ added in v0.3.1
RevokeKey permanently revokes a managed credential in the embedded database.
func (*Embedded) SendOne ¶
func (e *Embedded) SendOne(ctx context.Context, queue string, m OutMessage, opts ...SendOpts) (int64, error)
SendOne enqueues one message. A dedup conflict surfaces as ErrDedupConflict. SendOpts.At schedules delayed delivery.
func (*Embedded) Status ¶ added in v0.3.0
func (e *Embedded) Status(ctx context.Context) (StatusInfo, error)
Status returns a desensitized snapshot of the local backend (the embedded twin of Client.Status). Version is empty and UptimeMs/Auth are zero-valued — an in-process engine has no broker build stamp, no process uptime and no auth; queue/subscription counts are live.
func (*Embedded) SubscribeWithOptions ¶ added in v0.4.0
func (e *Embedded) SubscribeWithOptions(ctx context.Context, topic, name string, f *Filter, opts SubscribeOptions) error
SubscribeWithOptions creates or updates a subscription and optionally assigns a fixed lifetime on first creation. Supplying zero TTL preserves the lifetime of an existing subscription.
func (*Embedded) TestFilter ¶ added in v0.3.0
func (e *Embedded) TestFilter(ctx context.Context, expr string, sample *OutMessage, enqueuedAtMs, visibleAtMs int64) (FilterTestResult, error)
TestFilter dry-runs a subscription filter expression against an optional sample message (nothing is enqueued) — the embedded twin of Client.TestFilter.
func (*Embedded) Tx ¶
Tx runs business writes and enqueues in one transaction (§4.5, embedded-only): business success ⇔ message enqueued, with no dual-write window.
On a local store, use tx.Context() for raw tx.SQL() statements and check the original ctx between them. Raw SQL bypasses mqlite's per-statement cancellation guards and can still execute after ctx is cancelled. It is supported for caller-owned tables, not direct changes to mqlite's internal tables. The callback must return before the writer is released; cancellation observed before commit rolls back the whole transaction, even if the callback returns nil. An already-cancelled caller never enters the callback. See engine.EngineTx.SQL and engine.EngineTx.Context.
ON A REMOTE (Turso/libSQL) STORE, fn MAY RUN MORE THAN ONCE. A transaction that fails on a retryable connection or busy error is replayed from the start — the database work rolls back, so the DATA stays correct, but anything else fn did will have happened twice. Keep fn to transaction-bound work: SQL through the provided handle, and nothing else. A charge, an email, a counter in memory, an HTTP call — none of those roll back with the transaction, and a replay will repeat them (round-4 §5.2). Local file and :memory: stores never retry, so fn runs at most once there.
fn MUST NOT call Close: Close waits for the open transaction to finish before tearing the engine down, and fn cannot finish until it returns, so it would deadlock. Close from outside the callback.
type EmbeddedOption ¶
type EmbeddedOption func(*embeddedConfig)
EmbeddedOption configures OpenEmbedded.
func WithClock ¶
func WithClock(now func() int64) EmbeddedOption
WithClock injects a test clock returning epoch ms.
func WithDBAuthToken ¶
func WithDBAuthToken(tok string) EmbeddedOption
WithDBAuthToken supplies the auth token for a remote libSQL/Turso DSN. The token is passed in by the caller (typically from an env var) — never compiled in.
func WithDLQRetention ¶ added in v0.1.1
func WithDLQRetention(maxAge time.Duration, maxCount int, maxBytes int64) EmbeddedOption
WithDLQRetention bounds the dead-letter queue so a long-running broker can't grow without limit (MQLITE-21). A background pass drops dead letters oldest-first when they are older than maxAge, beyond maxCount per queue, or over maxBytes of body per queue; pass 0 to leave a dimension unbounded. ONLY the DLQ is affected — undelivered and in-flight messages are never deleted. Off by default for the embedded library; the `mqlite serve` broker enables a sane default (see cmd/mqlite).
func WithLogger ¶
func WithLogger(lg *slog.Logger) EmbeddedOption
WithLogger routes background-loop failures to lg (nil -> slog.Default()).
func WithMaxMessageBytes ¶
func WithMaxMessageBytes(n int64) EmbeddedOption
WithMaxMessageBytes caps message body size (0 -> 1 MiB default).
func WithMaxSubscriptions ¶ added in v0.4.0
func WithMaxSubscriptions(n int) EmbeddedOption
WithMaxSubscriptions caps the total active and deleting subscriptions. Zero uses the engine default.
func WithSynchronous ¶
func WithSynchronous(mode string) EmbeddedOption
WithSynchronous sets the local SQLite PRAGMA synchronous level — the durability vs throughput knob (MQLITE-7). "NORMAL" (default) is fast and durable across a process crash, but a sudden OS/power loss can drop the last few not-yet- checkpointed commits; "FULL" fsyncs every commit (safer, slower). Database-wide (SQLite has no per-queue sync); ignored for remote Turso DSNs.
func WithoutBackground ¶
func WithoutBackground() EmbeddedOption
WithoutBackground disables the maintenance loops (tests drive them manually).
type FilterTestResult ¶ added in v0.3.0
type FilterTestResult = engine.FilterTestResult
FilterTestResult mirrors engine.FilterTestResult — the dry-run of a filter expression.
type KeyPage ¶ added in v0.3.1
type KeyPage = wire.ListKeysResponse
KeyPage is a page of metadata, including revoked and expired keys. Pass NextAfterID to the next list request with the same sort order; an empty value marks the final page.
type ListKeysOptions ¶ added in v0.3.1
type ListKeysOptions = wire.ListKeysRequest
ListKeysOptions selects a metadata page. Sort is "id_asc" (the default) or "created_desc" (creation time descending, then ID descending for ties). Keep the same Sort when passing a page's NextAfterID as AfterID. In created_desc order, AfterID must identify an existing key, including revoked or expired keys.
type ListSubscriptionsOptions ¶ added in v0.4.0
type ListSubscriptionsOptions = engine.ListSubscriptionsOptions
ListSubscriptionsOptions configures a consistent subscription inventory page. Separate page requests may observe concurrent roster changes.
type Message ¶
type Message struct {
SequenceNumber int64
Body []byte
MessageID string
GroupID string
CorrelationID string
ReplyTo string
Subject string
ContentType string
Properties map[string]string
DeliveryCount int
EnqueuedAt time.Time
LockedUntil time.Time
// contains filtered or unexported fields
}
Message is a delivered message handle. The lock token is held internally so settlement through the Complete/Abandon/… methods can't be misrouted (§17.1); LockToken() exposes it for callers that must settle out of band (e.g. the CLI across processes).
func (*Message) Abandon ¶
func (m *Message) Abandon(ctx context.Context, opts ...AbandonOpts) error
Abandon releases the lock for immediate redelivery (optionally after a delay).
func (*Message) LockToken ¶ added in v0.3.0
LockToken returns the Peek-Lock fencing token for this message. Normal SDK use never needs it — settle through the Complete/Abandon/… methods and the token stays internal. It is exposed for callers that must settle out of band across process boundaries (the `mqlite` CLI: receive with --no-ack, print the token, settle it in a later invocation via Client.Message / Embedded.Message). The same token is already in every Receive HTTP response, so this exposes nothing the wire protocol doesn't.
type Observation ¶ added in v0.3.2
type Observation = wire.ObserveResponse
Observation is the canonical broker and engine observation. Check Collection.State before interpreting queue gauges; process counters reset when the engine restarts.
type Option ¶
type Option func(*config)
Option configures Open.
func WithHTTPClient ¶
WithHTTPClient supplies a custom *http.Client (e.g. for TLS config).
type OrderingMode ¶
type OrderingMode = engine.OrderingMode
OrderingMode mirrors engine.OrderingMode for queue-level delivery ordering.
type OutMessage ¶
type OutMessage struct {
Body []byte
MessageID string // dedup/idempotency key; empty -> body SHA-256 when dedup on
// GroupID is an ordering/partition key (= SQS MessageGroupId, ASB SessionId):
// same GroupID = strict in-order (FIFO per group); empty = own group (max
// parallelism). NOT a consumer group — competing consumers just Receive the
// same queue; peek-lock gives each message to exactly one.
GroupID string
CorrelationID string
ReplyTo string // = ASB ReplyTo; opaque address the consumer should reply to
Subject string // = ASB Label
ContentType string
Properties map[string]string // custom KV (headers)
TTL time.Duration // 0 -> queue default
}
OutMessage is a message to send. Body is opaque; broker never parses it.
type PeekOpts ¶
type PeekOpts struct {
From int64 // start browsing at this seq
State State // filter by state
Max int // cap results
}
PeekOpts configures a Peek call.
type PeekedMessage ¶
type PeekedMessage struct {
SequenceNumber int64
State State
Body []byte
MessageID string
GroupID string
CorrelationID string
ReplyTo string
Subject string
ContentType string
Properties map[string]string
DeliveryCount int
EnqueuedAt time.Time
VisibleAt time.Time
ExpiresAt time.Time // TTL expiry (zero = no TTL)
LockedUntil time.Time
// Dead-letter metadata, set for messages in the dead_lettered state (triage).
DeadLetterReason string
DeadLetterDescription string
}
PeekedMessage is a read-only browse result.
type PurgeOpts ¶
type PurgeOpts struct {
Max int // cap how many messages are deleted
OlderThan time.Duration // only delete messages older than this
}
PurgeOpts configures a Purge call.
type QueueConfig ¶
type QueueConfig struct {
LockDuration time.Duration
MaxDeliveryCount int
DefaultTTL time.Duration
DeadLetterOnExpire *bool
DedupWindow time.Duration
Ordering OrderingMode // "" -> standard
// Per-queue DLQ retention overrides (MQLITE-29). For each: 0 -> inherit the
// broker default; >0 -> this queue's drop-oldest bound; a negative value ->
// explicitly unbounded (opt out of the default).
DLQMaxAge time.Duration
DLQMaxCount int
DLQMaxBytes int64
}
QueueConfig configures a queue (durations as time.Duration).
type Receiver ¶
type Receiver struct {
// contains filtered or unexported fields
}
Receiver is a stateful receive loop. handler returning nil auto-Completes; returning error auto-Abandons (§17.1).
type ReceiverOption ¶
type ReceiverOption func(*receiverConfig)
ReceiverOption configures a Receiver.
func WithAutoRenew ¶
func WithAutoRenew() ReceiverOption
WithAutoRenew keeps locks alive with a background heartbeat for long handlers.
func WithConcurrency ¶
func WithConcurrency(n int) ReceiverOption
WithConcurrency sets how many messages are processed in parallel.
func WithErrorHandler ¶ added in v0.3.0
func WithErrorHandler(fn func(error)) ReceiverOption
WithErrorHandler registers a callback for errors the receive loop would otherwise swallow: a transient receive error being retried, or a per-message settle/renew failure (e.g. a lost lock). It is advisory — for logging or metrics — is called serially (the Receiver guards it, so a plain slice-append or counter is safe), and must not block. A permanent error (bad token, denied permission, missing queue) is passed here first and then also returned from Run (MQLITE-77).
func WithPrefetch ¶
func WithPrefetch(n int) ReceiverOption
WithPrefetch caps how many messages are claimed per receive. It is clamped to the concurrency: the Receiver never claims more than it has idle workers for, so a claimed message always has a worker (and, with WithAutoRenew, a renew heartbeat) ready — it can't sit locked behind a busy worker and let its lock expire (MQLITE-76). Values above the concurrency therefore have no extra effect; use it only to claim in smaller chunks.
type RecvOpts ¶
type RecvOpts struct {
Max int // most messages to claim (0 -> 1)
Wait time.Duration // long-poll wait (0 -> don't wait); capped at 20s
AtMostOnce bool // receive-and-delete (no lock, no settle)
Attempt string // idempotent-receive key; a retry replays the same batch
Pick []int64 // fetch these deferred seqs by seq instead of claiming
}
RecvOpts configures a Receive call.
type RedriveOpts ¶
type RedriveOpts struct {
To string // target queue (empty -> back to source)
Max int // cap how many messages move
OlderThan time.Duration // only move messages older than this
Rate int // throughput limit per second
}
RedriveOpts configures a Redrive call.
type RejectOpts ¶
type RejectOpts struct {
Reason string // dead-letter reason
Detail string // dead-letter description
}
RejectOpts configures a Message.Reject call.
type ServeOption ¶
type ServeOption func(*serveConfig)
ServeOption configures Serve.
func WithCORS ¶ added in v0.2.0
func WithCORS(origin string) ServeOption
WithCORS sets the Access-Control-Allow-Origin the broker sends, enabling browser apps served from another origin (the standalone console) to call it. "" (the default) leaves CORS off; "*" allows any origin — safe here because every RPC needs a Bearer token and the API uses no cookies, so a cross-origin page gains nothing without the token.
func WithMetrics ¶ added in v0.3.2
func WithMetrics(on bool) ServeOption
WithMetrics enables authenticated GET /metrics on the broker's API listener. Off by default. Enabling it requires administrator authentication and adds the /metrics path to discovery. Scrapers can use a read-only monitor token.
func WithMonitorTokens ¶ added in v0.3.2
func WithMonitorTokens(tokens ...string) ServeOption
WithMonitorTokens adds configured read-only credentials for Observe and /metrics. Serve rejects blank credentials, overlap with administrators, or disabled auth. These credentials can authenticate during a storage outage without a DB lookup.
func WithReady ¶ added in v0.3.0
func WithReady(fn func()) ServeOption
WithReady registers a callback Serve invokes once the listener is bound, before it starts accepting — so a caller announces "ready" only after the bind actually succeeded, never before a bind that then fails (MQLITE-88).
func WithRequestLog ¶ added in v0.2.0
func WithRequestLog(lg *slog.Logger) ServeOption
WithRequestLog enables a per-request access log on the broker, emitted through lg (one line per RPC: method, status, request ID, safe actor identity, latency, and operation details at a level chosen by status). nil leaves request logging off. Callers that need durable audit evidence must retain this logger externally. Separate from WithLogger (which routes the engine's background-loop failures) so a caller can colour the broker's live traffic without touching engine logs.
func WithTokenCSV ¶
func WithTokenCSV(csv string) ServeOption
WithTokenCSV sets accepted Bearer tokens from a comma-separated string (env-friendly).
func WithTokens ¶
func WithTokens(tokens ...string) ServeOption
WithTokens sets the accepted Bearer tokens for the broker.
func WithUI ¶ added in v0.2.0
func WithUI(on bool) ServeOption
WithUI serves the embedded admin console (the built mqlite-web SPA) at /ui. Off by default for the embedded library; the `mqlite serve` binary turns it on (MQLITE_UI).
func WithVersion ¶ added in v0.1.1
func WithVersion(v string) ServeOption
WithVersion sets the version string the broker reports on its open "/" discovery endpoint (typically the CLI/build version).
type SettleResult ¶ added in v0.1.1
type SettleResult struct {
SequenceNumber int64
Ok bool
// LockedUntil is the lease deadline a RenewBatch actually committed (zero for other
// operations). A renewing caller needs it to know when to renew next — without it, it can
// only guess, and would either hammer the broker or let the lock it just extended lapse.
//
// It is REPORTED, never written back onto the *Message: the caller may be reading those
// messages concurrently (the CLI renders them while a background renewer runs), and mutating
// a shared time.Time from another goroutine is a data race.
LockedUntil time.Time
}
SettleResult is the per-message outcome of a batch settle (Ok=false = the lock was lost/expired for that message — not a fatal error for the batch).
type StatusInfo ¶ added in v0.3.0
type StatusInfo struct {
Version string `json:"version,omitempty"`
Backend string `json:"backend"`
Remote bool `json:"remote"`
Location string `json:"location"`
SchemaVersion string `json:"schema_version"`
PingMs int64 `json:"ping_ms"`
DBSizeBytes int64 `json:"db_size_bytes"` // local on-disk footprint; 0 for memory/remote
Queues int `json:"queues"`
Subscriptions int `json:"subscriptions"`
// Broker-only facts: zero/false in embedded mode, which has no process uptime and no auth.
UptimeMs int64 `json:"uptime_ms"`
Auth bool `json:"auth"`
}
StatusInfo is a desensitized runtime snapshot of the backend (Client.Status / Embedded.Status): never a connection string or token — Location is a local path or a masked remote host. Version/Queues/Subscriptions come from the broker on the remote path; embedded fills what it can locally (Version is empty embedded).
type SubscribeOptions ¶ added in v0.4.0
SubscribeOptions configures a subscription's fixed lifetime. TTL is applied only when the subscription is first created: retries, filter updates and message activity never extend it. Zero leaves a new subscription permanent and preserves an existing subscription's lifetime.
type SubscriptionInfo ¶ added in v0.3.0
type SubscriptionInfo = engine.SubscriptionInfo
SubscriptionInfo mirrors engine.SubscriptionInfo for the legacy complete, active-only inventory.
type SubscriptionPage ¶ added in v0.4.0
type SubscriptionPage = engine.SubscriptionPage
SubscriptionPage is one current-snapshot page plus its exact scoped total and continuation cursor. A multi-request traversal is not a frozen snapshot.
type SubscriptionPageItem ¶ added in v0.4.0
type SubscriptionPageItem = engine.SubscriptionPageItem
SubscriptionPageItem is one lifecycle-aware entry in SubscriptionPage. State is active or deleting.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
mqlite
command
Command mqlite is the single-binary CLI: run a broker, or produce/consume/ administer queues against a local DB (embedded) or a remote broker (client).
|
Command mqlite is the single-binary CLI: run a broker, or produce/consume/ administer queues against a local DB (embedded) or a remote broker (client). |
|
mqlite-mcp
command
Command mqlite-mcp is a Model Context Protocol (MCP) server that exposes the mqlite broker as agent tools.
|
Command mqlite-mcp is a Model Context Protocol (MCP) server that exposes the mqlite broker as agent tools. |
|
internal
|
|
|
authkey
Package authkey defines the common format of generated broker credentials.
|
Package authkey defines the common format of generated broker credentials. |
|
defaults
Package defaults holds mqlite's built-in network defaults in one place so the broker CLI (cmd/mqlite) and the MCP server (cmd/mqlite-mcp) can never drift apart.
|
Package defaults holds mqlite's built-in network defaults in one place so the broker CLI (cmd/mqlite) and the MCP server (cmd/mqlite-mcp) can never drift apart. |
|
diagnosticlog
Package diagnosticlog keeps a bounded, private JSONL operator log independent of the database.
|
Package diagnosticlog keeps a bounded, private JSONL operator log independent of the database. |
|
version
Package version holds the single version constant every mqlite binary reports (mqlite CLI/broker and mqlite-mcp).
|
Package version holds the single version constant every mqlite binary reports (mqlite CLI/broker and mqlite-mcp). |
|
Package server exposes an mqlite Engine as a Connect-style JSON-over-HTTP broker (design §7).
|
Package server exposes an mqlite Engine as a Connect-style JSON-over-HTTP broker (design §7). |
|
test
|
|
|
bench
command
Command mqlite-bench stress-tests the local SQLite engine (embedded, no HTTP) across several high-frequency request patterns, and attributes per-scenario CPU and disk I/O via /proc/self (Linux/Docker).
|
Command mqlite-bench stress-tests the local SQLite engine (embedded, no HTTP) across several high-frequency request patterns, and attributes per-scenario CPU and disk I/O via /proc/self (Linux/Docker). |
|
bench/httpload
command
Command httpload is an HTTP load generator + integrity checker for a *running mqlite broker*.
|
Command httpload is an HTTP load generator + integrity checker for a *running mqlite broker*. |
|
crash
Package crash holds the crash-injection layer (see crash_test.go).
|
Package crash holds the crash-injection layer (see crash_test.go). |
|
production/restore
command
Command restore is the SDK fixture worker for run.py.
|
Command restore is the SDK fixture worker for run.py. |
|
production/soak
command
Command soak runs bounded mixed workloads against a dedicated candidate broker.
|
Command soak runs bounded mixed workloads against a dedicated candidate broker. |
|
sdkcheck
command
Command sdkcheck is the SDK end-to-end suite (the SDK path).
|
Command sdkcheck is the SDK end-to-end suite (the SDK path). |
|
Package wire defines the JSON-over-HTTP contract shared by the mqlite broker (server) and the Go SDK client.
|
Package wire defines the JSON-over-HTTP contract shared by the mqlite broker (server) and the Go SDK client. |