2018-04-23 16:54:22 +01:00
|
|
|
// Copyright (C) 2018 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
2018-04-12 14:50:22 +01:00
|
|
|
package overlay
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2018-04-23 16:54:22 +01:00
|
|
|
proto "storj.io/storj/protos/overlay" // naming proto to avoid confusion with this package
|
2018-04-12 14:50:22 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// Overlay implements our overlay RPC service
|
|
|
|
type Overlay struct{}
|
|
|
|
|
|
|
|
// Lookup finds the address of a node in our overlay network
|
2018-04-23 16:54:22 +01:00
|
|
|
func (o *Overlay) Lookup(ctx context.Context, req *proto.LookupRequest) (*proto.LookupResponse, error) {
|
2018-04-12 14:50:22 +01:00
|
|
|
// TODO: fill this in with logic to communicate with kademlia
|
2018-04-23 16:54:22 +01:00
|
|
|
return &proto.LookupResponse{}, nil
|
2018-04-12 14:50:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// FindStorageNodes searches the overlay network for nodes that meet the provided requirements
|
2018-04-23 16:54:22 +01:00
|
|
|
func (o *Overlay) FindStorageNodes(ctx context.Context, req *proto.FindStorageNodesRequest) (*proto.FindStorageNodesResponse, error) {
|
2018-04-12 14:50:22 +01:00
|
|
|
// TODO: fill this in with logic to communicate with kademlia
|
2018-04-23 16:54:22 +01:00
|
|
|
return &proto.FindStorageNodesResponse{}, nil
|
2018-04-12 14:50:22 +01:00
|
|
|
}
|