storj/protos/overlay/overlay.proto
Dylan Lott 325a70d514 Cache (#67)
* add reference to dht to overlay client struct

* wip

* wip

* Implement FindNode

* get nodes

* WIP

* Merge in Dennis kademlia code, get it working with our code

* ping and moar

* WIP trying to get cache working with kademlia

* WIP more wiring up

* WIP

* Update service cli commands

* WIP

* added GetNodes

* added nodes to Kbucket

* default transport changed to TCP

* GetBuckets interface changed

* filling in more routing

* timestamp methods

* removed store

* Added initial network overlay explorer page

* Updating and building with dockerfile

* Working on adding bootstrap node code

* WIP merging in dennis' code

* WIP

* connects cache to pkg/kademlia implementation

* WIP redis cache

* testing

* Add bootstrap network function for CLI usage

* cleanup

* call bootstrap on init network

* Add BootstrapNetwork function to interface

* Merge in dennis kad code

* WIP updates to redis/overlay client interface

* WIP trying to get the DHT connected to the cache

* go mod & test

* deps

* Bootstrap node now setting up correctly

- Need to pass it through CLI commands better

* WIP adding refresh and walk functions, added cli flags

- added cli flags for custom bootstrap port and ip

* PR comments addressed

* adding FindStorageNodes to overlay cache

* fix GetBucket

* using SplitHostPort

* Use JoinHostPort

* updates to findstoragenodes response and request

* WIP merge in progress, having issues with a panic

* wip

* adjustments

* update port for dht bootstrap test

* Docker

* wip

* dockerfile

* fixes

* makefile changes

* Update port in NewKademlia call

* Update local kademlia DHT config

* kubernetes yaml

* cleanup

* making tests pass

* k8s yaml

* lint issues

* Edit cli flags to allow for configurable bootstrap IP and Port args

* cleanup

* cache walking the network now

* Rough prototype of Walk function laid out

* Move walk function into bootstrap function

* Update dht.go

* changes to yaml

* goimports
2018-06-05 17:06:37 -04:00

65 lines
1.9 KiB
Protocol Buffer

// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
syntax = "proto3";
import "google/protobuf/duration.proto";
// NodeTransport is an enum of possible transports for the overlay network
enum NodeTransport {
TCP = 0;
}
// Overlay defines the interface for communication with the overlay network
service Overlay {
// Lookup finds a nodes address from the network
rpc Lookup(LookupRequest) returns (LookupResponse);
// FindStorageNodes finds a list of nodes in the network that meet the specified request parameters
rpc FindStorageNodes(FindStorageNodesRequest) returns (FindStorageNodesResponse);
}
// LookupRequest is is request message for the lookup rpc call
message LookupRequest {
string nodeID = 1;
}
// LookupResponse is is response message for the lookup rpc call
message LookupResponse {
NodeAddress nodeAddress = 1;
}
// FindStorageNodesResponse is is response message for the FindStorageNodes rpc call
message FindStorageNodesResponse {
repeated Node node = 1;
}
// FindStorageNodesRequest is is request message for the FindStorageNodes rpc call
message FindStorageNodesRequest {
int64 objectSize = 1;
google.protobuf.Duration contractLength = 2;
OverlayOptions opts = 3;
}
// NodeAddress contains the information needed to communicate with a node on the network
message NodeAddress {
NodeTransport transport = 1;
string address = 2;
}
// OverlayOptions is a set of criteria that a node must meet to be considered for a storage opportunity
message OverlayOptions {
google.protobuf.Duration maxLatency = 1;
NodeRep minReputation = 2; // Not sure what NodeRep is yet.
int64 minSpeedKbps = 3;
int64 limit = 4;
}
// NodeRep is the reputation characteristics of a node
message NodeRep {}
// Node represents a node in the overlay network
message Node {
string id = 1;
NodeAddress address = 2;
}