MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / Start

Method Start

pkg/blockcontroller/shellcontroller.go:85–95  ·  view source on GitHub ↗

Implement Controller interface methods

(ctx context.Context, blockMeta waveobj.MetaMapType, rtOpts *waveobj.RuntimeOpts, force bool)

Source from the content-addressed store, hash-verified

83// Implement Controller interface methods
84
85func (sc *ShellController) Start(ctx context.Context, blockMeta waveobj.MetaMapType, rtOpts *waveobj.RuntimeOpts, force bool) error {
86 // Get the block data
87 blockData, err := wstore.DBMustGet[*waveobj.Block](ctx, sc.BlockId)
88 if err != nil {
89 return fmt.Errorf("error getting block: %w", err)
90 }
91
92 // Use the existing run method which handles all the start logic
93 go sc.run(ctx, blockData, blockData.Meta, rtOpts, force)
94 return nil
95}
96
97func (sc *ShellController) Stop(graceful bool, newStatus string, destroy bool) {
98 sc.Lock.Lock()

Callers

nothing calls this directly

Calls 2

runMethod · 0.95
DBMustGetFunction · 0.92

Tested by

no test coverage detected