github.com/MetalBlockchain/metalgo@v1.11.9/utils/hashing/consistent/hashable.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package consistent
     5  
     6  // Hashable is an interface to be implemented by structs that need to be sharded via consistent hashing.
     7  type Hashable interface {
     8  	// ConsistentHashKey is the key used to shard the blob.
     9  	// This should be constant for a given blob.
    10  	ConsistentHashKey() []byte
    11  }