MCPcopy Index your code
hub / github.com/devspace-sh/devspace / RestartContainer

Method RestartContainer

pkg/devspace/sync/upstream.go:716–730  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

714}
715
716func (u *upstream) RestartContainer() error {
717 if u.sync.Options.RestartContainer {
718 u.sync.log.Info("Upstream - Restarting container")
719
720 ctx, cancel := context.WithTimeout(u.sync.ctx, time.Minute*5)
721 defer cancel()
722
723 _, err := u.client.RestartContainer(ctx, &remote.Empty{})
724 if err != nil {
725 return errors.Wrap(err, "restart container")
726 }
727 }
728
729 return nil
730}
731
732func (u *upstream) ExecuteBatchCommand() error {
733 if u.sync.Options.UploadBatchCmd != "" {

Callers 1

execCommandsMethod · 0.95

Calls 3

WithTimeoutMethod · 0.80
RestartContainerMethod · 0.65
InfoMethod · 0.45

Tested by

no test coverage detected