storj/pkg/overlay/overlay.go

26 lines
893 B
Go
Raw Normal View History

// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
2018-04-12 14:50:22 +01:00
package overlay
import (
"context"
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
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
return &proto.LookupResponse{}, nil
2018-04-12 14:50:22 +01:00
}
// FindStorageNodes searches the overlay network for nodes that meet the provided requirements
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
return &proto.FindStorageNodesResponse{}, nil
2018-04-12 14:50:22 +01:00
}