Documentation
¶
Overview ¶
Package caddymodule registers the rqlite CertMagic storage backend as a Caddy module (`caddy.storage.rqlite`) and adapts the transport-agnostic core in the parent package to certmagic.Storage. This is the package xcaddy compiles in:
xcaddy build --with github.com/tissue-systems/caddy-rqlite-storage/caddymodule
Caddyfile usage (global options):
{
storage rqlite {
url http://127.0.0.1:4001
username {$RQLITE_USER}
password {$RQLITE_PASSWORD}
lock_ttl 60s
}
}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RqliteStorage ¶
type RqliteStorage struct {
// URL is the rqlite node's HTTP API base, e.g. http://127.0.0.1:4001.
URL string `json:"url,omitempty"`
// Username/Password are optional rqlite HTTP basic-auth credentials.
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
// LockTTL is how long an acquired ACME lock is held before it may be stolen.
LockTTL caddy.Duration `json:"lock_ttl,omitempty"`
// ReadLevel is the rqlite read-consistency level for key lookups: "weak"
// (default; leader-routed, always sees its own writes), "none" (fast local
// reads — single-node only: on a cluster a non-leader's stale read fails
// CertMagic's storage preflight), "linearizable", or "strong".
ReadLevel string `json:"read_level,omitempty"`
// contains filtered or unexported fields
}
RqliteStorage is the Caddy module configuration for rqlite-backed cert storage.
func (RqliteStorage) CaddyModule ¶
func (RqliteStorage) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*RqliteStorage) CertMagicStorage ¶
func (s *RqliteStorage) CertMagicStorage() (certmagic.Storage, error)
CertMagicStorage returns the certmagic.Storage implementation.
func (*RqliteStorage) Provision ¶
func (s *RqliteStorage) Provision(ctx caddy.Context) error
Provision builds the store and ensures the backing tables exist.
func (*RqliteStorage) UnmarshalCaddyfile ¶
func (s *RqliteStorage) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile parses the `storage rqlite { ... }` block.
Click to show internal directories.
Click to hide internal directories.