diff options
| author | Grégoire Duchêne <gduchene@awhk.org> | 2021-06-27 19:31:23 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@awhk.org> | 2021-06-27 19:31:23 +0100 |
| commit | c62f3e8b39e7d1ff3d46cc4d3d599b2450b3c097 (patch) | |
| tree | 8d0667e9176cdbf359530a9efe85b12eaf4559a2 /socket.go | |
| parent | 424618a7f2f253a0529e3462ceb69607ee3c8c88 (diff) | |
First draft
Diffstat (limited to 'socket.go')
| -rw-r--r-- | socket.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/socket.go b/socket.go new file mode 100644 index 0000000..941d5f0 --- /dev/null +++ b/socket.go @@ -0,0 +1,24 @@ +// Package gosdd provides simple wrappers around useful functions +// provided by systemd. +// +// On systems that are not Linux, or if the nosystemd build tag is set, +// safe defaults are returned: zero or nil values, and no error will be +// returned. +// +// Reference +// +// https://www.freedesktop.org/software/systemd/man/sd_listen_fds.html +// is the documentation for the C API. +package gosdd + +import "os" + +// SDListenFDs is a wrapper around sd_listen_fds. +func SDListenFDs(unsetenv bool) ([]*os.File, error) { + return sdListenFDs(unsetenv) +} + +// SDListenFDsWithNames is a wrapper around sd_listen_fds_with_names. +func SDListenFDsWithNames(unsetenv bool) (map[string]*os.File, error) { + return sdListenFDsWithNames(unsetenv) +} |
