1
0
mirror of https://github.com/drone/drone-cli.git synced 2026-01-20 18:01:34 +01:00
drone-cli/vendor/github.com/drone/drone-runtime/runtime/hook.go
2018-10-09 11:18:46 -07:00

24 lines
621 B
Go

package runtime
// Hook provides a set of hooks to run at various stages of
// runtime execution.
type Hook struct {
// Before is called before all all steps are executed.
Before func(*State) error
// BeforeEach is called before each step is executed.
BeforeEach func(*State) error
// After is called after all steps are executed.
After func(*State) error
// AfterEach is called after each step is executed.
AfterEach func(*State) error
// GotLine is called when a line is logged.
GotLine func(*State, *Line) error
// GotLogs is called when the logs are completed.
GotLogs func(*State, []*Line) error
}