recommender

package
v1.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DiagDefaultRules = "https://storage.googleapis.com/skaffold/diag/customRules/v1/rules.json"
)

Variables

View Source
var (
	NilSuggestion = proto.Suggestion{SuggestionCode: proto.SuggestionCode_NIL}
)

Functions

This section is empty.

Types

type ContainerError

type ContainerError struct {
}

func (ContainerError) Make

type Custom added in v1.11.4

type Custom struct {
	RulesPath string
	// contains filtered or unexported fields
}

func NewCustom added in v1.11.4

func NewCustom(path string, deployContext map[string]string) (Custom, error)

NewCustom returns a custom recommender from rules file or return error

func (Custom) Make added in v1.11.4

func (r Custom) Make(errCode proto.StatusCode) proto.Suggestion

type Rule added in v1.11.4

type Rule struct {
	ErrCode              proto.StatusCode     `json:"errorCode"`
	SuggestionCode       proto.SuggestionCode `json:"suggestionCode"`
	Suggestion           string               `json:"suggestion"`
	ContextPrefixMatches map[string]string    `json:"contextPrefixMatches"`
}

func (Rule) Matches added in v1.11.4

func (r Rule) Matches(errCode proto.StatusCode, deployContext map[string]string) bool

type RulesConfigV1 added in v1.11.4

type RulesConfigV1 struct {
	Rules []Rule `json:"rules"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL