github.com/shopify/docker@v1.13.1/libcontainerd/client_solaris.go (about) 1 package libcontainerd 2 3 import "golang.org/x/net/context" 4 5 type client struct { 6 clientCommon 7 8 // Platform specific properties below here. 9 remote *remote 10 q queue 11 exitNotifiers map[string]*exitNotifier 12 liveRestore bool 13 } 14 15 // GetServerVersion returns the connected server version information 16 func (clnt *client) GetServerVersion(ctx context.Context) (*ServerVersion, error) { 17 resp, err := clnt.remote.apiClient.GetServerVersion(ctx, &containerd.GetServerVersionRequest{}) 18 if err != nil { 19 return nil, err 20 } 21 22 sv := &ServerVersion{ 23 GetServerVersionResponse: *resp, 24 } 25 26 return sv, nil 27 } 28 29 func (clnt *client) AddProcess(ctx context.Context, containerID, processFriendlyName string, specp Process, attachStdio StdioCallback) (int, error) { 30 return -1, nil 31 } 32 33 func (clnt *client) SignalProcess(containerID string, pid string, sig int) error { 34 return nil 35 } 36 37 func (clnt *client) Resize(containerID, processFriendlyName string, width, height int) error { 38 return nil 39 } 40 41 func (clnt *client) Pause(containerID string) error { 42 return nil 43 } 44 45 func (clnt *client) Resume(containerID string) error { 46 return nil 47 } 48 49 func (clnt *client) Stats(containerID string) (*Stats, error) { 50 return nil, nil 51 } 52 53 func (clnt *client) getExitNotifier(containerID string) *exitNotifier { 54 clnt.mapMutex.RLock() 55 defer clnt.mapMutex.RUnlock() 56 return clnt.exitNotifiers[containerID] 57 } 58 59 func (clnt *client) getOrCreateExitNotifier(containerID string) *exitNotifier { 60 clnt.mapMutex.Lock() 61 defer clnt.mapMutex.Unlock() 62 w, ok := clnt.exitNotifiers[containerID] 63 if !ok { 64 w = &exitNotifier{c: make(chan struct{}), client: clnt} 65 clnt.exitNotifiers[containerID] = w 66 } 67 return w 68 } 69 70 // Restore is the handler for restoring a container 71 func (clnt *client) Restore(containerID string, attachStdio StdioCallback, options ...CreateOption) error { 72 return nil 73 } 74 75 func (clnt *client) GetPidsForContainer(containerID string) ([]int, error) { 76 return nil, nil 77 } 78 79 // Summary returns a summary of the processes running in a container. 80 func (clnt *client) Summary(containerID string) ([]Summary, error) { 81 return nil, nil 82 } 83 84 // UpdateResources updates resources for a running container. 85 func (clnt *client) UpdateResources(containerID string, resources Resources) error { 86 // Updating resource isn't supported on Solaris 87 // but we should return nil for enabling updating container 88 return nil 89 } 90 91 func (clnt *client) CreateCheckpoint(containerID string, checkpointID string, checkpointDir string, exit bool) error { 92 return nil 93 } 94 95 func (clnt *client) DeleteCheckpoint(containerID string, checkpointID string, checkpointDir string) error { 96 return nil 97 } 98 99 func (clnt *client) ListCheckpoints(containerID string, checkpointDir string) (*Checkpoints, error) { 100 return nil, nil 101 }