Skip to content

Commit

Permalink
add go binding for storage_opt
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof authored and glours committed Jan 23, 2024
1 parent 1e4da93 commit 73c4a98
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion loader/full-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ services:
stop_grace_period: 20s

stop_signal: SIGUSR1

storage_opt:
size: "20G"
sysctls:
net.core.somaxconn: 1024
net.ipv4.tcp_syncookies: 0
Expand Down
6 changes: 6 additions & 0 deletions loader/full-struct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ func services(workingDir, homeDir string) types.Services {
},
StdinOpen: true,
StopSignal: "SIGUSR1",
StorageOpt: map[string]string{"size": "20G"},
StopGracePeriod: durationPtr(20 * time.Second),
Sysctls: map[string]string{
"net.core.somaxconn": "1024",
Expand Down Expand Up @@ -895,6 +896,8 @@ services:
stdin_open: true
stop_grace_period: 20s
stop_signal: SIGUSR1
storage_opt:
size: 20G
sysctls:
net.core.somaxconn: "1024"
net.ipv4.tcp_syncookies: "0"
Expand Down Expand Up @@ -1558,6 +1561,9 @@ func fullExampleJSON(workingDir, homeDir string) string {
"stdin_open": true,
"stop_grace_period": "20s",
"stop_signal": "SIGUSR1",
"storage_opt": {
"size": "20G"
},
"sysctls": {
"net.core.somaxconn": "1024",
"net.ipv4.tcp_syncookies": "0"
Expand Down
1 change: 1 addition & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ type ServiceConfig struct {
StdinOpen bool `yaml:"stdin_open,omitempty" json:"stdin_open,omitempty"`
StopGracePeriod *Duration `yaml:"stop_grace_period,omitempty" json:"stop_grace_period,omitempty"`
StopSignal string `yaml:"stop_signal,omitempty" json:"stop_signal,omitempty"`
StorageOpt map[string]string `yaml:"storage_opt,omitempty" json:"storage_opt,omitempty"`
Sysctls Mapping `yaml:"sysctls,omitempty" json:"sysctls,omitempty"`
Tmpfs StringList `yaml:"tmpfs,omitempty" json:"tmpfs,omitempty"`
Tty bool `yaml:"tty,omitempty" json:"tty,omitempty"`
Expand Down

0 comments on commit 73c4a98

Please sign in to comment.