Skip to content

Commit 72c2c63

Browse files
committed
feat: add OnFailType constants for hook error handling
1 parent 83cc41f commit 72c2c63

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

core/sling/hooks.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ const (
1717
HookKindStep HookKind = "step"
1818
)
1919

20+
const (
21+
OnFailAbort OnFailType = "abort"
22+
OnFailError OnFailType = "error"
23+
OnFailWarn OnFailType = "warn"
24+
OnFailSkip OnFailType = "skip" // skip the stream
25+
OnFailQuiet OnFailType = "quiet"
26+
OnFailBreak OnFailType = "break" // break the hook
27+
OnFailRetry OnFailType = "retry"
28+
OnFailDefer OnFailType = "defer" // defer failure (in groups)
29+
)
30+
2031
var HookRunReplication func(string, *Config, ...string) error
2132

2233
type Hook interface {

0 commit comments

Comments
 (0)