v3 refactor (#1868)
* Move to v3 Co-authored-by: Ben Toogood <bentoogood@gmail.com>
This commit is contained in:
1102
network/mucp/proto/network.pb.go
Normal file
1102
network/mucp/proto/network.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
21
network/mucp/proto/network.pb.micro.go
Normal file
21
network/mucp/proto/network.pb.micro.go
Normal file
@@ -0,0 +1,21 @@
|
||||
// Code generated by protoc-gen-micro. DO NOT EDIT.
|
||||
// source: github.com/micro/go-micro/network/mucp/proto/network.proto
|
||||
|
||||
package go_micro_network_mucp
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
math "math"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
115
network/mucp/proto/network.proto
Normal file
115
network/mucp/proto/network.proto
Normal file
@@ -0,0 +1,115 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package go.micro.network.mucp;
|
||||
|
||||
// AdvertType defines the type of advert
|
||||
enum AdvertType {
|
||||
AdvertAnnounce = 0;
|
||||
AdvertUpdate = 1;
|
||||
}
|
||||
|
||||
// Advert is router advertsement streamed by Watch
|
||||
message Advert {
|
||||
// id of the advertising router
|
||||
string id = 1;
|
||||
// type of advertisement
|
||||
AdvertType type = 2;
|
||||
// unix timestamp of the advertisement
|
||||
int64 timestamp = 3;
|
||||
// TTL of the Advert
|
||||
int64 ttl = 4;
|
||||
// events is a list of advertised events
|
||||
repeated Event events = 5;
|
||||
}
|
||||
|
||||
// EventType defines the type of event
|
||||
enum EventType {
|
||||
Create = 0;
|
||||
Delete = 1;
|
||||
Update = 2;
|
||||
}
|
||||
|
||||
// Event is routing table event
|
||||
message Event {
|
||||
// the unique event id
|
||||
string id = 1;
|
||||
// type of event
|
||||
EventType type = 2;
|
||||
// unix timestamp of event
|
||||
int64 timestamp = 3;
|
||||
// service route
|
||||
Route route = 4;
|
||||
}
|
||||
|
||||
// Route is a service route
|
||||
message Route {
|
||||
// service for the route
|
||||
string service = 1;
|
||||
// the address that advertise this route
|
||||
string address = 2;
|
||||
// gateway as the next hop
|
||||
string gateway = 3;
|
||||
// the network for this destination
|
||||
string network = 4;
|
||||
// router if the router id
|
||||
string router = 5;
|
||||
// the network link
|
||||
string link = 6;
|
||||
// the metric / score of this route
|
||||
int64 metric = 7;
|
||||
// metadata for the route
|
||||
map<string,string> metadata = 8;
|
||||
}
|
||||
|
||||
// Error tracks network errors
|
||||
message Error {
|
||||
uint32 count = 1;
|
||||
string msg = 2;
|
||||
}
|
||||
|
||||
// Status is node status
|
||||
message Status {
|
||||
Error error = 1;
|
||||
}
|
||||
|
||||
// Node is network node
|
||||
message Node {
|
||||
// node id
|
||||
string id = 1;
|
||||
// node address
|
||||
string address = 2;
|
||||
// the network
|
||||
string network = 3;
|
||||
// associated metadata
|
||||
map<string,string> metadata = 4;
|
||||
// node status
|
||||
Status status = 5;
|
||||
}
|
||||
|
||||
// Connect is sent when the node connects to the network
|
||||
message Connect {
|
||||
// network mode
|
||||
Node node = 1;
|
||||
}
|
||||
|
||||
// Close is sent when the node disconnects from the network
|
||||
message Close {
|
||||
// network node
|
||||
Node node = 1;
|
||||
}
|
||||
|
||||
// Peer is used to advertise node peers
|
||||
message Peer {
|
||||
// network node
|
||||
Node node = 1;
|
||||
// node peers
|
||||
repeated Peer peers = 2;
|
||||
}
|
||||
|
||||
// Sync is network sync message
|
||||
message Sync {
|
||||
// peer origin
|
||||
Peer peer = 1;
|
||||
// node routes
|
||||
repeated Route routes = 2;
|
||||
}
|
||||
Reference in New Issue
Block a user