Documentation ¶
Index ¶
- func GetBlockedNodes(ctx context.Context, taskID model.TaskID) ([]string, error)
- func Monitor(ctx context.Context, taskID model.TaskID, logs []*model.TaskLog, ...) error
- func SetDefault(p *LogPatternPolicies)
- func TaskLogsFromDontRetryTriggers(taskID model.TaskID, t []DontRetryTrigger) []*model.TaskLog
- type DontRetryTrigger
- type LogPatternPolicies
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBlockedNodes ¶
GetBlockedNodes returns nodes you can't schedule on due to log pattern policies.
func Monitor ¶
func Monitor(ctx context.Context, taskID model.TaskID, logs []*model.TaskLog, policies expconf.LogPoliciesConfig, ) error
Monitor checks for logs against any log_pattern_policies and takes action according to the policy.
func SetDefault ¶
func SetDefault(p *LogPatternPolicies)
SetDefault sets the package level default for log pattern policies.
func TaskLogsFromDontRetryTriggers ¶
func TaskLogsFromDontRetryTriggers(taskID model.TaskID, t []DontRetryTrigger) []*model.TaskLog
TaskLogsFromDontRetryTriggers returns informational task logs from dont retry triggers.
Types ¶
type DontRetryTrigger ¶
DontRetryTrigger has information about don't retry policies that have been triggered.
func ShouldRetry ¶
ShouldRetry returns a list of any triggered log policies that prevent retrying a trial. Returns an empty list if taskID doesn't exist. Order is not guaranteed. Only returns first log that triggered each regex. Multiple policies with the same regex will only have one DontRetryTrigger.
type LogPatternPolicies ¶
type LogPatternPolicies struct {
// contains filtered or unexported fields
}
LogPatternPolicies performs log pattern checks.