Documentation ¶
Index ¶
- Variables
- func AnonDialer(address string, timeout time.Duration) (net.Conn, error)
- func BinaryName(runtime string) string
- func Command(ctx context.Context, runtime, containerdAddress, path string, ...) (*exec.Cmd, error)
- func Connect(address string, d func(string, time.Duration) (net.Conn, error)) (net.Conn, error)
- func NewSocket(address string) (*net.UnixListener, error)
- func Reap() error
- func Run(id string, initFunc Init)
- func SetScore(pid int) error
- func SocketAddress(ctx context.Context, id string) (string, error)
- func WriteAddress(path, address string) error
- func WritePidFile(path string, pid int) error
- type Client
- type Init
- type Monitor
- type Shim
Constants ¶
This section is empty.
Variables ¶
var Default = &Monitor{ subscribers: make(map[chan runc.Exit]struct{}), }
Default is the default monitor initialized for the package
var ErrNoSuchProcess = errors.New("no such process")
ErrNoSuchProcess is returned when the process no longer exists
Functions ¶
func AnonDialer ¶
AnonDialer returns a dialer for an abstract socket
func BinaryName ¶
BinaryName returns the shim binary name from the runtime name
func Command ¶
func Command(ctx context.Context, runtime, containerdAddress, path string, cmdArgs ...string) (*exec.Cmd, error)
Command returns the shim command with the provided args and configuration
func NewSocket ¶
func NewSocket(address string) (*net.UnixListener, error)
NewSocket returns a new socket
func Reap ¶
func Reap() error
Reap should be called when the process receives an SIGCHLD. Reap will reap all exited processes and close their wait channels
func SocketAddress ¶
SocketAddress returns an abstract socket address
func WriteAddress ¶
WriteAddress writes a address file atomically
func WritePidFile ¶
WritePidFile writes a pid file atomically
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for a shim server
func NewShimClient ¶
NewShimClient creates a new shim server client