Rename daemon to litestreamd

This commit is contained in:
Ben Johnson
2020-12-22 13:28:30 -07:00
parent 2bbe5d91bf
commit 6aceb5553e
2 changed files with 6 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ import (
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
) )
// Config represents a configuration file for the litestream CLI. // Config represents a configuration file for the litestream daemon.
type Config struct { type Config struct {
DBs []*DBConfig `yaml:"databases"` DBs []*DBConfig `yaml:"databases"`
} }

View File

@@ -19,7 +19,7 @@ var (
// Default settings. // Default settings.
const ( const (
DefaultConfigPath = "~/litestream.yml" DefaultConfigPath = "~/litestreamd.yml"
) )
func main() { func main() {
@@ -39,7 +39,7 @@ func main() {
} }
// Display version information. // Display version information.
fmt.Printf("Litestream %s\n", Version) fmt.Printf("litestreamd %s\n", Version)
// Start monitoring databases. // Start monitoring databases.
if err := m.Run(ctx); err != nil { if err := m.Run(ctx); err != nil {
@@ -76,7 +76,7 @@ func NewMain() *Main {
// ParseFlags parses the flag set from args & loads the configuration. // ParseFlags parses the flag set from args & loads the configuration.
func (m *Main) ParseFlags(ctx context.Context, args []string) (err error) { func (m *Main) ParseFlags(ctx context.Context, args []string) (err error) {
fs := flag.NewFlagSet("litestream", flag.ContinueOnError) fs := flag.NewFlagSet("litestreamd", flag.ContinueOnError)
fs.StringVar(&m.ConfigPath, "config", DefaultConfigPath, "configuration path") fs.StringVar(&m.ConfigPath, "config", DefaultConfigPath, "configuration path")
fs.Usage = m.Usage fs.Usage = m.Usage
if err := fs.Parse(args); err != nil { if err := fs.Parse(args); err != nil {
@@ -167,11 +167,11 @@ func (m *Main) Close() (err error) {
func (m *Main) Usage() { func (m *Main) Usage() {
fmt.Println(` fmt.Println(`
Litestream is a daemon for replicating SQLite databases. litestreamd is a daemon for replicating SQLite databases.
Usage: Usage:
litestream [arguments] litestreamd [arguments]
Arguments: Arguments: