Add missing bits from V1, slight touchup
This commit is contained in:
@@ -10,7 +10,7 @@ type (
|
||||
}
|
||||
|
||||
Datasource interface {
|
||||
Next(ctx context.Context, out map[string]string) (ident string, more bool, err error)
|
||||
Next(ctx context.Context, out map[string]string) (ident []string, more bool, err error)
|
||||
Reset(ctx context.Context) error
|
||||
SetProvider(Provider) bool
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package envoyx
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -213,3 +214,16 @@ func (p EncodeParams) validate() (err error) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func CastMergeAlg(v string) (mergeAlg mergeAlg) {
|
||||
switch strings.ToLower(v) {
|
||||
case "replace", "mergeleft":
|
||||
mergeAlg = OnConflictReplace
|
||||
case "skip", "mergeright":
|
||||
mergeAlg = OnConflictSkip
|
||||
case "panic", "error":
|
||||
mergeAlg = OnConflictPanic
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -19,6 +19,11 @@ type (
|
||||
|
||||
// Placeholders are resources which were added to help resolve missing deps
|
||||
Placeholder bool
|
||||
Config NodeConfig
|
||||
}
|
||||
NodeConfig struct {
|
||||
MergeAlg mergeAlg
|
||||
SkipIf string
|
||||
}
|
||||
|
||||
NodeSet []*Node
|
||||
|
||||
Reference in New Issue
Block a user