Increase patricia.MaxPrefixPerNode

It allows to avoid redundant prefix splits
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
This commit is contained in:
LK4D4 2014-06-28 12:27:44 +04:00
parent 2edfb1e696
commit 095cb7a818

View file

@ -13,6 +13,12 @@ var (
ErrNoID = errors.New("prefix can't be empty")
)
func init() {
// Change patricia max prefix per node length,
// because our len(ID) always 64
patricia.MaxPrefixPerNode = 64
}
// TruncIndex allows the retrieval of string identifiers by any of their unique prefixes.
// This is used to retrieve image and container IDs by more convenient shorthand prefixes.
type TruncIndex struct {