()
| 32 | type TargetRule map[string]string |
| 33 | |
| 34 | func (r TargetRule) String() string { |
| 35 | predicates := []string{ |
| 36 | fmt.Sprintf("%v=%v", manifest.TypeLabelKey, r[manifest.TypeLabelKey]), |
| 37 | } |
| 38 | |
| 39 | for k, v := range r { |
| 40 | if k != manifest.TypeLabelKey { |
| 41 | predicates = append(predicates, fmt.Sprintf("%v=%v", k, v)) |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | return strings.Join(predicates, ",") |
| 46 | } |
| 47 | |
| 48 | // matches returns true if a given subject rule matches the given target |
| 49 | // for the provided username & hostname. The rule can use |
no outgoing calls