Documentation ¶
Index ¶
- Variables
- func AdjustOOMScore(pid int) error
- func AnonDialer(address string, timeout time.Duration) (net.Conn, error)
- func BinaryName(runtime string) string
- func Command(ctx context.Context, runtime, containerdAddress, path string, opts *types.Any, ...) (*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 ReadAddress(path string) (string, error)
- func Run(id string, initFunc Init, opts ...BinaryOpts)
- 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 BinaryOpts
- type Client
- type Config
- type Init
- type Opts
- type OptsKey
- type Publisher
- type Shim
Constants ¶
This section is empty.
Variables ¶
var ErrNoAddress = errors.New("no shim address")
ErrNoAddress is returned when the address file has no content
Functions ¶
func AdjustOOMScore ¶ added in v1.3.0
AdjustOOMScore sets the OOM score for the process to the parents OOM score +1 to ensure that they parent has a lower* score than the shim
func AnonDialer ¶
AnonDialer returns a dialer for an abstract socket
func BinaryName ¶
BinaryName returns the shim binary name from the runtime name, empty string returns means runtime name is invalid
func Command ¶
func Command(ctx context.Context, runtime, containerdAddress, path string, opts *types.Any, 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 ReadAddress ¶ added in v1.3.0
ReadAddress returns the shim's abstract socket address from the path
func Run ¶
func Run(id string, initFunc Init, opts ...BinaryOpts)
Run initializes and runs a shim server
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 BinaryOpts ¶ added in v1.3.0
type BinaryOpts func(*Config)
BinaryOpts allows the configuration of a shims binary setup
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for a shim server
func NewShimClient ¶
NewShimClient creates a new shim server client
type Config ¶ added in v1.3.0
type Config struct { // NoSubreaper disables setting the shim as a child subreaper NoSubreaper bool // NoReaper disables the shim binary from reaping any child process implicitly NoReaper bool // NoSetupLogger disables automatic configuration of logrus to use the shim FIFO NoSetupLogger bool }
Config of shim binary options provided by shim implementations