(ctx context.Context, data wshrpc.CommandStartBuilderData)
| 1135 | } |
| 1136 | |
| 1137 | func (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 | |
| 1153 | func (ws *WshServer) StopBuilderCommand(ctx context.Context, builderId string) error { |
| 1154 | if builderId == "" { |
nothing calls this directly
no test coverage detected