2018-05-16 19:47:59 +01:00
|
|
|
// Copyright (C) 2018 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package kademlia
|
|
|
|
|
2018-09-18 05:39:06 +01:00
|
|
|
import "storj.io/storj/pkg/pb"
|
2018-05-16 19:47:59 +01:00
|
|
|
|
|
|
|
// KBucket implements the Bucket interface
|
|
|
|
type KBucket struct {
|
2018-09-18 05:39:06 +01:00
|
|
|
nodes []*pb.Node
|
2018-05-16 19:47:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Routing __ (TODO) still not entirely sure what the bucket methods are supposed to do
|
2018-09-18 05:39:06 +01:00
|
|
|
func (b *KBucket) Routing() []pb.Node {
|
|
|
|
return []pb.Node{}
|
2018-05-16 19:47:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Cache __ (TODO) still not entirely sure what the bucket methods are supposed to do
|
2018-09-18 05:39:06 +01:00
|
|
|
func (b *KBucket) Cache() []pb.Node {
|
|
|
|
return []pb.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
|
2018-09-18 05:39:06 +01:00
|
|
|
func (b *KBucket) Nodes() []*pb.Node {
|
2018-06-22 14:33:57 +01:00
|
|
|
return b.nodes
|
|
|
|
}
|