package client

import "github.com/containerd/containerd/runtime/v1/shim/client"

Index

Functions

func RemoveSocket

func RemoveSocket(address string) error

RemoveSocket removes the socket at the specified address if it exists on the filesystem

func WithLocal

func WithLocal(publisher events.Publisher) func(context.Context, shim.Config) (shimapi.ShimService, io.Closer, error)

WithLocal uses an in process shim

Types

type Client

type Client struct {
	shimapi.ShimService
	// contains filtered or unexported fields
}

Client is a shim client containing the connection to a shim

func New

func New(ctx context.Context, config shim.Config, opt Opt) (*Client, error)

New returns a new shim client

func (*Client) Close

func (c *Client) Close() error

Close the client connection

func (*Client) IsAlive

func (c *Client) IsAlive(ctx context.Context) (bool, error)

IsAlive returns true if the shim can be contacted. NOTE: a negative answer doesn't mean that the process is gone.

func (*Client) KillShim

func (c *Client) KillShim(ctx context.Context) error

KillShim kills the shim forcefully and wait for the process to disappear

func (*Client) StopShim

func (c *Client) StopShim(ctx context.Context) error

StopShim signals the shim to exit and wait for the process to disappear

type Opt

Opt is an option for a shim client configuration

func WithConnect

func WithConnect(address string, onClose func()) Opt

WithConnect connects to an existing shim

func WithStart

func WithStart(binary, address, daemonAddress, cgroup string, debug bool, exitHandler func()) Opt

WithStart executes a new shim process

Source Files

client.go client_linux.go

Version
v1.5.14
Published
Oct 24, 2022
Platform
linux/amd64
Imports
26 packages
Last checked
35 minutes ago

Tools for package owners.