| // Copyright 2019 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| package main |
| |
| import ( |
| "context" |
| |
| buildbucketpb "go.chromium.org/luci/buildbucket/proto" |
| "go.chromium.org/luci/luciexe/invoke" |
| ) |
| |
| // A function which consumes a Build.proto, to be called within runStep. |
| type stepFunc func(context.Context, *buildbucketpb.Build) error |
| |
| type stepRunner interface { |
| // RunStep calls a stepFunc, attaching a Step to Build.Steps. |
| runStep(ctx context.Context, name string, fn stepFunc) error |
| |
| // Invoke calls a luciexe, attaching its Steps to Build.Steps. |
| invoke(ctx context.Context, exePath string, opts *invoke.Options) error |
| } |