v0.34.0 doc sweep and update

This commit is contained in:
lixen committed 2026-10-11 03:27:10 -04:00
1 parent 87f5576ccf
commit 1abffcec6c
41 files changed
+1447 -2287

No files matched your search

+1 -1
View File
@@ -198,7 +198,7 @@ func parseCommandLine(argv []string) (inv invocation, err error) {
}
specFlags, settings := config.SpecFlags(), config.Settings()
unexpected := func(word string) error {
return fmt.Errorf("unexpected argument %q: lw takes options only (a configuration file is -c FILE, a switch's value follows '=')", word)
return fmt.Errorf("unexpected argument %q: lw takes options only (a configuration file is -c FILE, a boolean key's value follows '=')", word)
}
next := func(i *int) string {
if *i+1 < len(argv) && !strings.HasPrefix(argv[*i+1], "-") {
+7 -5
View File
@@ -26,8 +26,9 @@ Usage:
Commands (lw COMMAND -h lists its subcommands):
%s
Options: a short option is its long one; a value follows as the next argument
or after '=' (-c FILE, --config=FILE), one that starts with '-' or a switch's
after '='; short options do not combine. lw takes options only.
or after '=' (-c FILE, --config=FILE), one starting with '-' after '='; a
BOOL key's only after '=', and -t, --dump, -T, -V, --schema take none.
Short options do not combine. lw takes options only.
-c, --config FILE Configuration file (default:
~/.config/logwisp/logwisp.toml if it exists,
else ./logwisp.toml)
@@ -82,9 +83,10 @@ key alone means true:
Pipelines (they replace the configuration file's pipelines):
-p, --preset NAME[:KEY=VALUE,...]
Start a pipeline with a preset: pipe, tail,
serve, edge, aggregator; lw preset NAME -h
lists its keys, lw preset NAME prints it
Begin a pipeline with a preset (a second
needs its own --pipeline): pipe, tail, serve,
edge, aggregator; lw preset NAME -h lists
its keys, lw preset NAME prints it
--pipeline NAME Start a pipeline named NAME, which the
pipeline options after it configure; those
before any --pipeline make one named after
+4 -15
View File
@@ -39,26 +39,15 @@ func TestWatchErrorsDoNotTriggerReloadAndChangesAreCoalesced(t *testing.T) {
}
}
func TestShippedConfigurationBuildsWithCheckedPluginDecoder(t *testing.T) {
testLogger(t)
// The shipped file defines no pipeline, so lw keeps its built-in pipe
func TestShippedConfigurationKeepsTheBuiltInPipeline(t *testing.T) {
path, err := filepath.Abs(filepath.Join("..", "..", "config", "logwisp.toml"))
if err != nil {
t.Fatal(err)
}
cfg := loadTestConfig(t, path)
if len(cfg.Pipelines) != 1 || cfg.Pipelines[0].Name != "default" {
t.Fatalf("sample array-of-tables decoded incorrectly: %+v", cfg.Pipelines)
if cfg := loadTestConfig(t, path); len(cfg.Pipelines) != 1 || cfg.Pipelines[0].Name != "pipe" {
t.Fatalf("the sample defines pipelines: %+v", cfg.Pipelines)
}
svc, err := bootstrapService(context.Background(), cfg, nil)
if err != nil {
t.Fatal(err)
}
defer svc.Shutdown()
pl, err := svc.GetPipeline("default")
if err != nil || len(pl.Sources) != 1 || len(pl.Sinks) != 1 {
t.Fatalf("sample plugins failed to build: %v", err)
}
svc.Shutdown() // A later reload failure or process exit can close it again.
}
// Once the first service is built a reload reads no descriptor, pipe or