Documentation
¶
Overview ¶
Package service serves the spacer API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Serve ¶
Serve services requests on the passed *uds.Conn until the client disconnects, using the passed spacer to carry out the requests.
Since this function is used in testing, it generates slog records over the course of its operation. You might thus want to send slog output to the GinkgoWriter: this way, you won't be bothered with slog output unless your test fails ($HEAVENS forbid!) or you explicitly request to see it all using “-ginkgo.v” when running tests.
Types ¶
type Spacemaker ¶
type Spacemaker struct {
Exe string
Stdout io.Writer
Stderr io.Writer
// contains filtered or unexported fields
}
func (*Spacemaker) Room ¶
func (s *Spacemaker) Room(req *api.RoomsRequest) api.Response
Room creates one or multiple new namespaces of the requested types, returning file descriptors referencing these new namespaces. Room does not allow namespaces of type PID and user to be created due to restrictions in the Linux kernel when running multi-threaded; use the Subspace service instead.
func (*Spacemaker) Slog ¶ added in v0.7.0
func (s *Spacemaker) Slog() *slog.Logger
func (*Spacemaker) Subspace ¶
func (s *Spacemaker) Subspace(req *api.SubspaceRequest) api.Response
Subspace creates either a new user or PID namespace, or both, and returns open file descriptors referencing them; additionally, it returns a file descriptor for a unix domain socket that is connected to a child Spacemaker service process.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
spacer-service
command
Package main provides the command for running a spacer service as a separate process.
|
Package main provides the command for running a spacer service as a separate process. |