Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
f5fdf698ef | |||
94c737a02b |
@ -17,13 +17,13 @@ Just replace `http.ListenAndServe` with `anyhttp.ListenAndServe`.
|
|||||||
|
|
||||||
Syntax
|
Syntax
|
||||||
|
|
||||||
unix?path=<socket_path>&mode=<socket file mode>&remove_existing=<yes|no>
|
unix?path=<socket_path>&mode=<socket file mode>&remove_existing=<true|false>
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
|
|
||||||
unix?path=relative/path.sock
|
unix?path=relative/path.sock
|
||||||
unix?path=/var/run/app/absolutepath.sock
|
unix?path=/var/run/app/absolutepath.sock
|
||||||
unix?path=/run/app.sock&mode=600&remove_existing=no
|
unix?path=/run/app.sock&mode=600&remove_existing=false
|
||||||
|
|
||||||
| option | description | default |
|
| option | description | default |
|
||||||
|-----------------|------------------------------------------------|----------|
|
|-----------------|------------------------------------------------|----------|
|
||||||
@ -35,7 +35,7 @@ Examples
|
|||||||
|
|
||||||
Syntax
|
Syntax
|
||||||
|
|
||||||
sysd?idx=<fd index>&name=<fd name>&check_pid=<yes|no>&unset_env=<yes|no>&idle_timeout=<duration>
|
sysd?idx=<fd index>&name=<fd name>&check_pid=<true|false>&unset_env=<true|false>&idle_timeout=<duration>
|
||||||
|
|
||||||
Only one of `idx` or `name` has to be set
|
Only one of `idx` or `name` has to be set
|
||||||
|
|
||||||
|
@ -72,6 +72,20 @@ func Test_parseAddress(t *testing.T) {
|
|||||||
wantSysc: nil,
|
wantSysc: nil,
|
||||||
wantErr: true,
|
wantErr: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "systemd address with check_pid and unset_env",
|
||||||
|
addr: "sysd?idx=0&check_pid=false&unset_env=f",
|
||||||
|
wantAddrType: SystemdFD,
|
||||||
|
wantUsc: nil,
|
||||||
|
wantSysc: &SysdConfig{
|
||||||
|
FDIndex: ptr(0),
|
||||||
|
FDName: nil,
|
||||||
|
CheckPID: false,
|
||||||
|
UnsetEnv: false,
|
||||||
|
IdleTimeout: nil,
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user