MCPcopy Create free account
hub / github.com/bytesizedhosting/bcd / Stop

Method Stop

plugins/base_rpc.go:55–75  ·  view source on GitHub ↗
(opts *ActionOpts, success *bool)

Source from the content-addressed store, hash-verified

53}
54
55func (self *BaseRPC) Stop(opts *ActionOpts, success *bool) error {
56 containerId := opts.ContainerId
57 log.WithFields(log.Fields{
58 "container_id": containerId,
59 "name": self.base.GetName(),
60 }).Info("Stopping container")
61
62 err := self.base.Stop(&AppConfig{ContainerId: containerId})
63
64 if err != nil {
65 return err
66 }
67 *success = true
68
69 log.WithFields(log.Fields{
70 "container_id": containerId,
71 "name": self.base.GetName(),
72 }).Info("Container stopped")
73
74 return nil
75}
76func (self *BaseRPC) Restart(opts *ActionOpts, success *bool) error {
77 containerId := opts.ContainerId
78 err := self.base.Restart(&AppConfig{ContainerId: containerId})

Callers

nothing calls this directly

Calls 2

GetNameMethod · 0.65
StopMethod · 0.65

Tested by

no test coverage detected