storj/pkg/kademlia/bucket.go
Egon Elbre b6b6111173
Flatten proto definitions into a single package (#360)
* protos: move streams to pb
* protos: move overlay to pb
* protos: move pointerdb to pb
* protos: move piecestore to pb
* fix statdb import naming
2018-09-18 07:39:06 +03:00

32 lines
762 B
Go

// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
package kademlia
import "storj.io/storj/pkg/pb"
// KBucket implements the Bucket interface
type KBucket struct {
nodes []*pb.Node
}
// Routing __ (TODO) still not entirely sure what the bucket methods are supposed to do
func (b *KBucket) Routing() []pb.Node {
return []pb.Node{}
}
// Cache __ (TODO) still not entirely sure what the bucket methods are supposed to do
func (b *KBucket) Cache() []pb.Node {
return []pb.Node{}
}
// Midpoint __ (TODO) still not entirely sure what the bucket methods are supposed to do
func (b *KBucket) Midpoint() string {
return ""
}
// Nodes returns the set of all nodes in a bucket
func (b *KBucket) Nodes() []*pb.Node {
return b.nodes
}