storj/pkg/kademlia/bucket.go
Dennis Coyle e22810da15
Kademlia Package (#58)
* wip

* wip

* get nodes

* ping and moar

* added GetNodes

* added nodes to Kbucket

* default transport changed to TCP

* GetBuckets interface changed

* filling in more routing

* timestamp methods

* removed store

* testing

* cleanup

* go mod & test

* deps

* PR comments addressed

* fix GetBucket

* using SplitHostPort

* Use JoinHostPort
2018-06-05 07:48:19 -04:00

27 lines
683 B
Go

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