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

Method Start

pkg/devspace/services/sync/controller.go:60–82  ·  view source on GitHub ↗
(ctx devspacecontext.Context, options *Options, parent *tomb.Tomb)

Source from the content-addressed store, hash-verified

58}
59
60func (c *controller) Start(ctx devspacecontext.Context, options *Options, parent *tomb.Tomb) error {
61 pluginErr := hook.ExecuteHooks(ctx, map[string]interface{}{
62 "sync_config": options.SyncConfig,
63 }, hook.EventsForSingle("start:sync", options.Name).With("sync.start")...)
64 if pluginErr != nil {
65 return pluginErr
66 }
67
68 err := c.startWithWait(ctx, options, parent)
69 if err != nil {
70 pluginErr := hook.ExecuteHooks(ctx, map[string]interface{}{
71 "sync_config": options.SyncConfig,
72 "ERROR": err,
73 }, hook.EventsForSingle("error:sync", options.Name).With("sync.error")...)
74 if pluginErr != nil {
75 return pluginErr
76 }
77
78 return err
79 }
80
81 return nil
82}
83
84func (c *controller) startWithWait(ctx devspacecontext.Context, options *Options, parent *tomb.Tomb) error {
85 if ctx.IsDone() {

Callers

nothing calls this directly

Calls 4

startWithWaitMethod · 0.95
ExecuteHooksFunction · 0.92
EventsForSingleFunction · 0.92
WithMethod · 0.80

Tested by

no test coverage detected