Documentation
¶
Index ¶
Constants ¶
View Source
const NodeNamePrefix = "marmot-node"
Variables ¶
View Source
var Cleanup = flag.Bool("cleanup", false, "Only cleanup marmot triggers and changelogs")
View Source
var Config = &Configuration{ SeqMapPath: "/tmp/seq-map.cbor", DBPath: "/tmp/marmot.db", NodeID: 1, Snapshot: SnapshotConfiguration{ Enable: true, StoreType: Nats, Nats: ObjectStoreConfiguration{ Replicas: 1, }, S3: S3Configuration{}, }, ReplicationLog: ReplicationLogConfiguration{ Shards: 8, MaxEntries: 1024, Replicas: 1, Compress: true, }, NATS: NATSConfiguration{ URLs: []string{nats.DefaultURL}, SubjectPrefix: "marmot-change-log", StreamPrefix: "marmot-changes", }, Logging: LoggingConfiguration{ Verbose: false, Format: "console", }, }
View Source
var ConfigPath = flag.String("config", "marmot.toml", "Path to configuration file")
View Source
var SaveSnapshot = flag.Bool("save-snapshot", false, "Only take snapshot and upload")
Functions ¶
Types ¶
type Configuration ¶ added in v0.7.0
type Configuration struct {
SeqMapPath string `toml:"seq_map_path"`
DBPath string `toml:"db_path"`
NodeID uint64 `toml:"node_id"`
Snapshot SnapshotConfiguration `toml:"snapshot"`
ReplicationLog ReplicationLogConfiguration `toml:"replication_log"`
NATS NATSConfiguration `toml:"nats"`
Logging LoggingConfiguration `toml:"logging"`
}
func (*Configuration) NodeName ¶ added in v0.7.1
func (c *Configuration) NodeName() string
func (*Configuration) SnapshotStorageType ¶ added in v0.7.1
func (c *Configuration) SnapshotStorageType() SnapshotStoreType
type LoggingConfiguration ¶ added in v0.7.0
type NATSConfiguration ¶ added in v0.7.0
type ObjectStoreConfiguration ¶ added in v0.7.1
type ReplicationLogConfiguration ¶ added in v0.7.0
type S3Configuration ¶ added in v0.7.1
type SnapshotConfiguration ¶ added in v0.7.0
type SnapshotConfiguration struct {
Enable bool `toml:"enabled"`
StoreType SnapshotStoreType `toml:"store"`
Nats ObjectStoreConfiguration `toml:"nats"`
S3 S3Configuration `toml:"s3"`
}
type SnapshotStoreType ¶ added in v0.7.1
type SnapshotStoreType string
const ( Nats SnapshotStoreType = "nats" S3 = "s3" )
Click to show internal directories.
Click to hide internal directories.