@@ -26,8 +26,8 @@ import (
2626 "golang.org/x/sync/errgroup"
2727)
2828
29- func LLBBridgeToGatewayClient (ctx context.Context , llbBridge frontend.FrontendLLBBridge , opts map [string ]string , inputs map [string ]* opspb.Definition , w worker.Infos , sid string , sm * session.Manager ) (* bridgeClient , error ) {
30- bc := & bridgeClient {
29+ func LLBBridgeToGatewayClient (ctx context.Context , llbBridge frontend.FrontendLLBBridge , opts map [string ]string , inputs map [string ]* opspb.Definition , w worker.Infos , sid string , sm * session.Manager ) (* BridgeClient , error ) {
30+ bc := & BridgeClient {
3131 opts : opts ,
3232 inputs : inputs ,
3333 FrontendLLBBridge : llbBridge ,
@@ -40,7 +40,7 @@ func LLBBridgeToGatewayClient(ctx context.Context, llbBridge frontend.FrontendLL
4040 return bc , nil
4141}
4242
43- type bridgeClient struct {
43+ type BridgeClient struct {
4444 frontend.FrontendLLBBridge
4545 mu sync.Mutex
4646 opts map [string ]string
@@ -54,7 +54,7 @@ type bridgeClient struct {
5454 ctrs []client.Container
5555}
5656
57- func (c * bridgeClient ) Solve (ctx context.Context , req client.SolveRequest ) (* client.Result , error ) {
57+ func (c * BridgeClient ) Solve (ctx context.Context , req client.SolveRequest ) (* client.Result , error ) {
5858 res , err := c .FrontendLLBBridge .Solve (ctx , frontend.SolveRequest {
5959 Evaluate : req .Evaluate ,
6060 Definition : req .Definition ,
@@ -91,7 +91,7 @@ func (c *bridgeClient) Solve(ctx context.Context, req client.SolveRequest) (*cli
9191
9292 return cRes , nil
9393}
94- func (c * bridgeClient ) loadBuildOpts () client.BuildOpts {
94+ func (c * BridgeClient ) loadBuildOpts () client.BuildOpts {
9595 wis := c .workers .WorkerInfos ()
9696 workers := make ([]client.WorkerInfo , len (wis ))
9797 for i , w := range wis {
@@ -112,11 +112,11 @@ func (c *bridgeClient) loadBuildOpts() client.BuildOpts {
112112 }
113113}
114114
115- func (c * bridgeClient ) BuildOpts () client.BuildOpts {
115+ func (c * BridgeClient ) BuildOpts () client.BuildOpts {
116116 return c .buildOpts
117117}
118118
119- func (c * bridgeClient ) Inputs (ctx context.Context ) (map [string ]llb.State , error ) {
119+ func (c * BridgeClient ) Inputs (ctx context.Context ) (map [string ]llb.State , error ) {
120120 inputs := make (map [string ]llb.State )
121121 for key , def := range c .inputs {
122122 defop , err := llb .NewDefinitionOp (def )
@@ -128,7 +128,7 @@ func (c *bridgeClient) Inputs(ctx context.Context) (map[string]llb.State, error)
128128 return inputs , nil
129129}
130130
131- func (c * bridgeClient ) wrapSolveError (solveErr error ) error {
131+ func (c * BridgeClient ) wrapSolveError (solveErr error ) error {
132132 var (
133133 ee * llberrdefs.ExecError
134134 fae * llberrdefs.FileActionError
@@ -162,7 +162,7 @@ func (c *bridgeClient) wrapSolveError(solveErr error) error {
162162 return errdefs .WithSolveError (solveErr , subject , inputIDs , mountIDs )
163163}
164164
165- func (c * bridgeClient ) registerResultIDs (results ... solver.Result ) (ids []string , err error ) {
165+ func (c * BridgeClient ) registerResultIDs (results ... solver.Result ) (ids []string , err error ) {
166166 c .mu .Lock ()
167167 defer c .mu .Unlock ()
168168
@@ -181,7 +181,7 @@ func (c *bridgeClient) registerResultIDs(results ...solver.Result) (ids []string
181181 return ids , nil
182182}
183183
184- func (c * bridgeClient ) toFrontendResult (r * client.Result ) (* frontend.Result , error ) {
184+ func (c * BridgeClient ) toFrontendResult (r * client.Result ) (* frontend.Result , error ) {
185185 if r == nil {
186186 return nil , nil
187187 }
@@ -206,7 +206,7 @@ func (c *bridgeClient) toFrontendResult(r *client.Result) (*frontend.Result, err
206206 return res , nil
207207}
208208
209- func (c * bridgeClient ) discard (err error ) {
209+ func (c * BridgeClient ) discard (err error ) {
210210 for _ , ctr := range c .ctrs {
211211 ctr .Release (context .TODO ())
212212 }
@@ -227,11 +227,11 @@ func (c *bridgeClient) discard(err error) {
227227 }
228228}
229229
230- func (c * bridgeClient ) Warn (ctx context.Context , dgst digest.Digest , msg string , opts client.WarnOpts ) error {
230+ func (c * BridgeClient ) Warn (ctx context.Context , dgst digest.Digest , msg string , opts client.WarnOpts ) error {
231231 return c .FrontendLLBBridge .Warn (ctx , dgst , msg , opts )
232232}
233233
234- func (c * bridgeClient ) NewContainer (ctx context.Context , req client.NewContainerRequest ) (client.Container , error ) {
234+ func (c * BridgeClient ) NewContainer (ctx context.Context , req client.NewContainerRequest ) (client.Container , error ) {
235235 ctrReq := container.NewContainerRequest {
236236 ContainerID : identity .NewID (),
237237 NetMode : req .NetMode ,
@@ -307,7 +307,7 @@ func (c *bridgeClient) NewContainer(ctx context.Context, req client.NewContainer
307307 return ctr , nil
308308}
309309
310- func (c * bridgeClient ) newRef (r solver.ResultProxy , s session.Group ) (* ref , error ) {
310+ func (c * BridgeClient ) newRef (r solver.ResultProxy , s session.Group ) (* ref , error ) {
311311 return & ref {resultProxy : r , session : s , c : c }, nil
312312}
313313
@@ -316,7 +316,7 @@ type ref struct {
316316 resultProxyClones []solver.ResultProxy
317317
318318 session session.Group
319- c * bridgeClient
319+ c * BridgeClient
320320}
321321
322322func (r * ref ) acquireResultProxy () solver.ResultProxy {
0 commit comments