PrefixesToMatches converts the prefixes for subscription to a list of match.
(prefixes [][]byte, ignore string)
| 1471 | |
| 1472 | // PrefixesToMatches converts the prefixes for subscription to a list of match. |
| 1473 | func PrefixesToMatches(prefixes [][]byte, ignore string) []*badgerpb.Match { |
| 1474 | matches := make([]*badgerpb.Match, 0, len(prefixes)) |
| 1475 | for _, prefix := range prefixes { |
| 1476 | matches = append(matches, &badgerpb.Match{ |
| 1477 | Prefix: prefix, |
| 1478 | IgnoreBytes: ignore, |
| 1479 | }) |
| 1480 | } |
| 1481 | return matches |
| 1482 | } |
| 1483 | |
| 1484 | // LimiterConf is the configuration options for LimiterConf. |
| 1485 | type LimiterConf struct { |
no outgoing calls
no test coverage detected