You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
runner-go/pipeline/reporter.go

27 lines
746 B
Go

// Copyright 2019 Drone.IO Inc. All rights reserved.
// Use of this source code is governed by the Polyform License
// that can be found in the LICENSE file.
package pipeline
import "context"
// A Reporter reports the pipeline status.
type Reporter interface {
// ReportStage reports the stage status.
ReportStage(context.Context, *State) error
// ReportStep reports the named step status.
ReportStep(context.Context, *State, string) error
}
// NopReporter returns a noop reporter.
func NopReporter() Reporter {
return new(nopReporter)
}
type nopReporter struct{}
func (*nopReporter) ReportStage(context.Context, *State) error { return nil }
func (*nopReporter) ReportStep(context.Context, *State, string) error { return nil }