2018-05-16 19:47:59 +01:00
|
|
|
// Copyright (C) 2018 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package kademlia
|
|
|
|
|
2018-06-22 14:33:57 +01:00
|
|
|
import proto "storj.io/storj/protos/overlay"
|
2018-05-16 19:47:59 +01:00
|
|
|
|
|
|
|
// KBucket implements the Bucket interface
|
|
|
|
type KBucket struct {
|
2018-06-22 14:33:57 +01:00
|
|
|
nodes []*proto.Node
|
2018-05-16 19:47:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Routing __ (TODO) still not entirely sure what the bucket methods are supposed to do
|
2018-06-22 14:33:57 +01:00
|
|
|
func (b *KBucket) Routing() []proto.Node {
|
|
|
|
return []proto.Node{}
|
2018-05-16 19:47:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Cache __ (TODO) still not entirely sure what the bucket methods are supposed to do
|
2018-06-22 14:33:57 +01:00
|
|
|
func (b *KBucket) Cache() []proto.Node {
|
|
|
|
return []proto.Node{}
|
2018-05-16 19:47:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Midpoint __ (TODO) still not entirely sure what the bucket methods are supposed to do
|
2018-06-22 14:33:57 +01:00
|
|
|
func (b *KBucket) Midpoint() string {
|
2018-05-16 19:47:59 +01:00
|
|
|
return ""
|
|
|
|
}
|
2018-06-22 14:33:57 +01:00
|
|
|
|
|
|
|
// Nodes returns the set of all nodes in a bucket
|
|
|
|
func (b *KBucket) Nodes() []*proto.Node {
|
|
|
|
return b.nodes
|
|
|
|
}
|