MCPcopy Create free account
hub / github.com/zalando/skipper / parseAnnotationFilters

Function parseAnnotationFilters

config/config.go:1452–1465  ·  view source on GitHub ↗
(s []string)

Source from the content-addressed store, hash-verified

1450}
1451
1452func parseAnnotationFilters(s []string) ([]kubernetes.AnnotationFilters, error) {
1453 return parseAnnotationConfig(s, func(annotationKey, annotationValue, value string) (kubernetes.AnnotationFilters, error) {
1454 filters, err := eskip.ParseFilters(value)
1455 if err != nil {
1456 var zero kubernetes.AnnotationFilters
1457 return zero, err
1458 }
1459 return kubernetes.AnnotationFilters{
1460 Key: annotationKey,
1461 Value: annotationValue,
1462 Filters: filters,
1463 }, nil
1464 })
1465}
1466
1467// parseAnnotationConfig parses a slice of strings in the "annotationKey=annotationValue=value" format
1468// by calling parseValue function to convert (annotationKey, annotationValue, value) tuple into T.

Callers 4

validateFunction · 0.85
ParseArgsMethod · 0.85

Calls 2

ParseFiltersFunction · 0.92
parseAnnotationConfigFunction · 0.85

Tested by 2

Used in the wild real call sites across dependent graphs

searching dependent graphs…