Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseConfig ¶
type DatabaseConfig struct {
Path string `yaml:"path"`
MetaPath string `yaml:"meta-path,omitempty"`
MonitorInterval string `yaml:"monitor-interval,omitempty"`
CheckpointInterval string `yaml:"checkpoint-interval,omitempty"`
BusyTimeout string `yaml:"busy-timeout,omitempty"`
MinCheckpointPageCount int `yaml:"min-checkpoint-page-count,omitempty"`
MaxCheckpointPageCount int `yaml:"max-checkpoint-page-count,omitempty"`
Replica ReplicaConfig `yaml:"replica"`
}
type LevelConfig ¶
type LevelConfig struct {
Interval string `yaml:"interval"`
}
type LitestreamYml ¶
type LitestreamYml struct {
ConfigPath string `yaml:"-"`
DBPath string `yaml:"-"`
AccessKeyID string `yaml:"access-key-id,omitempty"`
SecretAccessKey string `yaml:"secret-access-key,omitempty"`
Addr string `yaml:"addr,omitempty"`
MCPAddr string `yaml:"mcp-addr,omitempty"`
Logging LoggingConfig `yaml:"logging,omitempty"`
Levels []LevelConfig `yaml:"levels,omitempty"`
Snapshot SnapshotConfig `yaml:"snapshot,omitempty"`
Dbs []DatabaseConfig `yaml:"dbs"`
}
func Config ¶
func Config() (*LitestreamYml, error)
Config generates and returns the litestream configuration
type LoggingConfig ¶
type ReplicaConfig ¶
type ReplicaConfig struct {
// Common fields
Name string `yaml:"name,omitempty"`
Type string `yaml:"type,omitempty"`
URL string `yaml:"url,omitempty"`
Retention string `yaml:"retention,omitempty"`
RetentionCheckInterval string `yaml:"retention-check-interval,omitempty"`
SnapshotInterval string `yaml:"snapshot-interval,omitempty"`
ValidationInterval string `yaml:"validation-interval,omitempty"`
SyncInterval string `yaml:"sync-interval,omitempty"`
Generation string `yaml:"generation,omitempty"`
GenerationInterval string `yaml:"generation-interval,omitempty"`
ValidationOnRestore bool `yaml:"validation-on-restore,omitempty"`
MaxWALBytes string `yaml:"max-wal-bytes,omitempty"`
Compress string `yaml:"compress,omitempty"`
Age AgeConfig `yaml:"age,omitempty"`
// S3 specific
Bucket string `yaml:"bucket,omitempty"`
Path string `yaml:"path,omitempty"`
Region string `yaml:"region,omitempty"`
Endpoint string `yaml:"endpoint,omitempty"`
AccessKeyID string `yaml:"access-key-id,omitempty"`
SecretAccessKey string `yaml:"secret-access-key,omitempty"`
SkipVerify bool `yaml:"skip-verify,omitempty"`
ForcePathStyle bool `yaml:"force-path-style,omitempty"`
SSE string `yaml:"sse,omitempty"`
SSEKMSKeyID string `yaml:"sse-kms-key-id,omitempty"`
// ABS specific
AccountName string `yaml:"account-name,omitempty"`
AccountKey string `yaml:"account-key,omitempty"`
// SFTP specific
Host string `yaml:"host,omitempty"`
User string `yaml:"user,omitempty"`
KeyPath string `yaml:"key-path,omitempty"`
// NATS specific
// bucket already above
Username string `yaml:"username,omitempty"`
Password string `yaml:"password,omitempty"`
JWT string `yaml:"jwt,omitempty"`
Seed string `yaml:"seed,omitempty"`
Creds string `yaml:"creds,omitempty"`
NKey string `yaml:"nkey,omitempty"`
Token string `yaml:"token,omitempty"`
TLS bool `yaml:"tls,omitempty"`
RootCAs []string `yaml:"root-cas,omitempty"`
ClientCert string `yaml:"client-cert,omitempty"`
ClientKey string `yaml:"client-key,omitempty"`
MaxReconnects int `yaml:"max-reconnects,omitempty"`
ReconnectWait string `yaml:"reconnect-wait,omitempty"`
Timeout string `yaml:"timeout,omitempty"`
}
type SnapshotConfig ¶
Click to show internal directories.
Click to hide internal directories.