f81816ef88
full diff: https://github.com/moby/moby/compare/4ca8aedf929f...0769fe708773892d6ac399ee137e71a777b35de7 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
20 lines
487 B
Go
20 lines
487 B
Go
package builder
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/moby/moby/client"
|
|
)
|
|
|
|
type fakeClient struct {
|
|
client.Client
|
|
builderPruneFunc func(ctx context.Context, opts client.BuildCachePruneOptions) (client.BuildCachePruneResult, error)
|
|
}
|
|
|
|
func (c *fakeClient) BuildCachePrune(ctx context.Context, opts client.BuildCachePruneOptions) (client.BuildCachePruneResult, error) {
|
|
if c.builderPruneFunc != nil {
|
|
return c.builderPruneFunc(ctx, opts)
|
|
}
|
|
return client.BuildCachePruneResult{}, nil
|
|
}
|