Skip to content

Commit

Permalink
writer: allows unix location in config (#106)
Browse files Browse the repository at this point in the history
PR #105 allowed the use of the `unix` as a shorthand for spectatord's
default unix socket path. This diff updates the config validation logic
so that folks can pass that value in.
  • Loading branch information
sgg authored Aug 20, 2024
1 parent f6d4482 commit 733f9d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions spectator/writer/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func IsValidOutputLocation(output string) bool {
output == "memory" ||
output == "stdout" ||
output == "stderr" ||
output == "unix" ||
strings.HasPrefix(output, "file://") ||
strings.HasPrefix(output, "udp://") ||
strings.HasPrefix(output, "unix://")
Expand Down
1 change: 1 addition & 0 deletions spectator/writer/writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func TestValidOutputLocation(t *testing.T) {
{"memory", true},
{"stdout", true},
{"stderr", true},
{"unix", true},
{"file://testfile.txt", true},
{"udp://localhost:1234", true},
{"unix:///tmp/socket.sock", true},
Expand Down

0 comments on commit 733f9d9

Please sign in to comment.