node configuration command proto

This commit is contained in:
Sergey Cherepanov 2023-03-26 14:54:27 +02:00
parent d20f5fc2b3
commit 067bf797dd
No known key found for this signature in database
GPG Key ID: 87F8EDE8FBDF637C
3 changed files with 898 additions and 46 deletions

View File

@ -90,6 +90,38 @@ func (SpaceStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_d94f6f99586adae2, []int{1}
}
// NodeType determines the type of API that a node supports
type NodeType int32
const (
// TreeAPI supports space/tree sync api
NodeType_TreeAPI NodeType = 0
// FileAPI support file api
NodeType_FileAPI NodeType = 1
// CoordinatorAPI supports coordinator api
NodeType_CoordinatorAPI NodeType = 2
)
var NodeType_name = map[int32]string{
0: "TreeAPI",
1: "FileAPI",
2: "CoordinatorAPI",
}
var NodeType_value = map[string]int32{
"TreeAPI": 0,
"FileAPI": 1,
"CoordinatorAPI": 2,
}
func (x NodeType) String() string {
return proto.EnumName(NodeType_name, int32(x))
}
func (NodeType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_d94f6f99586adae2, []int{2}
}
type SpaceSignRequest struct {
SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"`
Header []byte `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"`
@ -668,9 +700,172 @@ func (m *SpaceStatusChangeResponse) GetPayload() *SpaceStatusPayload {
return nil
}
// NetworkConfigurationRequest contains the requested configurationId, it can be empty to request the latest version
type NetworkConfigurationRequest struct {
ConfigurationId string `protobuf:"bytes,1,opt,name=configurationId,proto3" json:"configurationId,omitempty"`
}
func (m *NetworkConfigurationRequest) Reset() { *m = NetworkConfigurationRequest{} }
func (m *NetworkConfigurationRequest) String() string { return proto.CompactTextString(m) }
func (*NetworkConfigurationRequest) ProtoMessage() {}
func (*NetworkConfigurationRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_d94f6f99586adae2, []int{11}
}
func (m *NetworkConfigurationRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *NetworkConfigurationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_NetworkConfigurationRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *NetworkConfigurationRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_NetworkConfigurationRequest.Merge(m, src)
}
func (m *NetworkConfigurationRequest) XXX_Size() int {
return m.Size()
}
func (m *NetworkConfigurationRequest) XXX_DiscardUnknown() {
xxx_messageInfo_NetworkConfigurationRequest.DiscardUnknown(m)
}
var xxx_messageInfo_NetworkConfigurationRequest proto.InternalMessageInfo
func (m *NetworkConfigurationRequest) GetConfigurationId() string {
if m != nil {
return m.ConfigurationId
}
return ""
}
// NetworkConfigurationResponse contains list of nodes
type NetworkConfigurationResponse struct {
ConfigurationId string `protobuf:"bytes,1,opt,name=configurationId,proto3" json:"configurationId,omitempty"`
Nodes []*Node `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
}
func (m *NetworkConfigurationResponse) Reset() { *m = NetworkConfigurationResponse{} }
func (m *NetworkConfigurationResponse) String() string { return proto.CompactTextString(m) }
func (*NetworkConfigurationResponse) ProtoMessage() {}
func (*NetworkConfigurationResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_d94f6f99586adae2, []int{12}
}
func (m *NetworkConfigurationResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *NetworkConfigurationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_NetworkConfigurationResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *NetworkConfigurationResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_NetworkConfigurationResponse.Merge(m, src)
}
func (m *NetworkConfigurationResponse) XXX_Size() int {
return m.Size()
}
func (m *NetworkConfigurationResponse) XXX_DiscardUnknown() {
xxx_messageInfo_NetworkConfigurationResponse.DiscardUnknown(m)
}
var xxx_messageInfo_NetworkConfigurationResponse proto.InternalMessageInfo
func (m *NetworkConfigurationResponse) GetConfigurationId() string {
if m != nil {
return m.ConfigurationId
}
return ""
}
func (m *NetworkConfigurationResponse) GetNodes() []*Node {
if m != nil {
return m.Nodes
}
return nil
}
// Node describes one node in the network
type Node struct {
// peerId - it's a peer identifier (libp2p format string) so it's an encoded publicKey
PeerId string `protobuf:"bytes,1,opt,name=peerId,proto3" json:"peerId,omitempty"`
// list of node addresses
Addresses []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"`
// list of supported APIs
Types []NodeType `protobuf:"varint,3,rep,packed,name=types,proto3,enum=coordinator.NodeType" json:"types,omitempty"`
}
func (m *Node) Reset() { *m = Node{} }
func (m *Node) String() string { return proto.CompactTextString(m) }
func (*Node) ProtoMessage() {}
func (*Node) Descriptor() ([]byte, []int) {
return fileDescriptor_d94f6f99586adae2, []int{13}
}
func (m *Node) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_Node.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *Node) XXX_Merge(src proto.Message) {
xxx_messageInfo_Node.Merge(m, src)
}
func (m *Node) XXX_Size() int {
return m.Size()
}
func (m *Node) XXX_DiscardUnknown() {
xxx_messageInfo_Node.DiscardUnknown(m)
}
var xxx_messageInfo_Node proto.InternalMessageInfo
func (m *Node) GetPeerId() string {
if m != nil {
return m.PeerId
}
return ""
}
func (m *Node) GetAddresses() []string {
if m != nil {
return m.Addresses
}
return nil
}
func (m *Node) GetTypes() []NodeType {
if m != nil {
return m.Types
}
return nil
}
func init() {
proto.RegisterEnum("coordinator.ErrorCodes", ErrorCodes_name, ErrorCodes_value)
proto.RegisterEnum("coordinator.SpaceStatus", SpaceStatus_name, SpaceStatus_value)
proto.RegisterEnum("coordinator.NodeType", NodeType_name, NodeType_value)
proto.RegisterType((*SpaceSignRequest)(nil), "coordinator.SpaceSignRequest")
proto.RegisterType((*SpaceStatusPayload)(nil), "coordinator.SpaceStatusPayload")
proto.RegisterType((*SpaceSignResponse)(nil), "coordinator.SpaceSignResponse")
@ -682,6 +877,9 @@ func init() {
proto.RegisterType((*SpaceStatusCheckResponse)(nil), "coordinator.SpaceStatusCheckResponse")
proto.RegisterType((*SpaceStatusChangeRequest)(nil), "coordinator.SpaceStatusChangeRequest")
proto.RegisterType((*SpaceStatusChangeResponse)(nil), "coordinator.SpaceStatusChangeResponse")
proto.RegisterType((*NetworkConfigurationRequest)(nil), "coordinator.NetworkConfigurationRequest")
proto.RegisterType((*NetworkConfigurationResponse)(nil), "coordinator.NetworkConfigurationResponse")
proto.RegisterType((*Node)(nil), "coordinator.Node")
}
func init() {
@ -689,51 +887,61 @@ func init() {
}
var fileDescriptor_d94f6f99586adae2 = []byte{
// 704 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4d, 0x4f, 0x13, 0x4f,
0x18, 0xef, 0xb6, 0x05, 0xd2, 0xa7, 0xa4, 0xff, 0x65, 0xfe, 0x80, 0x6b, 0x83, 0x2b, 0x59, 0x95,
0x34, 0xc4, 0x00, 0x29, 0x6a, 0xe2, 0xcd, 0x58, 0x30, 0xc1, 0x18, 0x24, 0x8b, 0xd5, 0xa8, 0x07,
0xb3, 0xec, 0x3e, 0xc0, 0x84, 0x65, 0x67, 0xdd, 0x99, 0x1a, 0x38, 0x98, 0xf8, 0x11, 0x3c, 0xf9,
0x29, 0xfc, 0x08, 0x7e, 0x00, 0x8f, 0x1c, 0x3d, 0x1a, 0xf8, 0x14, 0xde, 0xcc,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 0x71, 0x63, 0xcf, 0xa5, 0xbf, 0x77, 0x8d, 0x57, 0x46, 0x70,
0x20, 0x9f, 0x69, 0x65, 0xe3, 0xc8, 0x84, 0x58, 0xe5, 0xa6, 0x34, 0x57, 0xae, 0x73, 0x4b, 0x39,
0x9e, 0x3e, 0xfa, 0x79, 0x69, 0x6a, 0x17, 0x97, 0xa6, 0xf6, 0xfb, 0xd2, 0xd4, 0xbe, 0x5e, 0x99,
0xa5, 0x8b, 0x2b, 0xb3, 0xf4, 0xeb, 0xca, 0x2c, 0xbd, 0x5b, 0x9a, 0xf4, 0x91, 0x3c, 0x98, 0x4e,
0xfe, 0x6d, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x76, 0x96, 0x0f, 0x4b, 0x07, 0x00, 0x00,
// 856 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x6e, 0xe3, 0x44,
0x14, 0x8e, 0xe3, 0xb4, 0x25, 0xc7, 0x55, 0x70, 0x87, 0xb6, 0x98, 0x50, 0x4c, 0x64, 0x60, 0x09,
0x05, 0x75, 0x57, 0x59, 0x40, 0x70, 0x07, 0x64, 0x17, 0x54, 0x84, 0x4a, 0xe5, 0xb6, 0x20, 0xe0,
0x02, 0x79, 0xed, 0xd3, 0x76, 0xd4, 0xd4, 0xe3, 0x9d, 0x99, 0xc0, 0xf6, 0x02, 0x89, 0x47, 0xe0,
0x8a, 0xa7, 0xe0, 0x11, 0x78, 0x00, 0x2e, 0xf7, 0x92, 0x4b, 0xd4, 0x4a, 0x3c, 0x07, 0x1a, 0x7b,
0x9c, 0x8c, 0x13, 0x27, 0xad, 0xc4, 0x4d, 0xdb, 0xf3, 0x9d, 0x9f, 0xef, 0x9c, 0x39, 0x3f, 0x2e,
0x7c, 0x10, 0x33, 0xc6, 0x13, 0x9a, 0x46, 0x92, 0xf1, 0xfb, 0xc6, 0x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 0x05, 0x00, 0x00, 0xff, 0xff,
0x69, 0x34, 0x32, 0xd9, 0x19, 0x09, 0x00, 0x00,
}
func (m *SpaceSignRequest) Marshal() (dAtA []byte, err error) {
@ -1143,6 +1351,137 @@ func (m *SpaceStatusChangeResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro
return len(dAtA) - i, nil
}
func (m *NetworkConfigurationRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *NetworkConfigurationRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *NetworkConfigurationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.ConfigurationId) > 0 {
i -= len(m.ConfigurationId)
copy(dAtA[i:], m.ConfigurationId)
i = encodeVarintCoordinator(dAtA, i, uint64(len(m.ConfigurationId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *NetworkConfigurationResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *NetworkConfigurationResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *NetworkConfigurationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Nodes) > 0 {
for iNdEx := len(m.Nodes) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Nodes[iNdEx].MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintCoordinator(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
}
if len(m.ConfigurationId) > 0 {
i -= len(m.ConfigurationId)
copy(dAtA[i:], m.ConfigurationId)
i = encodeVarintCoordinator(dAtA, i, uint64(len(m.ConfigurationId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *Node) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Node) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *Node) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Types) > 0 {
dAtA5 := make([]byte, len(m.Types)*10)
var j4 int
for _, num := range m.Types {
for num >= 1<<7 {
dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j4++
}
dAtA5[j4] = uint8(num)
j4++
}
i -= j4
copy(dAtA[i:], dAtA5[:j4])
i = encodeVarintCoordinator(dAtA, i, uint64(j4))
i--
dAtA[i] = 0x1a
}
if len(m.Addresses) > 0 {
for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Addresses[iNdEx])
copy(dAtA[i:], m.Addresses[iNdEx])
i = encodeVarintCoordinator(dAtA, i, uint64(len(m.Addresses[iNdEx])))
i--
dAtA[i] = 0x12
}
}
if len(m.PeerId) > 0 {
i -= len(m.PeerId)
copy(dAtA[i:], m.PeerId)
i = encodeVarintCoordinator(dAtA, i, uint64(len(m.PeerId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func encodeVarintCoordinator(dAtA []byte, offset int, v uint64) int {
offset -= sovCoordinator(v)
base := offset
@ -1333,6 +1672,64 @@ func (m *SpaceStatusChangeResponse) Size() (n int) {
return n
}
func (m *NetworkConfigurationRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.ConfigurationId)
if l > 0 {
n += 1 + l + sovCoordinator(uint64(l))
}
return n
}
func (m *NetworkConfigurationResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.ConfigurationId)
if l > 0 {
n += 1 + l + sovCoordinator(uint64(l))
}
if len(m.Nodes) > 0 {
for _, e := range m.Nodes {
l = e.Size()
n += 1 + l + sovCoordinator(uint64(l))
}
}
return n
}
func (m *Node) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.PeerId)
if l > 0 {
n += 1 + l + sovCoordinator(uint64(l))
}
if len(m.Addresses) > 0 {
for _, s := range m.Addresses {
l = len(s)
n += 1 + l + sovCoordinator(uint64(l))
}
}
if len(m.Types) > 0 {
l = 0
for _, e := range m.Types {
l += sovCoordinator(uint64(e))
}
n += 1 + sovCoordinator(uint64(l)) + l
}
return n
}
func sovCoordinator(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@ -2535,6 +2932,387 @@ func (m *SpaceStatusChangeResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *NetworkConfigurationRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCoordinator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: NetworkConfigurationRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NetworkConfigurationRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ConfigurationId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCoordinator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthCoordinator
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCoordinator
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ConfigurationId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipCoordinator(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCoordinator
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *NetworkConfigurationResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCoordinator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: NetworkConfigurationResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NetworkConfigurationResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ConfigurationId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCoordinator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthCoordinator
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCoordinator
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ConfigurationId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCoordinator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthCoordinator
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthCoordinator
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Nodes = append(m.Nodes, &Node{})
if err := m.Nodes[len(m.Nodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipCoordinator(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCoordinator
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Node) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCoordinator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Node: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCoordinator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthCoordinator
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCoordinator
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.PeerId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCoordinator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthCoordinator
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthCoordinator
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 3:
if wireType == 0 {
var v NodeType
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCoordinator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= NodeType(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Types = append(m.Types, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCoordinator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthCoordinator
}
postIndex := iNdEx + packedLen
if postIndex < 0 {
return ErrInvalidLengthCoordinator
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
var elementCount int
if elementCount != 0 && len(m.Types) == 0 {
m.Types = make([]NodeType, 0, elementCount)
}
for iNdEx < postIndex {
var v NodeType
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowCoordinator
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= NodeType(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Types = append(m.Types, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field Types", wireType)
}
default:
iNdEx = preIndex
skippy, err := skipCoordinator(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthCoordinator
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipCoordinator(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0

View File

@ -44,6 +44,7 @@ type DRPCCoordinatorClient interface {
FileLimitCheck(ctx context.Context, in *FileLimitCheckRequest) (*FileLimitCheckResponse, error)
SpaceStatusCheck(ctx context.Context, in *SpaceStatusCheckRequest) (*SpaceStatusCheckResponse, error)
SpaceStatusChange(ctx context.Context, in *SpaceStatusChangeRequest) (*SpaceStatusChangeResponse, error)
NetworkConfiguration(ctx context.Context, in *NetworkConfigurationRequest) (*NetworkConfigurationResponse, error)
}
type drpcCoordinatorClient struct {
@ -92,11 +93,21 @@ func (c *drpcCoordinatorClient) SpaceStatusChange(ctx context.Context, in *Space
return out, nil
}
func (c *drpcCoordinatorClient) NetworkConfiguration(ctx context.Context, in *NetworkConfigurationRequest) (*NetworkConfigurationResponse, error) {
out := new(NetworkConfigurationResponse)
err := c.cc.Invoke(ctx, "/coordinator.Coordinator/NetworkConfiguration", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}, in, out)
if err != nil {
return nil, err
}
return out, nil
}
type DRPCCoordinatorServer interface {
SpaceSign(context.Context, *SpaceSignRequest) (*SpaceSignResponse, error)
FileLimitCheck(context.Context, *FileLimitCheckRequest) (*FileLimitCheckResponse, error)
SpaceStatusCheck(context.Context, *SpaceStatusCheckRequest) (*SpaceStatusCheckResponse, error)
SpaceStatusChange(context.Context, *SpaceStatusChangeRequest) (*SpaceStatusChangeResponse, error)
NetworkConfiguration(context.Context, *NetworkConfigurationRequest) (*NetworkConfigurationResponse, error)
}
type DRPCCoordinatorUnimplementedServer struct{}
@ -117,9 +128,13 @@ func (s *DRPCCoordinatorUnimplementedServer) SpaceStatusChange(context.Context,
return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented)
}
func (s *DRPCCoordinatorUnimplementedServer) NetworkConfiguration(context.Context, *NetworkConfigurationRequest) (*NetworkConfigurationResponse, error) {
return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented)
}
type DRPCCoordinatorDescription struct{}
func (DRPCCoordinatorDescription) NumMethods() int { return 4 }
func (DRPCCoordinatorDescription) NumMethods() int { return 5 }
func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) {
switch n {
@ -159,6 +174,15 @@ func (DRPCCoordinatorDescription) Method(n int) (string, drpc.Encoding, drpc.Rec
in1.(*SpaceStatusChangeRequest),
)
}, DRPCCoordinatorServer.SpaceStatusChange, true
case 4:
return "/coordinator.Coordinator/NetworkConfiguration", drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCCoordinatorServer).
NetworkConfiguration(
ctx,
in1.(*NetworkConfigurationRequest),
)
}, DRPCCoordinatorServer.NetworkConfiguration, true
default:
return "", nil, nil, nil, false
}
@ -231,3 +255,19 @@ func (x *drpcCoordinator_SpaceStatusChangeStream) SendAndClose(m *SpaceStatusCha
}
return x.CloseSend()
}
type DRPCCoordinator_NetworkConfigurationStream interface {
drpc.Stream
SendAndClose(*NetworkConfigurationResponse) error
}
type drpcCoordinator_NetworkConfigurationStream struct {
drpc.Stream
}
func (x *drpcCoordinator_NetworkConfigurationStream) SendAndClose(m *NetworkConfigurationResponse) error {
if err := x.MsgSend(m, drpcEncoding_File_coordinator_coordinatorproto_protos_coordinator_proto{}); err != nil {
return err
}
return x.CloseSend()
}

View File

@ -18,6 +18,9 @@ service Coordinator {
// SpaceStatusChange changes the status of space
rpc SpaceStatusChange(SpaceStatusChangeRequest) returns (SpaceStatusChangeResponse);
// NetworkConfiguration retrieves the latest network configuration
rpc NetworkConfiguration(NetworkConfigurationRequest) returns (NetworkConfigurationResponse);
}
message SpaceSignRequest {
@ -103,3 +106,34 @@ message SpaceStatusChangeRequest {
message SpaceStatusChangeResponse {
SpaceStatusPayload payload = 1;
}
// NetworkConfigurationRequest contains the requested configurationId, it can be empty to request the latest version
message NetworkConfigurationRequest {
string configurationId = 1;
}
// NetworkConfigurationResponse contains list of nodes
message NetworkConfigurationResponse {
string configurationId = 1;
repeated Node nodes = 2;
}
// NodeType determines the type of API that a node supports
enum NodeType {
// TreeAPI supports space/tree sync api
TreeAPI = 0;
// FileAPI support file api
FileAPI = 1;
// CoordinatorAPI supports coordinator api
CoordinatorAPI = 2;
}
// Node describes one node in the network
message Node {
// peerId - it's a peer identifier (libp2p format string) so it's an encoded publicKey
string peerId = 1;
// list of node addresses
repeated string addresses = 2;
// list of supported APIs
repeated NodeType types = 3;
}