MCPcopy
hub / github.com/wavetermdev/waveterm / StartBuilderCommand

Method StartBuilderCommand

pkg/wshrpc/wshserver/wshserver.go:1137–1151  ·  view source on GitHub ↗
(ctx context.Context, data wshrpc.CommandStartBuilderData)

Source from the content-addressed store, hash-verified

1135}
1136
1137func (ws *WshServer) StartBuilderCommand(ctx context.Context, data wshrpc.CommandStartBuilderData) error {
1138 if data.BuilderId == "" {
1139 return fmt.Errorf("must provide a builderId to StartBuilderCommand")
1140 }
1141 bc := buildercontroller.GetOrCreateController(data.BuilderId)
1142 rtInfo := wstore.GetRTInfo(waveobj.MakeORef("builder", data.BuilderId))
1143 if rtInfo == nil {
1144 return fmt.Errorf("builder rtinfo not found for builderid: %s", data.BuilderId)
1145 }
1146 appId := rtInfo.BuilderAppId
1147 if appId == "" {
1148 return fmt.Errorf("builder appid not set for builderid: %s", data.BuilderId)
1149 }
1150 return bc.Start(ctx, appId, rtInfo.BuilderEnv)
1151}
1152
1153func (ws *WshServer) StopBuilderCommand(ctx context.Context, builderId string) error {
1154 if builderId == "" {

Callers

nothing calls this directly

Calls 4

GetOrCreateControllerFunction · 0.92
GetRTInfoFunction · 0.92
MakeORefFunction · 0.92
StartMethod · 0.65

Tested by

no test coverage detected