Compare commits
No commits in common. "0d996b202e45fc06448303ce9804beddc97d95e0" and "5bd2bf3b86fef2cf30faf677651f4bbe54ffb4dd" have entirely different histories.
0d996b202e
...
5bd2bf3b86
@ -6,7 +6,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"deevirt.fr/compute/pkg/api/proto"
|
"deevirt.fr/compute/cmd/compute_api/proto"
|
||||||
"deevirt.fr/compute/pkg/config"
|
"deevirt.fr/compute/pkg/config"
|
||||||
clientv3 "go.etcd.io/etcd/client/v3"
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
)
|
)
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"deevirt.fr/compute/pkg/api/proto"
|
"deevirt.fr/compute/cmd/compute_api/proto"
|
||||||
"deevirt.fr/compute/pkg/config"
|
"deevirt.fr/compute/pkg/config"
|
||||||
clientv3 "go.etcd.io/etcd/client/v3"
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
@ -14,7 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Server() {
|
func Server() {
|
||||||
config, _ := config.New()
|
config, _ := config.NewConfig()
|
||||||
|
|
||||||
//listen on the port
|
//listen on the port
|
||||||
lis, err := net.Listen("tcp", ":8080")
|
lis, err := net.Listen("tcp", ":8080")
|
||||||
|
@ -557,7 +557,7 @@ type DomainPowerRequest struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
VmId []byte `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"`
|
VmId []byte `protobuf:"bytes,1,opt,name=vm_id,json=vmId,proto3" json:"vm_id,omitempty"`
|
||||||
Action DomainPower `protobuf:"varint,2,opt,name=action,proto3,enum=deevirt.DomainPower" json:"action,omitempty"`
|
Action DomainPower `protobuf:"varint,2,opt,name=action,proto3,enum=domain.DomainPower" json:"action,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DomainPowerRequest) Reset() {
|
func (x *DomainPowerRequest) Reset() {
|
||||||
@ -742,98 +742,96 @@ var File_proto_domain_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_proto_domain_proto_rawDesc = []byte{
|
var file_proto_domain_proto_rawDesc = []byte{
|
||||||
0x0a, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70,
|
0x0a, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x22, 0x16, 0x0a,
|
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x16, 0x0a, 0x14,
|
||||||
0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65,
|
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4e, 0x0a, 0x15, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c,
|
0x75, 0x65, 0x73, 0x74, 0x22, 0x4d, 0x0a, 0x15, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69,
|
||||||
0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35,
|
0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a,
|
||||||
0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a,
|
||||||
0x1b, 0x2e, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
|
0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69,
|
||||||
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x64, 0x6f,
|
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61,
|
||||||
0x6d, 0x61, 0x69, 0x6e, 0x73, 0x22, 0x30, 0x0a, 0x11, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c,
|
0x69, 0x6e, 0x73, 0x22, 0x30, 0x0a, 0x11, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73,
|
||||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x6f,
|
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x6f, 0x6d, 0x61,
|
||||||
0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64,
|
0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6f, 0x6d,
|
||||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x12, 0x44, 0x6f, 0x6d, 0x61, 0x69,
|
0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x12, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c,
|
||||||
0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a,
|
0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64,
|
||||||
0x09, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||||
0x52, 0x08, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f,
|
0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66,
|
||||||
0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66,
|
|
||||||
0x69, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
|
||||||
0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x46, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61,
|
|
||||||
0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
|
||||||
0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
|
||||||
0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66,
|
|
||||||
0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||||
0x22, 0x32, 0x0a, 0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67,
|
0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x46, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
|
||||||
0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67,
|
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a,
|
||||||
0x72, 0x65, 0x73, 0x73, 0x22, 0x2a, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70,
|
0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
|
||||||
0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x76,
|
0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||||
0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x6d, 0x49, 0x64,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x32,
|
||||||
0x22, 0x16, 0x0a, 0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
0x0a, 0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61,
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65,
|
||||||
0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65,
|
||||||
0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
0x73, 0x73, 0x22, 0x2a, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61,
|
||||||
0x76, 0x6d, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65,
|
0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f,
|
||||||
0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x57, 0x0a, 0x12,
|
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x6d, 0x49, 0x64, 0x22, 0x16,
|
||||||
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x0a, 0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||||
0x73, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
|
||||||
0x0c, 0x52, 0x04, 0x76, 0x6d, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f,
|
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a,
|
||||||
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72,
|
0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x6d,
|
||||||
0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x06, 0x61,
|
0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65,
|
||||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50,
|
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x0a, 0x12, 0x44, 0x6f,
|
||||||
0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x23,
|
0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61,
|
0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||||
0x70, 0x68, 0x69, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75,
|
0x04, 0x76, 0x6d, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18,
|
||||||
0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44,
|
||||||
0x28, 0x0c, 0x52, 0x04, 0x76, 0x6d, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x24, 0x44, 0x6f, 0x6d, 0x61,
|
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69,
|
||||||
0x69, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63,
|
0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65,
|
||||||
0x73, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x23, 0x44, 0x6f, 0x6d,
|
||||||
0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
0x61, 0x69, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69,
|
||||||
0x72, 0x69, 0x2a, 0x70, 0x0a, 0x0b, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65,
|
0x63, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
0x72, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00,
|
0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||||
0x12, 0x09, 0x0a, 0x05, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52,
|
0x04, 0x76, 0x6d, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x24, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44,
|
||||||
0x45, 0x42, 0x4f, 0x4f, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x55, 0x54, 0x44,
|
|
||||||
0x4f, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x41, 0x55, 0x53, 0x45, 0x10, 0x04,
|
|
||||||
0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x53, 0x55, 0x4d, 0x45, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05,
|
|
||||||
0x52, 0x45, 0x53, 0x45, 0x54, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x53, 0x54, 0x52,
|
|
||||||
0x4f, 0x59, 0x10, 0x07, 0x32, 0xb4, 0x03, 0x0a, 0x06, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12,
|
|
||||||
0x47, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x2e, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72,
|
|
||||||
0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52,
|
|
||||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74,
|
|
||||||
0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65,
|
|
||||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12,
|
|
||||||
0x1a, 0x2e, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
|
|
||||||
0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x65,
|
|
||||||
0x65, 0x76, 0x69, 0x72, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74,
|
|
||||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x06, 0x43, 0x72,
|
|
||||||
0x65, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x2e, 0x44,
|
|
||||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
|
|
||||||
0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x2e, 0x44, 0x6f, 0x6d,
|
|
||||||
0x61, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
|
||||||
0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e,
|
|
||||||
0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70,
|
|
||||||
0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x65,
|
|
||||||
0x65, 0x76, 0x69, 0x72, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61,
|
|
||||||
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x06,
|
|
||||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74,
|
|
||||||
0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71,
|
|
||||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x2e, 0x44,
|
|
||||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
|
||||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x05, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x1b,
|
|
||||||
0x2e, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50,
|
|
||||||
0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x65,
|
|
||||||
0x65, 0x76, 0x69, 0x72, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65,
|
|
||||||
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0x81, 0x01, 0x0a, 0x15,
|
|
||||||
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61,
|
|
||||||
0x70, 0x68, 0x69, 0x63, 0x73, 0x12, 0x68, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65,
|
|
||||||
0x12, 0x2c, 0x2e, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69,
|
|
||||||
0x6e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73,
|
|
||||||
0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d,
|
|
||||||
0x2e, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44,
|
|
||||||
0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x43, 0x6f,
|
0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x43, 0x6f,
|
||||||
0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
|
0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a,
|
||||||
0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x2a,
|
||||||
0x6f, 0x33,
|
0x70, 0x0a, 0x0b, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x0d,
|
||||||
|
0x0a, 0x09, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a,
|
||||||
|
0x05, 0x53, 0x54, 0x41, 0x52, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x42, 0x4f,
|
||||||
|
0x4f, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x55, 0x54, 0x44, 0x4f, 0x57, 0x4e,
|
||||||
|
0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x41, 0x55, 0x53, 0x45, 0x10, 0x04, 0x12, 0x0a, 0x0a,
|
||||||
|
0x06, 0x52, 0x45, 0x53, 0x55, 0x4d, 0x45, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x53,
|
||||||
|
0x45, 0x54, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x53, 0x54, 0x52, 0x4f, 0x59, 0x10,
|
||||||
|
0x07, 0x32, 0xa8, 0x03, 0x0a, 0x06, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x45, 0x0a, 0x04,
|
||||||
|
0x4c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f,
|
||||||
|
0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
|
0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61,
|
||||||
|
0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
|
0x65, 0x22, 0x00, 0x12, 0x3e, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x19, 0x2e, 0x64, 0x6f, 0x6d,
|
||||||
|
0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||||
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44,
|
||||||
|
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
|
0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e,
|
||||||
|
0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x72, 0x65,
|
||||||
|
0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x6f, 0x6d,
|
||||||
|
0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||||
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x06, 0x55, 0x70,
|
||||||
|
0x64, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f,
|
||||||
|
0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69,
|
||||||
|
0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||||
|
0x00, 0x12, 0x45, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x6f,
|
||||||
|
0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||||
|
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69,
|
||||||
|
0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
|
||||||
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x05, 0x50, 0x6f, 0x77, 0x65,
|
||||||
|
0x72, 0x12, 0x1a, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69,
|
||||||
|
0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e,
|
||||||
|
0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77,
|
||||||
|
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x32, 0x7f, 0x0a, 0x15,
|
||||||
|
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61,
|
||||||
|
0x70, 0x68, 0x69, 0x63, 0x73, 0x12, 0x66, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65,
|
||||||
|
0x12, 0x2b, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
|
||||||
|
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x43,
|
||||||
|
0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e,
|
||||||
|
0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x76,
|
||||||
|
0x69, 0x63, 0x65, 0x73, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x73,
|
||||||
|
0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x09, 0x5a,
|
||||||
|
0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -851,39 +849,39 @@ func file_proto_domain_proto_rawDescGZIP() []byte {
|
|||||||
var file_proto_domain_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
var file_proto_domain_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||||
var file_proto_domain_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
var file_proto_domain_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
|
||||||
var file_proto_domain_proto_goTypes = []interface{}{
|
var file_proto_domain_proto_goTypes = []interface{}{
|
||||||
(DomainPower)(0), // 0: deevirt.DomainPower
|
(DomainPower)(0), // 0: domain.DomainPower
|
||||||
(*DomainListAllRequest)(nil), // 1: deevirt.DomainListAllRequest
|
(*DomainListAllRequest)(nil), // 1: domain.DomainListAllRequest
|
||||||
(*DomainListAllResponse)(nil), // 2: deevirt.DomainListAllResponse
|
(*DomainListAllResponse)(nil), // 2: domain.DomainListAllResponse
|
||||||
(*DomainListRequest)(nil), // 3: deevirt.DomainListRequest
|
(*DomainListRequest)(nil), // 3: domain.DomainListRequest
|
||||||
(*DomainListResponse)(nil), // 4: deevirt.DomainListResponse
|
(*DomainListResponse)(nil), // 4: domain.DomainListResponse
|
||||||
(*DomainCreateRequest)(nil), // 5: deevirt.DomainCreateRequest
|
(*DomainCreateRequest)(nil), // 5: domain.DomainCreateRequest
|
||||||
(*DomainCreateResponse)(nil), // 6: deevirt.DomainCreateResponse
|
(*DomainCreateResponse)(nil), // 6: domain.DomainCreateResponse
|
||||||
(*DomainUpdateRequest)(nil), // 7: deevirt.DomainUpdateRequest
|
(*DomainUpdateRequest)(nil), // 7: domain.DomainUpdateRequest
|
||||||
(*DomainUpdateResponse)(nil), // 8: deevirt.DomainUpdateResponse
|
(*DomainUpdateResponse)(nil), // 8: domain.DomainUpdateResponse
|
||||||
(*DomainDeleteRequest)(nil), // 9: deevirt.DomainDeleteRequest
|
(*DomainDeleteRequest)(nil), // 9: domain.DomainDeleteRequest
|
||||||
(*DomainDeleteResponse)(nil), // 10: deevirt.DomainDeleteResponse
|
(*DomainDeleteResponse)(nil), // 10: domain.DomainDeleteResponse
|
||||||
(*DomainPowerRequest)(nil), // 11: deevirt.DomainPowerRequest
|
(*DomainPowerRequest)(nil), // 11: domain.DomainPowerRequest
|
||||||
(*DomainPowerResponse)(nil), // 12: deevirt.DomainPowerResponse
|
(*DomainPowerResponse)(nil), // 12: domain.DomainPowerResponse
|
||||||
(*DomainDevicesGraphicsConsoleRequest)(nil), // 13: deevirt.DomainDevicesGraphicsConsoleRequest
|
(*DomainDevicesGraphicsConsoleRequest)(nil), // 13: domain.DomainDevicesGraphicsConsoleRequest
|
||||||
(*DomainDevicesGraphicsConsoleResponse)(nil), // 14: deevirt.DomainDevicesGraphicsConsoleResponse
|
(*DomainDevicesGraphicsConsoleResponse)(nil), // 14: domain.DomainDevicesGraphicsConsoleResponse
|
||||||
}
|
}
|
||||||
var file_proto_domain_proto_depIdxs = []int32{
|
var file_proto_domain_proto_depIdxs = []int32{
|
||||||
4, // 0: deevirt.DomainListAllResponse.domains:type_name -> deevirt.DomainListResponse
|
4, // 0: domain.DomainListAllResponse.domains:type_name -> domain.DomainListResponse
|
||||||
0, // 1: deevirt.DomainPowerRequest.action:type_name -> deevirt.DomainPower
|
0, // 1: domain.DomainPowerRequest.action:type_name -> domain.DomainPower
|
||||||
1, // 2: deevirt.Domain.List:input_type -> deevirt.DomainListAllRequest
|
1, // 2: domain.Domain.List:input_type -> domain.DomainListAllRequest
|
||||||
3, // 3: deevirt.Domain.Get:input_type -> deevirt.DomainListRequest
|
3, // 3: domain.Domain.Get:input_type -> domain.DomainListRequest
|
||||||
5, // 4: deevirt.Domain.Create:input_type -> deevirt.DomainCreateRequest
|
5, // 4: domain.Domain.Create:input_type -> domain.DomainCreateRequest
|
||||||
7, // 5: deevirt.Domain.Update:input_type -> deevirt.DomainUpdateRequest
|
7, // 5: domain.Domain.Update:input_type -> domain.DomainUpdateRequest
|
||||||
9, // 6: deevirt.Domain.Delete:input_type -> deevirt.DomainDeleteRequest
|
9, // 6: domain.Domain.Delete:input_type -> domain.DomainDeleteRequest
|
||||||
11, // 7: deevirt.Domain.Power:input_type -> deevirt.DomainPowerRequest
|
11, // 7: domain.Domain.Power:input_type -> domain.DomainPowerRequest
|
||||||
13, // 8: deevirt.DomainDevicesGraphics.Console:input_type -> deevirt.DomainDevicesGraphicsConsoleRequest
|
13, // 8: domain.DomainDevicesGraphics.Console:input_type -> domain.DomainDevicesGraphicsConsoleRequest
|
||||||
2, // 9: deevirt.Domain.List:output_type -> deevirt.DomainListAllResponse
|
2, // 9: domain.Domain.List:output_type -> domain.DomainListAllResponse
|
||||||
4, // 10: deevirt.Domain.Get:output_type -> deevirt.DomainListResponse
|
4, // 10: domain.Domain.Get:output_type -> domain.DomainListResponse
|
||||||
6, // 11: deevirt.Domain.Create:output_type -> deevirt.DomainCreateResponse
|
6, // 11: domain.Domain.Create:output_type -> domain.DomainCreateResponse
|
||||||
8, // 12: deevirt.Domain.Update:output_type -> deevirt.DomainUpdateResponse
|
8, // 12: domain.Domain.Update:output_type -> domain.DomainUpdateResponse
|
||||||
10, // 13: deevirt.Domain.Delete:output_type -> deevirt.DomainDeleteResponse
|
10, // 13: domain.Domain.Delete:output_type -> domain.DomainDeleteResponse
|
||||||
12, // 14: deevirt.Domain.Power:output_type -> deevirt.DomainPowerResponse
|
12, // 14: domain.Domain.Power:output_type -> domain.DomainPowerResponse
|
||||||
14, // 15: deevirt.DomainDevicesGraphics.Console:output_type -> deevirt.DomainDevicesGraphicsConsoleResponse
|
14, // 15: domain.DomainDevicesGraphics.Console:output_type -> domain.DomainDevicesGraphicsConsoleResponse
|
||||||
9, // [9:16] is the sub-list for method output_type
|
9, // [9:16] is the sub-list for method output_type
|
||||||
2, // [2:9] is the sub-list for method input_type
|
2, // [2:9] is the sub-list for method input_type
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
2, // [2:2] is the sub-list for extension type_name
|
@ -1,7 +1,7 @@
|
|||||||
syntax="proto3";
|
syntax="proto3";
|
||||||
|
|
||||||
option go_package = "./proto";
|
option go_package = "./proto";
|
||||||
package deevirt;
|
package domain;
|
||||||
|
|
||||||
// The greeting service definition.
|
// The greeting service definition.
|
||||||
service Domain {
|
service Domain {
|
@ -19,12 +19,12 @@ import (
|
|||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Domain_List_FullMethodName = "/deevirt.Domain/List"
|
Domain_List_FullMethodName = "/domain.Domain/List"
|
||||||
Domain_Get_FullMethodName = "/deevirt.Domain/Get"
|
Domain_Get_FullMethodName = "/domain.Domain/Get"
|
||||||
Domain_Create_FullMethodName = "/deevirt.Domain/Create"
|
Domain_Create_FullMethodName = "/domain.Domain/Create"
|
||||||
Domain_Update_FullMethodName = "/deevirt.Domain/Update"
|
Domain_Update_FullMethodName = "/domain.Domain/Update"
|
||||||
Domain_Delete_FullMethodName = "/deevirt.Domain/Delete"
|
Domain_Delete_FullMethodName = "/domain.Domain/Delete"
|
||||||
Domain_Power_FullMethodName = "/deevirt.Domain/Power"
|
Domain_Power_FullMethodName = "/domain.Domain/Power"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DomainClient is the client API for Domain service.
|
// DomainClient is the client API for Domain service.
|
||||||
@ -282,7 +282,7 @@ func _Domain_Power_Handler(srv interface{}, ctx context.Context, dec func(interf
|
|||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
var Domain_ServiceDesc = grpc.ServiceDesc{
|
var Domain_ServiceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "deevirt.Domain",
|
ServiceName: "domain.Domain",
|
||||||
HandlerType: (*DomainServer)(nil),
|
HandlerType: (*DomainServer)(nil),
|
||||||
Methods: []grpc.MethodDesc{
|
Methods: []grpc.MethodDesc{
|
||||||
{
|
{
|
||||||
@ -315,7 +315,7 @@ var Domain_ServiceDesc = grpc.ServiceDesc{
|
|||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
DomainDevicesGraphics_Console_FullMethodName = "/deevirt.DomainDevicesGraphics/Console"
|
DomainDevicesGraphics_Console_FullMethodName = "/domain.DomainDevicesGraphics/Console"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DomainDevicesGraphicsClient is the client API for DomainDevicesGraphics service.
|
// DomainDevicesGraphicsClient is the client API for DomainDevicesGraphics service.
|
||||||
@ -404,7 +404,7 @@ func _DomainDevicesGraphics_Console_Handler(srv interface{}, ctx context.Context
|
|||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
var DomainDevicesGraphics_ServiceDesc = grpc.ServiceDesc{
|
var DomainDevicesGraphics_ServiceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "deevirt.DomainDevicesGraphics",
|
ServiceName: "domain.DomainDevicesGraphics",
|
||||||
HandlerType: (*DomainDevicesGraphicsServer)(nil),
|
HandlerType: (*DomainDevicesGraphicsServer)(nil),
|
||||||
Methods: []grpc.MethodDesc{
|
Methods: []grpc.MethodDesc{
|
||||||
{
|
{
|
@ -23,7 +23,7 @@ var File_proto_network_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_proto_network_proto_rawDesc = []byte{
|
var file_proto_network_proto_rawDesc = []byte{
|
||||||
0x0a, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e,
|
0x0a, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x42, 0x09,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x09,
|
||||||
0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x33,
|
0x33,
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
syntax="proto3";
|
syntax="proto3";
|
||||||
|
|
||||||
option go_package = "./proto";
|
option go_package = "./proto";
|
||||||
package deevirt;
|
package network;
|
@ -23,7 +23,7 @@ var File_proto_storage_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_proto_storage_proto_rawDesc = []byte{
|
var file_proto_storage_proto_rawDesc = []byte{
|
||||||
0x0a, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
|
0x0a, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x42, 0x09,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x09,
|
||||||
0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x33,
|
0x33,
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
syntax="proto3";
|
syntax="proto3";
|
||||||
|
|
||||||
option go_package = "./proto";
|
option go_package = "./proto";
|
||||||
package deevirt;
|
package storage;
|
120
cmd/compute_mgr/main.go
Normal file
120
cmd/compute_mgr/main.go
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
"flag"
|
||||||
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"net"
|
||||||
|
"os"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
pb "deevirt.fr/compute/cmd/compute_mgr/proto"
|
||||||
|
"deevirt.fr/compute/cmd/compute_mgr/server/raft"
|
||||||
|
"google.golang.org/grpc"
|
||||||
|
"google.golang.org/grpc/reflection"
|
||||||
|
|
||||||
|
"github.com/prometheus/client_golang/api"
|
||||||
|
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
|
||||||
|
"github.com/prometheus/common/model"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
myAddr = flag.String("address", "localhost:60051", "TCP host+port for this node")
|
||||||
|
raftId = flag.String("raft_id", "", "Node id used by Raft")
|
||||||
|
)
|
||||||
|
|
||||||
|
type UP struct {
|
||||||
|
instance string
|
||||||
|
status string
|
||||||
|
}
|
||||||
|
|
||||||
|
func main0() {
|
||||||
|
client, err := api.NewClient(api.Config{
|
||||||
|
Address: "http://172.16.9.161:9090",
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("Error creating client: %v\n", err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
v1api := v1.NewAPI(client)
|
||||||
|
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
|
r := v1.Range{
|
||||||
|
Start: time.Now().Add(-time.Minute),
|
||||||
|
End: time.Now(),
|
||||||
|
Step: 2 * time.Minute,
|
||||||
|
}
|
||||||
|
result, warnings, err := v1api.QueryRange(ctx, "up{job='f242b4bb-b6d0-415f-b3f9-9e9d439532b5'}", r, v1.WithTimeout(5*time.Second))
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("Error querying Prometheus: %v\n", err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
if len(warnings) > 0 {
|
||||||
|
fmt.Printf("Warnings: %v\n", warnings)
|
||||||
|
}
|
||||||
|
//fmt.Printf("Result:\n%v\n", result)
|
||||||
|
|
||||||
|
// Convertir le résultat en Matrix
|
||||||
|
matrix, ok := result.(model.Matrix)
|
||||||
|
if !ok {
|
||||||
|
fmt.Println("Erreur : le résultat n'est pas de type Matrix")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, stream := range matrix {
|
||||||
|
var instance = ""
|
||||||
|
|
||||||
|
for key, value := range stream.Metric {
|
||||||
|
if key == "node_id" {
|
||||||
|
//test.instance = string(value)
|
||||||
|
instance = string(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
println(instance)
|
||||||
|
println(stream.Values[0].Value.String())
|
||||||
|
|
||||||
|
/*for _, pair := range stream.Values {
|
||||||
|
println(pair.Value.String())
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
flag.Parse()
|
||||||
|
|
||||||
|
if *raftId == "" {
|
||||||
|
log.Fatalf("flag --raft_id is required")
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx := context.Background()
|
||||||
|
_, port, err := net.SplitHostPort(*myAddr)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("failed to parse local address (%q): %v", *myAddr, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
sock, err := net.Listen("tcp", fmt.Sprintf(":%s", port))
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("failed to listen: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
r, tm, err := raft.NewRaft(ctx, *raftId, *myAddr)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("failed to start raft: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
s := grpc.NewServer()
|
||||||
|
pb.RegisterDomainServer(s, nil)
|
||||||
|
tm.Register(s)
|
||||||
|
//leaderhealth.Setup(r, s, []string{"Example"})
|
||||||
|
raft.Register(s, r)
|
||||||
|
reflection.Register(s)
|
||||||
|
if err := s.Serve(sock); err != nil {
|
||||||
|
log.Fatalf("failed to serve: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
1086
cmd/compute_mgr/proto/domain.pb.go
Normal file
1086
cmd/compute_mgr/proto/domain.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
90
cmd/compute_mgr/proto/domain.proto
Normal file
90
cmd/compute_mgr/proto/domain.proto
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
syntax="proto3";
|
||||||
|
|
||||||
|
option go_package = "./proto";
|
||||||
|
package domain;
|
||||||
|
|
||||||
|
// The greeting service definition.
|
||||||
|
service Domain {
|
||||||
|
rpc List (DomainListAllRequest) returns (DomainListAllResponse) {}
|
||||||
|
rpc Get (DomainListRequest) returns (DomainListResponse) {}
|
||||||
|
rpc Create (DomainCreateRequest) returns (DomainCreateResponse) {}
|
||||||
|
rpc Update (DomainUpdateRequest) returns (DomainUpdateResponse) {}
|
||||||
|
rpc Delete (DomainDeleteRequest) returns (DomainDeleteResponse) {}
|
||||||
|
|
||||||
|
rpc Power (DomainPowerRequest) returns (DomainPowerResponse) {}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message DomainListAllRequest {}
|
||||||
|
|
||||||
|
message DomainListAllResponse {
|
||||||
|
repeated DomainListResponse domains = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DomainListRequest {
|
||||||
|
string domain_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DomainListResponse {
|
||||||
|
string domain_id = 1;
|
||||||
|
string config = 2;
|
||||||
|
int64 state = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DomainCreateRequest {
|
||||||
|
string node_id = 1;
|
||||||
|
string config = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DomainCreateResponse {
|
||||||
|
int64 progress = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
service DomainDevicesGraphics {
|
||||||
|
rpc Console (DomainDevicesGraphicsConsoleRequest) returns (DomainDevicesGraphicsConsoleResponse) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
message DomainUpdateRequest {
|
||||||
|
string vm_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DomainUpdateResponse {
|
||||||
|
}
|
||||||
|
|
||||||
|
message DomainDeleteRequest {
|
||||||
|
string vm_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DomainDeleteResponse {
|
||||||
|
}
|
||||||
|
|
||||||
|
enum DomainPower {
|
||||||
|
UNDEFINED = 0;
|
||||||
|
START = 1;
|
||||||
|
REBOOT = 2;
|
||||||
|
SHUTDOWN = 3;
|
||||||
|
PAUSE = 4;
|
||||||
|
RESUME = 5;
|
||||||
|
RESET = 6;
|
||||||
|
DESTROY = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DomainPowerRequest {
|
||||||
|
bytes vm_id = 1;
|
||||||
|
DomainPower action = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DomainPowerResponse {
|
||||||
|
}
|
||||||
|
|
||||||
|
message DomainDevicesGraphicsConsoleRequest {
|
||||||
|
bytes vm_id = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message DomainDevicesGraphicsConsoleResponse {
|
||||||
|
string uri = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
417
cmd/compute_mgr/proto/domain_grpc.pb.go
Normal file
417
cmd/compute_mgr/proto/domain_grpc.pb.go
Normal file
@ -0,0 +1,417 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
|
// - protoc v3.14.0
|
||||||
|
// source: proto/domain.proto
|
||||||
|
|
||||||
|
package proto
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
codes "google.golang.org/grpc/codes"
|
||||||
|
status "google.golang.org/grpc/status"
|
||||||
|
)
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the grpc package it is being compiled against.
|
||||||
|
// Requires gRPC-Go v1.64.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
|
const (
|
||||||
|
Domain_List_FullMethodName = "/domain.Domain/List"
|
||||||
|
Domain_Get_FullMethodName = "/domain.Domain/Get"
|
||||||
|
Domain_Create_FullMethodName = "/domain.Domain/Create"
|
||||||
|
Domain_Update_FullMethodName = "/domain.Domain/Update"
|
||||||
|
Domain_Delete_FullMethodName = "/domain.Domain/Delete"
|
||||||
|
Domain_Power_FullMethodName = "/domain.Domain/Power"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DomainClient is the client API for Domain service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
//
|
||||||
|
// The greeting service definition.
|
||||||
|
type DomainClient interface {
|
||||||
|
List(ctx context.Context, in *DomainListAllRequest, opts ...grpc.CallOption) (*DomainListAllResponse, error)
|
||||||
|
Get(ctx context.Context, in *DomainListRequest, opts ...grpc.CallOption) (*DomainListResponse, error)
|
||||||
|
Create(ctx context.Context, in *DomainCreateRequest, opts ...grpc.CallOption) (*DomainCreateResponse, error)
|
||||||
|
Update(ctx context.Context, in *DomainUpdateRequest, opts ...grpc.CallOption) (*DomainUpdateResponse, error)
|
||||||
|
Delete(ctx context.Context, in *DomainDeleteRequest, opts ...grpc.CallOption) (*DomainDeleteResponse, error)
|
||||||
|
Power(ctx context.Context, in *DomainPowerRequest, opts ...grpc.CallOption) (*DomainPowerResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type domainClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewDomainClient(cc grpc.ClientConnInterface) DomainClient {
|
||||||
|
return &domainClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *domainClient) List(ctx context.Context, in *DomainListAllRequest, opts ...grpc.CallOption) (*DomainListAllResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(DomainListAllResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Domain_List_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *domainClient) Get(ctx context.Context, in *DomainListRequest, opts ...grpc.CallOption) (*DomainListResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(DomainListResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Domain_Get_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *domainClient) Create(ctx context.Context, in *DomainCreateRequest, opts ...grpc.CallOption) (*DomainCreateResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(DomainCreateResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Domain_Create_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *domainClient) Update(ctx context.Context, in *DomainUpdateRequest, opts ...grpc.CallOption) (*DomainUpdateResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(DomainUpdateResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Domain_Update_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *domainClient) Delete(ctx context.Context, in *DomainDeleteRequest, opts ...grpc.CallOption) (*DomainDeleteResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(DomainDeleteResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Domain_Delete_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *domainClient) Power(ctx context.Context, in *DomainPowerRequest, opts ...grpc.CallOption) (*DomainPowerResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(DomainPowerResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Domain_Power_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// DomainServer is the server API for Domain service.
|
||||||
|
// All implementations must embed UnimplementedDomainServer
|
||||||
|
// for forward compatibility.
|
||||||
|
//
|
||||||
|
// The greeting service definition.
|
||||||
|
type DomainServer interface {
|
||||||
|
List(context.Context, *DomainListAllRequest) (*DomainListAllResponse, error)
|
||||||
|
Get(context.Context, *DomainListRequest) (*DomainListResponse, error)
|
||||||
|
Create(context.Context, *DomainCreateRequest) (*DomainCreateResponse, error)
|
||||||
|
Update(context.Context, *DomainUpdateRequest) (*DomainUpdateResponse, error)
|
||||||
|
Delete(context.Context, *DomainDeleteRequest) (*DomainDeleteResponse, error)
|
||||||
|
Power(context.Context, *DomainPowerRequest) (*DomainPowerResponse, error)
|
||||||
|
mustEmbedUnimplementedDomainServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedDomainServer must be embedded to have
|
||||||
|
// forward compatible implementations.
|
||||||
|
//
|
||||||
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||||
|
// pointer dereference when methods are called.
|
||||||
|
type UnimplementedDomainServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedDomainServer) List(context.Context, *DomainListAllRequest) (*DomainListAllResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDomainServer) Get(context.Context, *DomainListRequest) (*DomainListResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDomainServer) Create(context.Context, *DomainCreateRequest) (*DomainCreateResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDomainServer) Update(context.Context, *DomainUpdateRequest) (*DomainUpdateResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDomainServer) Delete(context.Context, *DomainDeleteRequest) (*DomainDeleteResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDomainServer) Power(context.Context, *DomainPowerRequest) (*DomainPowerResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Power not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDomainServer) mustEmbedUnimplementedDomainServer() {}
|
||||||
|
func (UnimplementedDomainServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeDomainServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to DomainServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeDomainServer interface {
|
||||||
|
mustEmbedUnimplementedDomainServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterDomainServer(s grpc.ServiceRegistrar, srv DomainServer) {
|
||||||
|
// If the following call pancis, it indicates UnimplementedDomainServer was
|
||||||
|
// embedded by pointer and is nil. This will cause panics if an
|
||||||
|
// unimplemented method is ever invoked, so we test this at initialization
|
||||||
|
// time to prevent it from happening at runtime later due to I/O.
|
||||||
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||||
|
t.testEmbeddedByValue()
|
||||||
|
}
|
||||||
|
s.RegisterService(&Domain_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Domain_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DomainListAllRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DomainServer).List(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Domain_List_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DomainServer).List(ctx, req.(*DomainListAllRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Domain_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DomainListRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DomainServer).Get(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Domain_Get_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DomainServer).Get(ctx, req.(*DomainListRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Domain_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DomainCreateRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DomainServer).Create(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Domain_Create_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DomainServer).Create(ctx, req.(*DomainCreateRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Domain_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DomainUpdateRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DomainServer).Update(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Domain_Update_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DomainServer).Update(ctx, req.(*DomainUpdateRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Domain_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DomainDeleteRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DomainServer).Delete(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Domain_Delete_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DomainServer).Delete(ctx, req.(*DomainDeleteRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Domain_Power_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DomainPowerRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DomainServer).Power(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Domain_Power_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DomainServer).Power(ctx, req.(*DomainPowerRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Domain_ServiceDesc is the grpc.ServiceDesc for Domain service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var Domain_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "domain.Domain",
|
||||||
|
HandlerType: (*DomainServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "List",
|
||||||
|
Handler: _Domain_List_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Get",
|
||||||
|
Handler: _Domain_Get_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Create",
|
||||||
|
Handler: _Domain_Create_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Update",
|
||||||
|
Handler: _Domain_Update_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Delete",
|
||||||
|
Handler: _Domain_Delete_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Power",
|
||||||
|
Handler: _Domain_Power_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "proto/domain.proto",
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
DomainDevicesGraphics_Console_FullMethodName = "/domain.DomainDevicesGraphics/Console"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DomainDevicesGraphicsClient is the client API for DomainDevicesGraphics service.
|
||||||
|
//
|
||||||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||||
|
type DomainDevicesGraphicsClient interface {
|
||||||
|
Console(ctx context.Context, in *DomainDevicesGraphicsConsoleRequest, opts ...grpc.CallOption) (*DomainDevicesGraphicsConsoleResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type domainDevicesGraphicsClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewDomainDevicesGraphicsClient(cc grpc.ClientConnInterface) DomainDevicesGraphicsClient {
|
||||||
|
return &domainDevicesGraphicsClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *domainDevicesGraphicsClient) Console(ctx context.Context, in *DomainDevicesGraphicsConsoleRequest, opts ...grpc.CallOption) (*DomainDevicesGraphicsConsoleResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(DomainDevicesGraphicsConsoleResponse)
|
||||||
|
err := c.cc.Invoke(ctx, DomainDevicesGraphics_Console_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// DomainDevicesGraphicsServer is the server API for DomainDevicesGraphics service.
|
||||||
|
// All implementations must embed UnimplementedDomainDevicesGraphicsServer
|
||||||
|
// for forward compatibility.
|
||||||
|
type DomainDevicesGraphicsServer interface {
|
||||||
|
Console(context.Context, *DomainDevicesGraphicsConsoleRequest) (*DomainDevicesGraphicsConsoleResponse, error)
|
||||||
|
mustEmbedUnimplementedDomainDevicesGraphicsServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedDomainDevicesGraphicsServer must be embedded to have
|
||||||
|
// forward compatible implementations.
|
||||||
|
//
|
||||||
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||||
|
// pointer dereference when methods are called.
|
||||||
|
type UnimplementedDomainDevicesGraphicsServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedDomainDevicesGraphicsServer) Console(context.Context, *DomainDevicesGraphicsConsoleRequest) (*DomainDevicesGraphicsConsoleResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Console not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedDomainDevicesGraphicsServer) mustEmbedUnimplementedDomainDevicesGraphicsServer() {}
|
||||||
|
func (UnimplementedDomainDevicesGraphicsServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeDomainDevicesGraphicsServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to DomainDevicesGraphicsServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeDomainDevicesGraphicsServer interface {
|
||||||
|
mustEmbedUnimplementedDomainDevicesGraphicsServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterDomainDevicesGraphicsServer(s grpc.ServiceRegistrar, srv DomainDevicesGraphicsServer) {
|
||||||
|
// If the following call pancis, it indicates UnimplementedDomainDevicesGraphicsServer was
|
||||||
|
// embedded by pointer and is nil. This will cause panics if an
|
||||||
|
// unimplemented method is ever invoked, so we test this at initialization
|
||||||
|
// time to prevent it from happening at runtime later due to I/O.
|
||||||
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||||
|
t.testEmbeddedByValue()
|
||||||
|
}
|
||||||
|
s.RegisterService(&DomainDevicesGraphics_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _DomainDevicesGraphics_Console_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(DomainDevicesGraphicsConsoleRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(DomainDevicesGraphicsServer).Console(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: DomainDevicesGraphics_Console_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(DomainDevicesGraphicsServer).Console(ctx, req.(*DomainDevicesGraphicsConsoleRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// DomainDevicesGraphics_ServiceDesc is the grpc.ServiceDesc for DomainDevicesGraphics service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var DomainDevicesGraphics_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "domain.DomainDevicesGraphics",
|
||||||
|
HandlerType: (*DomainDevicesGraphicsServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "Console",
|
||||||
|
Handler: _DomainDevicesGraphics_Console_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "proto/domain.proto",
|
||||||
|
}
|
@ -1227,7 +1227,7 @@ type StateResponse struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
State StateResponse_State `protobuf:"varint,1,opt,name=state,proto3,enum=raft.StateResponse_State" json:"state,omitempty"`
|
State StateResponse_State `protobuf:"varint,1,opt,name=state,proto3,enum=StateResponse_State" json:"state,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *StateResponse) Reset() {
|
func (x *StateResponse) Reset() {
|
||||||
@ -1397,7 +1397,7 @@ type GetConfigurationResponse_Server struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Suffrage GetConfigurationResponse_Server_Suffrage `protobuf:"varint,1,opt,name=suffrage,proto3,enum=raft.GetConfigurationResponse_Server_Suffrage" json:"suffrage,omitempty"`
|
Suffrage GetConfigurationResponse_Server_Suffrage `protobuf:"varint,1,opt,name=suffrage,proto3,enum=GetConfigurationResponse_Server_Suffrage" json:"suffrage,omitempty"`
|
||||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||||
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
|
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
|
||||||
}
|
}
|
||||||
@ -1459,53 +1459,52 @@ var File_proto_raft_admin_proto protoreflect.FileDescriptor
|
|||||||
|
|
||||||
var file_proto_raft_admin_proto_rawDesc = []byte{
|
var file_proto_raft_admin_proto_rawDesc = []byte{
|
||||||
0x0a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x61, 0x66, 0x74, 0x5f, 0x61, 0x64, 0x6d,
|
0x0a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x61, 0x66, 0x74, 0x5f, 0x61, 0x64, 0x6d,
|
||||||
0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x72, 0x61, 0x66, 0x74, 0x22, 0x31,
|
0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x31, 0x0a, 0x06, 0x46, 0x75, 0x74, 0x75,
|
||||||
0x0a, 0x06, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x72,
|
0x72, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
|
||||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x70, 0x65,
|
||||||
0x09, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65,
|
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3b, 0x0a, 0x0d, 0x41,
|
||||||
0x6e, 0x22, 0x3b, 0x0a, 0x0d, 0x41, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05,
|
||||||
0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72,
|
||||||
0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65,
|
0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x10,
|
0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x10, 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x67,
|
||||||
0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x0f, 0x41, 0x64,
|
||||||
0x22, 0x62, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
0x64, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a,
|
||||||
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a,
|
||||||
0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02,
|
0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a,
|
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69,
|
||||||
0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18,
|
0x6f, 0x75, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
|
||||||
0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x49,
|
0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x65,
|
||||||
0x6e, 0x64, 0x65, 0x78, 0x22, 0x65, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x6e, 0x76, 0x6f,
|
0x0a, 0x12, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x6e, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||||
0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64,
|
0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
|
||||||
0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64,
|
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25,
|
||||||
0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73,
|
0x0a, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78,
|
||||||
0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x72,
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73,
|
||||||
0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x45, 0x0a, 0x0f, 0x41,
|
0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x45, 0x0a, 0x0f, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x6f,
|
||||||
0x70, 0x70, 0x6c, 0x79, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12,
|
0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||||
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a,
|
||||||
0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
|
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
|
0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x15, 0x0a, 0x13,
|
||||||
0x6e, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64,
|
0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x14, 0x41, 0x70, 0x70,
|
0x65, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x14, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e,
|
||||||
0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69,
|
||||||
0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
|
0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65,
|
||||||
0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x10, 0x0a, 0x0e, 0x42, 0x61, 0x72, 0x72, 0x69,
|
0x78, 0x22, 0x10, 0x0a, 0x0e, 0x42, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x12, 0x44, 0x65, 0x6d,
|
0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x12, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x74,
|
||||||
0x6f, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
|
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65,
|
||||||
0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65,
|
0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75,
|
0x04, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78,
|
||||||
0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e,
|
0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61,
|
||||||
0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x02, 0x0a, 0x18,
|
||||||
0x74, 0x22, 0x8e, 0x02, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75,
|
0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f,
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76,
|
||||||
0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x47, 0x65, 0x74, 0x43,
|
||||||
0x25, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e,
|
0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x07, 0x73, 0x65, 0x72,
|
||||||
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x1a,
|
0x76, 0x65, 0x72, 0x73, 0x1a, 0xab, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12,
|
||||||
0xb0, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x08, 0x73, 0x75,
|
0x45, 0x0a, 0x08, 0x73, 0x75, 0x66, 0x66, 0x72, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x66, 0x66, 0x72, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x72,
|
0x0e, 0x32, 0x29, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61,
|
||||||
0x61, 0x66, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61,
|
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x65, 0x72,
|
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x65, 0x72,
|
||||||
0x76, 0x65, 0x72, 0x2e, 0x53, 0x75, 0x66, 0x66, 0x72, 0x61, 0x67, 0x65, 0x52, 0x08, 0x73, 0x75,
|
0x76, 0x65, 0x72, 0x2e, 0x53, 0x75, 0x66, 0x66, 0x72, 0x61, 0x67, 0x65, 0x52, 0x08, 0x73, 0x75,
|
||||||
0x66, 0x66, 0x72, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
0x66, 0x66, 0x72, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||||
@ -1541,102 +1540,89 @@ var file_proto_raft_admin_proto_rawDesc = []byte{
|
|||||||
0x65, 0x78, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65,
|
0x65, 0x78, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f,
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f,
|
||||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74,
|
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74,
|
||||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61,
|
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7b, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74,
|
||||||
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x73, 0x74,
|
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x74, 0x61,
|
||||||
0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x72, 0x61, 0x66, 0x74,
|
0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65,
|
||||||
0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53,
|
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05,
|
||||||
0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3e, 0x0a, 0x05, 0x53,
|
0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0c,
|
||||||
0x74, 0x61, 0x74, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x52,
|
0x0a, 0x08, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x52, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09,
|
||||||
0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x10,
|
0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c,
|
||||||
0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0c, 0x0a,
|
0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x55, 0x54, 0x44,
|
||||||
0x08, 0x53, 0x48, 0x55, 0x54, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x22, 0x0e, 0x0a, 0x0c, 0x53,
|
0x4f, 0x57, 0x4e, 0x10, 0x03, 0x22, 0x0e, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65,
|
||||||
0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7f, 0x0a, 0x0d, 0x53,
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7a, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65,
|
||||||
0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x05,
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18,
|
||||||
0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61,
|
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73,
|
||||||
0x66, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||||
0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x74, 0x61,
|
0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x73,
|
||||||
0x74, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||||
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||||
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
||||||
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x15, 0x0a, 0x13,
|
0x01, 0x22, 0x15, 0x0a, 0x13, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4c, 0x65, 0x61, 0x64, 0x65,
|
||||||
0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0xe7, 0x07, 0x0a, 0x09, 0x52, 0x61, 0x66,
|
||||||
0x65, 0x73, 0x74, 0x32, 0xaf, 0x09, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x74, 0x41, 0x64, 0x6d, 0x69,
|
0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x2d, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x6e,
|
||||||
0x6e, 0x12, 0x37, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x6e, 0x76, 0x6f, 0x74, 0x65, 0x72,
|
0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x6e, 0x76, 0x6f,
|
||||||
0x12, 0x18, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x6e, 0x76, 0x6f,
|
0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74,
|
||||||
0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x72, 0x61, 0x66,
|
0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x27, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x56, 0x6f, 0x74, 0x65,
|
||||||
0x74, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x08, 0x41, 0x64,
|
0x72, 0x12, 0x10, 0x2e, 0x41, 0x64, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x64, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x41, 0x64,
|
0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x3d,
|
||||||
0x64, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e,
|
0x0a, 0x0c, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14,
|
||||||
0x72, 0x61, 0x66, 0x74, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a,
|
0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71,
|
||||||
0x0c, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x2e,
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e,
|
||||||
0x72, 0x61, 0x66, 0x74, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65,
|
0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x27, 0x0a,
|
||||||
0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e,
|
0x08, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x6f, 0x67, 0x12, 0x10, 0x2e, 0x41, 0x70, 0x70, 0x6c,
|
||||||
0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70,
|
0x79, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75,
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x08, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c,
|
0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x25, 0x0a, 0x07, 0x42, 0x61, 0x72, 0x72, 0x69, 0x65,
|
||||||
0x6f, 0x67, 0x12, 0x15, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c,
|
0x72, 0x12, 0x0f, 0x2e, 0x42, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x72, 0x61, 0x66, 0x74,
|
0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x2d, 0x0a,
|
||||||
0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x07, 0x42, 0x61, 0x72,
|
0x0b, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x44,
|
||||||
0x72, 0x69, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x42, 0x61, 0x72, 0x72,
|
0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x72, 0x61, 0x66,
|
0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x10,
|
||||||
0x74, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x0b, 0x44, 0x65,
|
0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x72, 0x61, 0x66, 0x74,
|
0x12, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74,
|
||||||
0x2e, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x47, 0x65, 0x74,
|
||||||
0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72,
|
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
|
||||||
0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, 0x4c, 0x61, 0x73, 0x74, 0x43,
|
||||||
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x47,
|
0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x13, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e,
|
||||||
0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x4c, 0x61,
|
||||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x47, 0x65,
|
0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
|
0x65, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x09, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78,
|
||||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0b, 0x4c, 0x61, 0x73, 0x74,
|
0x12, 0x11, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x18, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x4c,
|
0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52,
|
||||||
0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2b, 0x0a, 0x06, 0x4c, 0x65, 0x61,
|
||||||
0x74, 0x1a, 0x19, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e,
|
0x64, 0x65, 0x72, 0x12, 0x0e, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e,
|
0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x0a, 0x09, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x2e, 0x72, 0x61,
|
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x12, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||||
0x66, 0x74, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75,
|
0x73, 0x68, 0x69, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x4c,
|
||||||
0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x49,
|
0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65,
|
||||||
0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x35,
|
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72,
|
||||||
0x0a, 0x06, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e,
|
0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x1a, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69,
|
||||||
0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e,
|
0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65,
|
||||||
0x72, 0x61, 0x66, 0x74, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
0x72, 0x12, 0x22, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x54, 0x72,
|
||||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x12, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73,
|
0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65,
|
||||||
0x68, 0x69, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x72, 0x61,
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00,
|
||||||
0x66, 0x74, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x54, 0x72, 0x61,
|
0x12, 0x2f, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||||
0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x72,
|
0x12, 0x14, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52,
|
||||||
0x61, 0x66, 0x74, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x55, 0x0a, 0x1a,
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22,
|
||||||
0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66,
|
0x00, 0x12, 0x27, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x10, 0x2e,
|
||||||
0x65, 0x72, 0x54, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66,
|
0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||||
0x74, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x54, 0x72, 0x61, 0x6e,
|
0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x27, 0x0a, 0x08, 0x53, 0x6e,
|
||||||
0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x10, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f,
|
||||||
0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72,
|
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72,
|
||||||
0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72,
|
0x65, 0x22, 0x00, 0x12, 0x28, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x2e, 0x53,
|
||||||
0x76, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76,
|
0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x53, 0x74,
|
||||||
0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c,
|
0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x28, 0x0a,
|
||||||
0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x31,
|
0x05, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x0d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65,
|
||||||
0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x15, 0x2e, 0x72, 0x61, 0x66,
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73,
|
||||||
0x74, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x69, 0x66,
|
||||||
0x74, 0x1a, 0x0c, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22,
|
0x79, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79,
|
||||||
0x00, 0x12, 0x31, 0x0a, 0x08, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x15, 0x2e,
|
0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e,
|
||||||
0x72, 0x61, 0x66, 0x74, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71,
|
0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x22, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x69,
|
||||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x46, 0x75, 0x74, 0x75,
|
0x74, 0x12, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x0e, 0x2e, 0x41, 0x77, 0x61,
|
||||||
0x72, 0x65, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x2e,
|
0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x24, 0x0a, 0x06,
|
||||||
0x72, 0x61, 0x66, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x12, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x1a,
|
||||||
0x74, 0x1a, 0x13, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65,
|
0x0f, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74,
|
0x22, 0x00, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70,
|
||||||
0x73, 0x12, 0x12, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65,
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x53, 0x74, 0x61,
|
|
||||||
0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x0c,
|
|
||||||
0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x72,
|
|
||||||
0x61, 0x66, 0x74, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72,
|
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x46,
|
|
||||||
0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x2c, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x69, 0x74,
|
|
||||||
0x12, 0x0c, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x13,
|
|
||||||
0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x41, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
|
||||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x12,
|
|
||||||
0x0c, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x14, 0x2e,
|
|
||||||
0x72, 0x61, 0x66, 0x74, 0x2e, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
|
||||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
|
||||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -1654,84 +1640,84 @@ func file_proto_raft_admin_proto_rawDescGZIP() []byte {
|
|||||||
var file_proto_raft_admin_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
var file_proto_raft_admin_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||||
var file_proto_raft_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 30)
|
var file_proto_raft_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 30)
|
||||||
var file_proto_raft_admin_proto_goTypes = []interface{}{
|
var file_proto_raft_admin_proto_goTypes = []interface{}{
|
||||||
(GetConfigurationResponse_Server_Suffrage)(0), // 0: raft.GetConfigurationResponse.Server.Suffrage
|
(GetConfigurationResponse_Server_Suffrage)(0), // 0: GetConfigurationResponse.Server.Suffrage
|
||||||
(StateResponse_State)(0), // 1: raft.StateResponse.State
|
(StateResponse_State)(0), // 1: StateResponse.State
|
||||||
(*Future)(nil), // 2: raft.Future
|
(*Future)(nil), // 2: Future
|
||||||
(*AwaitResponse)(nil), // 3: raft.AwaitResponse
|
(*AwaitResponse)(nil), // 3: AwaitResponse
|
||||||
(*ForgetResponse)(nil), // 4: raft.ForgetResponse
|
(*ForgetResponse)(nil), // 4: ForgetResponse
|
||||||
(*AddVoterRequest)(nil), // 5: raft.AddVoterRequest
|
(*AddVoterRequest)(nil), // 5: AddVoterRequest
|
||||||
(*AddNonvoterRequest)(nil), // 6: raft.AddNonvoterRequest
|
(*AddNonvoterRequest)(nil), // 6: AddNonvoterRequest
|
||||||
(*ApplyLogRequest)(nil), // 7: raft.ApplyLogRequest
|
(*ApplyLogRequest)(nil), // 7: ApplyLogRequest
|
||||||
(*AppliedIndexRequest)(nil), // 8: raft.AppliedIndexRequest
|
(*AppliedIndexRequest)(nil), // 8: AppliedIndexRequest
|
||||||
(*AppliedIndexResponse)(nil), // 9: raft.AppliedIndexResponse
|
(*AppliedIndexResponse)(nil), // 9: AppliedIndexResponse
|
||||||
(*BarrierRequest)(nil), // 10: raft.BarrierRequest
|
(*BarrierRequest)(nil), // 10: BarrierRequest
|
||||||
(*DemoteVoterRequest)(nil), // 11: raft.DemoteVoterRequest
|
(*DemoteVoterRequest)(nil), // 11: DemoteVoterRequest
|
||||||
(*GetConfigurationRequest)(nil), // 12: raft.GetConfigurationRequest
|
(*GetConfigurationRequest)(nil), // 12: GetConfigurationRequest
|
||||||
(*GetConfigurationResponse)(nil), // 13: raft.GetConfigurationResponse
|
(*GetConfigurationResponse)(nil), // 13: GetConfigurationResponse
|
||||||
(*LastContactRequest)(nil), // 14: raft.LastContactRequest
|
(*LastContactRequest)(nil), // 14: LastContactRequest
|
||||||
(*LastContactResponse)(nil), // 15: raft.LastContactResponse
|
(*LastContactResponse)(nil), // 15: LastContactResponse
|
||||||
(*LastIndexRequest)(nil), // 16: raft.LastIndexRequest
|
(*LastIndexRequest)(nil), // 16: LastIndexRequest
|
||||||
(*LastIndexResponse)(nil), // 17: raft.LastIndexResponse
|
(*LastIndexResponse)(nil), // 17: LastIndexResponse
|
||||||
(*LeaderRequest)(nil), // 18: raft.LeaderRequest
|
(*LeaderRequest)(nil), // 18: LeaderRequest
|
||||||
(*LeaderResponse)(nil), // 19: raft.LeaderResponse
|
(*LeaderResponse)(nil), // 19: LeaderResponse
|
||||||
(*LeadershipTransferRequest)(nil), // 20: raft.LeadershipTransferRequest
|
(*LeadershipTransferRequest)(nil), // 20: LeadershipTransferRequest
|
||||||
(*LeadershipTransferToServerRequest)(nil), // 21: raft.LeadershipTransferToServerRequest
|
(*LeadershipTransferToServerRequest)(nil), // 21: LeadershipTransferToServerRequest
|
||||||
(*RemoveServerRequest)(nil), // 22: raft.RemoveServerRequest
|
(*RemoveServerRequest)(nil), // 22: RemoveServerRequest
|
||||||
(*ShutdownRequest)(nil), // 23: raft.ShutdownRequest
|
(*ShutdownRequest)(nil), // 23: ShutdownRequest
|
||||||
(*SnapshotRequest)(nil), // 24: raft.SnapshotRequest
|
(*SnapshotRequest)(nil), // 24: SnapshotRequest
|
||||||
(*StateRequest)(nil), // 25: raft.StateRequest
|
(*StateRequest)(nil), // 25: StateRequest
|
||||||
(*StateResponse)(nil), // 26: raft.StateResponse
|
(*StateResponse)(nil), // 26: StateResponse
|
||||||
(*StatsRequest)(nil), // 27: raft.StatsRequest
|
(*StatsRequest)(nil), // 27: StatsRequest
|
||||||
(*StatsResponse)(nil), // 28: raft.StatsResponse
|
(*StatsResponse)(nil), // 28: StatsResponse
|
||||||
(*VerifyLeaderRequest)(nil), // 29: raft.VerifyLeaderRequest
|
(*VerifyLeaderRequest)(nil), // 29: VerifyLeaderRequest
|
||||||
(*GetConfigurationResponse_Server)(nil), // 30: raft.GetConfigurationResponse.Server
|
(*GetConfigurationResponse_Server)(nil), // 30: GetConfigurationResponse.Server
|
||||||
nil, // 31: raft.StatsResponse.StatsEntry
|
nil, // 31: StatsResponse.StatsEntry
|
||||||
}
|
}
|
||||||
var file_proto_raft_admin_proto_depIdxs = []int32{
|
var file_proto_raft_admin_proto_depIdxs = []int32{
|
||||||
30, // 0: raft.GetConfigurationResponse.servers:type_name -> raft.GetConfigurationResponse.Server
|
30, // 0: GetConfigurationResponse.servers:type_name -> GetConfigurationResponse.Server
|
||||||
1, // 1: raft.StateResponse.state:type_name -> raft.StateResponse.State
|
1, // 1: StateResponse.state:type_name -> StateResponse.State
|
||||||
31, // 2: raft.StatsResponse.stats:type_name -> raft.StatsResponse.StatsEntry
|
31, // 2: StatsResponse.stats:type_name -> StatsResponse.StatsEntry
|
||||||
0, // 3: raft.GetConfigurationResponse.Server.suffrage:type_name -> raft.GetConfigurationResponse.Server.Suffrage
|
0, // 3: GetConfigurationResponse.Server.suffrage:type_name -> GetConfigurationResponse.Server.Suffrage
|
||||||
6, // 4: raft.RaftAdmin.AddNonvoter:input_type -> raft.AddNonvoterRequest
|
6, // 4: RaftAdmin.AddNonvoter:input_type -> AddNonvoterRequest
|
||||||
5, // 5: raft.RaftAdmin.AddVoter:input_type -> raft.AddVoterRequest
|
5, // 5: RaftAdmin.AddVoter:input_type -> AddVoterRequest
|
||||||
8, // 6: raft.RaftAdmin.AppliedIndex:input_type -> raft.AppliedIndexRequest
|
8, // 6: RaftAdmin.AppliedIndex:input_type -> AppliedIndexRequest
|
||||||
7, // 7: raft.RaftAdmin.ApplyLog:input_type -> raft.ApplyLogRequest
|
7, // 7: RaftAdmin.ApplyLog:input_type -> ApplyLogRequest
|
||||||
10, // 8: raft.RaftAdmin.Barrier:input_type -> raft.BarrierRequest
|
10, // 8: RaftAdmin.Barrier:input_type -> BarrierRequest
|
||||||
11, // 9: raft.RaftAdmin.DemoteVoter:input_type -> raft.DemoteVoterRequest
|
11, // 9: RaftAdmin.DemoteVoter:input_type -> DemoteVoterRequest
|
||||||
12, // 10: raft.RaftAdmin.GetConfiguration:input_type -> raft.GetConfigurationRequest
|
12, // 10: RaftAdmin.GetConfiguration:input_type -> GetConfigurationRequest
|
||||||
14, // 11: raft.RaftAdmin.LastContact:input_type -> raft.LastContactRequest
|
14, // 11: RaftAdmin.LastContact:input_type -> LastContactRequest
|
||||||
16, // 12: raft.RaftAdmin.LastIndex:input_type -> raft.LastIndexRequest
|
16, // 12: RaftAdmin.LastIndex:input_type -> LastIndexRequest
|
||||||
18, // 13: raft.RaftAdmin.Leader:input_type -> raft.LeaderRequest
|
18, // 13: RaftAdmin.Leader:input_type -> LeaderRequest
|
||||||
20, // 14: raft.RaftAdmin.LeadershipTransfer:input_type -> raft.LeadershipTransferRequest
|
20, // 14: RaftAdmin.LeadershipTransfer:input_type -> LeadershipTransferRequest
|
||||||
21, // 15: raft.RaftAdmin.LeadershipTransferToServer:input_type -> raft.LeadershipTransferToServerRequest
|
21, // 15: RaftAdmin.LeadershipTransferToServer:input_type -> LeadershipTransferToServerRequest
|
||||||
22, // 16: raft.RaftAdmin.RemoveServer:input_type -> raft.RemoveServerRequest
|
22, // 16: RaftAdmin.RemoveServer:input_type -> RemoveServerRequest
|
||||||
23, // 17: raft.RaftAdmin.Shutdown:input_type -> raft.ShutdownRequest
|
23, // 17: RaftAdmin.Shutdown:input_type -> ShutdownRequest
|
||||||
24, // 18: raft.RaftAdmin.Snapshot:input_type -> raft.SnapshotRequest
|
24, // 18: RaftAdmin.Snapshot:input_type -> SnapshotRequest
|
||||||
25, // 19: raft.RaftAdmin.State:input_type -> raft.StateRequest
|
25, // 19: RaftAdmin.State:input_type -> StateRequest
|
||||||
27, // 20: raft.RaftAdmin.Stats:input_type -> raft.StatsRequest
|
27, // 20: RaftAdmin.Stats:input_type -> StatsRequest
|
||||||
29, // 21: raft.RaftAdmin.VerifyLeader:input_type -> raft.VerifyLeaderRequest
|
29, // 21: RaftAdmin.VerifyLeader:input_type -> VerifyLeaderRequest
|
||||||
2, // 22: raft.RaftAdmin.Await:input_type -> raft.Future
|
2, // 22: RaftAdmin.Await:input_type -> Future
|
||||||
2, // 23: raft.RaftAdmin.Forget:input_type -> raft.Future
|
2, // 23: RaftAdmin.Forget:input_type -> Future
|
||||||
2, // 24: raft.RaftAdmin.AddNonvoter:output_type -> raft.Future
|
2, // 24: RaftAdmin.AddNonvoter:output_type -> Future
|
||||||
2, // 25: raft.RaftAdmin.AddVoter:output_type -> raft.Future
|
2, // 25: RaftAdmin.AddVoter:output_type -> Future
|
||||||
9, // 26: raft.RaftAdmin.AppliedIndex:output_type -> raft.AppliedIndexResponse
|
9, // 26: RaftAdmin.AppliedIndex:output_type -> AppliedIndexResponse
|
||||||
2, // 27: raft.RaftAdmin.ApplyLog:output_type -> raft.Future
|
2, // 27: RaftAdmin.ApplyLog:output_type -> Future
|
||||||
2, // 28: raft.RaftAdmin.Barrier:output_type -> raft.Future
|
2, // 28: RaftAdmin.Barrier:output_type -> Future
|
||||||
2, // 29: raft.RaftAdmin.DemoteVoter:output_type -> raft.Future
|
2, // 29: RaftAdmin.DemoteVoter:output_type -> Future
|
||||||
13, // 30: raft.RaftAdmin.GetConfiguration:output_type -> raft.GetConfigurationResponse
|
13, // 30: RaftAdmin.GetConfiguration:output_type -> GetConfigurationResponse
|
||||||
15, // 31: raft.RaftAdmin.LastContact:output_type -> raft.LastContactResponse
|
15, // 31: RaftAdmin.LastContact:output_type -> LastContactResponse
|
||||||
17, // 32: raft.RaftAdmin.LastIndex:output_type -> raft.LastIndexResponse
|
17, // 32: RaftAdmin.LastIndex:output_type -> LastIndexResponse
|
||||||
19, // 33: raft.RaftAdmin.Leader:output_type -> raft.LeaderResponse
|
19, // 33: RaftAdmin.Leader:output_type -> LeaderResponse
|
||||||
2, // 34: raft.RaftAdmin.LeadershipTransfer:output_type -> raft.Future
|
2, // 34: RaftAdmin.LeadershipTransfer:output_type -> Future
|
||||||
2, // 35: raft.RaftAdmin.LeadershipTransferToServer:output_type -> raft.Future
|
2, // 35: RaftAdmin.LeadershipTransferToServer:output_type -> Future
|
||||||
2, // 36: raft.RaftAdmin.RemoveServer:output_type -> raft.Future
|
2, // 36: RaftAdmin.RemoveServer:output_type -> Future
|
||||||
2, // 37: raft.RaftAdmin.Shutdown:output_type -> raft.Future
|
2, // 37: RaftAdmin.Shutdown:output_type -> Future
|
||||||
2, // 38: raft.RaftAdmin.Snapshot:output_type -> raft.Future
|
2, // 38: RaftAdmin.Snapshot:output_type -> Future
|
||||||
26, // 39: raft.RaftAdmin.State:output_type -> raft.StateResponse
|
26, // 39: RaftAdmin.State:output_type -> StateResponse
|
||||||
28, // 40: raft.RaftAdmin.Stats:output_type -> raft.StatsResponse
|
28, // 40: RaftAdmin.Stats:output_type -> StatsResponse
|
||||||
2, // 41: raft.RaftAdmin.VerifyLeader:output_type -> raft.Future
|
2, // 41: RaftAdmin.VerifyLeader:output_type -> Future
|
||||||
3, // 42: raft.RaftAdmin.Await:output_type -> raft.AwaitResponse
|
3, // 42: RaftAdmin.Await:output_type -> AwaitResponse
|
||||||
4, // 43: raft.RaftAdmin.Forget:output_type -> raft.ForgetResponse
|
4, // 43: RaftAdmin.Forget:output_type -> ForgetResponse
|
||||||
24, // [24:44] is the sub-list for method output_type
|
24, // [24:44] is the sub-list for method output_type
|
||||||
4, // [4:24] is the sub-list for method input_type
|
4, // [4:24] is the sub-list for method input_type
|
||||||
4, // [4:4] is the sub-list for extension type_name
|
4, // [4:4] is the sub-list for extension type_name
|
@ -1,7 +1,6 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
option go_package = "./proto";
|
option go_package = "./proto";
|
||||||
package raft;
|
|
||||||
|
|
||||||
service RaftAdmin {
|
service RaftAdmin {
|
||||||
rpc AddNonvoter(AddNonvoterRequest) returns (Future) {}
|
rpc AddNonvoter(AddNonvoterRequest) returns (Future) {}
|
@ -19,26 +19,26 @@ import (
|
|||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
const (
|
const (
|
||||||
RaftAdmin_AddNonvoter_FullMethodName = "/raft.RaftAdmin/AddNonvoter"
|
RaftAdmin_AddNonvoter_FullMethodName = "/RaftAdmin/AddNonvoter"
|
||||||
RaftAdmin_AddVoter_FullMethodName = "/raft.RaftAdmin/AddVoter"
|
RaftAdmin_AddVoter_FullMethodName = "/RaftAdmin/AddVoter"
|
||||||
RaftAdmin_AppliedIndex_FullMethodName = "/raft.RaftAdmin/AppliedIndex"
|
RaftAdmin_AppliedIndex_FullMethodName = "/RaftAdmin/AppliedIndex"
|
||||||
RaftAdmin_ApplyLog_FullMethodName = "/raft.RaftAdmin/ApplyLog"
|
RaftAdmin_ApplyLog_FullMethodName = "/RaftAdmin/ApplyLog"
|
||||||
RaftAdmin_Barrier_FullMethodName = "/raft.RaftAdmin/Barrier"
|
RaftAdmin_Barrier_FullMethodName = "/RaftAdmin/Barrier"
|
||||||
RaftAdmin_DemoteVoter_FullMethodName = "/raft.RaftAdmin/DemoteVoter"
|
RaftAdmin_DemoteVoter_FullMethodName = "/RaftAdmin/DemoteVoter"
|
||||||
RaftAdmin_GetConfiguration_FullMethodName = "/raft.RaftAdmin/GetConfiguration"
|
RaftAdmin_GetConfiguration_FullMethodName = "/RaftAdmin/GetConfiguration"
|
||||||
RaftAdmin_LastContact_FullMethodName = "/raft.RaftAdmin/LastContact"
|
RaftAdmin_LastContact_FullMethodName = "/RaftAdmin/LastContact"
|
||||||
RaftAdmin_LastIndex_FullMethodName = "/raft.RaftAdmin/LastIndex"
|
RaftAdmin_LastIndex_FullMethodName = "/RaftAdmin/LastIndex"
|
||||||
RaftAdmin_Leader_FullMethodName = "/raft.RaftAdmin/Leader"
|
RaftAdmin_Leader_FullMethodName = "/RaftAdmin/Leader"
|
||||||
RaftAdmin_LeadershipTransfer_FullMethodName = "/raft.RaftAdmin/LeadershipTransfer"
|
RaftAdmin_LeadershipTransfer_FullMethodName = "/RaftAdmin/LeadershipTransfer"
|
||||||
RaftAdmin_LeadershipTransferToServer_FullMethodName = "/raft.RaftAdmin/LeadershipTransferToServer"
|
RaftAdmin_LeadershipTransferToServer_FullMethodName = "/RaftAdmin/LeadershipTransferToServer"
|
||||||
RaftAdmin_RemoveServer_FullMethodName = "/raft.RaftAdmin/RemoveServer"
|
RaftAdmin_RemoveServer_FullMethodName = "/RaftAdmin/RemoveServer"
|
||||||
RaftAdmin_Shutdown_FullMethodName = "/raft.RaftAdmin/Shutdown"
|
RaftAdmin_Shutdown_FullMethodName = "/RaftAdmin/Shutdown"
|
||||||
RaftAdmin_Snapshot_FullMethodName = "/raft.RaftAdmin/Snapshot"
|
RaftAdmin_Snapshot_FullMethodName = "/RaftAdmin/Snapshot"
|
||||||
RaftAdmin_State_FullMethodName = "/raft.RaftAdmin/State"
|
RaftAdmin_State_FullMethodName = "/RaftAdmin/State"
|
||||||
RaftAdmin_Stats_FullMethodName = "/raft.RaftAdmin/Stats"
|
RaftAdmin_Stats_FullMethodName = "/RaftAdmin/Stats"
|
||||||
RaftAdmin_VerifyLeader_FullMethodName = "/raft.RaftAdmin/VerifyLeader"
|
RaftAdmin_VerifyLeader_FullMethodName = "/RaftAdmin/VerifyLeader"
|
||||||
RaftAdmin_Await_FullMethodName = "/raft.RaftAdmin/Await"
|
RaftAdmin_Await_FullMethodName = "/RaftAdmin/Await"
|
||||||
RaftAdmin_Forget_FullMethodName = "/raft.RaftAdmin/Forget"
|
RaftAdmin_Forget_FullMethodName = "/RaftAdmin/Forget"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RaftAdminClient is the client API for RaftAdmin service.
|
// RaftAdminClient is the client API for RaftAdmin service.
|
||||||
@ -754,7 +754,7 @@ func _RaftAdmin_Forget_Handler(srv interface{}, ctx context.Context, dec func(in
|
|||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
var RaftAdmin_ServiceDesc = grpc.ServiceDesc{
|
var RaftAdmin_ServiceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "raft.RaftAdmin",
|
ServiceName: "RaftAdmin",
|
||||||
HandlerType: (*RaftAdminServer)(nil),
|
HandlerType: (*RaftAdminServer)(nil),
|
||||||
Methods: []grpc.MethodDesc{
|
Methods: []grpc.MethodDesc{
|
||||||
{
|
{
|
1
cmd/compute_mgr/server/application.go
Normal file
1
cmd/compute_mgr/server/application.go
Normal file
@ -0,0 +1 @@
|
|||||||
|
package server
|
@ -8,7 +8,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
pb "deevirt.fr/compute/pkg/api/proto"
|
pb "deevirt.fr/compute/cmd/compute_mgr/proto"
|
||||||
"github.com/hashicorp/raft"
|
"github.com/hashicorp/raft"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
)
|
)
|
@ -2,19 +2,23 @@ package raft
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"deevirt.fr/compute/pkg/scheduler"
|
||||||
transport "github.com/Jille/raft-grpc-transport"
|
transport "github.com/Jille/raft-grpc-transport"
|
||||||
"github.com/hashicorp/raft"
|
"github.com/hashicorp/raft"
|
||||||
raftboltdb "github.com/hashicorp/raft-boltdb"
|
raftboltdb "github.com/hashicorp/raft-boltdb"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
)
|
||||||
|
|
||||||
"deevirt.fr/compute/pkg/config"
|
var (
|
||||||
etcd_client "deevirt.fr/compute/pkg/etcd"
|
raftDir = flag.String("raft_data_dir", "data/", "Raft data dir")
|
||||||
"deevirt.fr/compute/pkg/scheduler"
|
raftBootstrap = flag.Bool("raft_bootstrap", false, "Whether to bootstrap the Raft cluster")
|
||||||
)
|
)
|
||||||
|
|
||||||
type RaftNode struct {
|
type RaftNode struct {
|
||||||
@ -24,53 +28,47 @@ type RaftNode struct {
|
|||||||
scheduler *scheduler.Scheduler
|
scheduler *scheduler.Scheduler
|
||||||
}
|
}
|
||||||
|
|
||||||
type Peers struct {
|
type Worker struct {
|
||||||
Id string
|
ctx context.Context
|
||||||
Address string
|
cancel context.CancelFunc
|
||||||
|
cancelled bool // Variable pour suivre si cancel a été appelé
|
||||||
}
|
}
|
||||||
|
|
||||||
func New(ctx context.Context, port int) (*raft.Raft, *transport.Manager, error) {
|
// Vérifie si l'état Raft existe déjà
|
||||||
// Récupération de la configuration deevirt
|
func checkIfStateExists(logStore *raftboltdb.BoltStore, snapshotStore raft.SnapshotStore) (bool, error) {
|
||||||
conf, err := config.New()
|
// Vérifier les snapshots
|
||||||
|
snapshots, err := snapshotStore.List()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return false, err
|
||||||
|
}
|
||||||
|
if len(snapshots) > 0 {
|
||||||
|
return true, nil // Il y a déjà un snapshot, donc un état Raft
|
||||||
}
|
}
|
||||||
|
|
||||||
// Création du répertoire
|
// Vérifier les logs Raft
|
||||||
baseDir := filepath.Join("/var/lib/deevirt/mgr/", conf.NodeID)
|
firstIndex, err := logStore.FirstIndex()
|
||||||
err = os.MkdirAll(baseDir, 0740)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return false, err
|
||||||
}
|
}
|
||||||
|
lastIndex, err := logStore.LastIndex()
|
||||||
// Récupération des Noeuds ID
|
|
||||||
etcd, err := etcd_client.New(conf.EtcdURI)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return false, err
|
||||||
}
|
}
|
||||||
defer etcd.Close()
|
|
||||||
|
|
||||||
peers := []raft.Server{}
|
return lastIndex > firstIndex, nil
|
||||||
|
}
|
||||||
|
|
||||||
for key, value := range etcd_client.GetNodes(etcd, conf.ClusterID) {
|
func NewRaft(ctx context.Context, myID, myAddress string) (*raft.Raft, *transport.Manager, error) {
|
||||||
var p string
|
|
||||||
|
|
||||||
for _, peer := range conf.Manager.Peers {
|
|
||||||
if peer == value.IpManagement {
|
|
||||||
p = peer
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if p != "" {
|
|
||||||
peers = append(peers, raft.Server{
|
|
||||||
ID: raft.ServerID(key),
|
|
||||||
Address: raft.ServerAddress(fmt.Sprintf("%s:%d", p, port)),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
c := raft.DefaultConfig()
|
c := raft.DefaultConfig()
|
||||||
c.LocalID = raft.ServerID(conf.NodeID)
|
c.LocalID = raft.ServerID(myID)
|
||||||
|
|
||||||
|
/*addr, err := net.ResolveTCPAddr("tcp", myAddress)
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
|
}*/
|
||||||
|
|
||||||
|
baseDir := filepath.Join(*raftDir, myID)
|
||||||
|
|
||||||
ldb, err := raftboltdb.NewBoltStore(filepath.Join(baseDir, "logs.dat"))
|
ldb, err := raftboltdb.NewBoltStore(filepath.Join(baseDir, "logs.dat"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -87,7 +85,12 @@ func New(ctx context.Context, port int) (*raft.Raft, *transport.Manager, error)
|
|||||||
return nil, nil, fmt.Errorf(`raft.NewFileSnapshotStore(%q, ...): %v`, baseDir, err)
|
return nil, nil, fmt.Errorf(`raft.NewFileSnapshotStore(%q, ...): %v`, baseDir, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
tm := transport.New(raft.ServerAddress(fmt.Sprintf("%s:%d", conf.AddressPrivate, port)), []grpc.DialOption{grpc.WithInsecure()})
|
/*transport, err := raft.NewTCPTransport(myAddress, addr, 3, 10*time.Second, os.Stderr)
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, fmt.Errorf("transport: %v", err)
|
||||||
|
}*/
|
||||||
|
|
||||||
|
tm := transport.New(raft.ServerAddress(myAddress), []grpc.DialOption{grpc.WithInsecure()})
|
||||||
|
|
||||||
r, err := raft.NewRaft(c, nil, ldb, sdb, fss, tm.Transport())
|
r, err := raft.NewRaft(c, nil, ldb, sdb, fss, tm.Transport())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -105,20 +108,34 @@ func New(ctx context.Context, port int) (*raft.Raft, *transport.Manager, error)
|
|||||||
|
|
||||||
node := &RaftNode{
|
node := &RaftNode{
|
||||||
Raft: r,
|
Raft: r,
|
||||||
NodeID: conf.NodeID,
|
NodeID: myID,
|
||||||
StateCh: stateCh,
|
StateCh: stateCh,
|
||||||
scheduler: s,
|
scheduler: s,
|
||||||
}
|
}
|
||||||
|
|
||||||
go node.watchStateChanges()
|
go node.watchStateChanges()
|
||||||
|
|
||||||
hasState, _ := checkIfStateExists(ldb)
|
// 🔍 Vérification si des logs ou snapshots existent
|
||||||
|
hasState, _ := checkIfStateExists(ldb, fss)
|
||||||
|
|
||||||
if conf.Manager.Peers[0] == conf.AddressPrivate && !hasState {
|
println(myAddress)
|
||||||
println("Démarrage du bootstrap ! ")
|
|
||||||
|
|
||||||
|
if *raftBootstrap && !hasState {
|
||||||
cfg := raft.Configuration{
|
cfg := raft.Configuration{
|
||||||
Servers: peers,
|
Servers: []raft.Server{
|
||||||
|
{
|
||||||
|
ID: raft.ServerID(myID),
|
||||||
|
Address: raft.ServerAddress(myAddress),
|
||||||
|
},
|
||||||
|
/*{
|
||||||
|
ID: raft.ServerID("nodeB"),
|
||||||
|
Address: raft.ServerAddress("localhost:50053"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ID: raft.ServerID("nodeC"),
|
||||||
|
Address: raft.ServerAddress("localhost:50054"),
|
||||||
|
},*/
|
||||||
|
},
|
||||||
}
|
}
|
||||||
f := r.BootstrapCluster(cfg)
|
f := r.BootstrapCluster(cfg)
|
||||||
if err := f.Error(); err != nil {
|
if err := f.Error(); err != nil {
|
||||||
@ -129,19 +146,32 @@ func New(ctx context.Context, port int) (*raft.Raft, *transport.Manager, error)
|
|||||||
return r, tm, nil
|
return r, tm, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vérifie si l'état Raft existe déjà
|
func (w *Worker) Start() {
|
||||||
func checkIfStateExists(logStore *raftboltdb.BoltStore) (bool, error) {
|
go func() {
|
||||||
// Vérifier les logs Raft
|
for {
|
||||||
firstIndex, err := logStore.FirstIndex()
|
select {
|
||||||
if err != nil {
|
case <-w.ctx.Done():
|
||||||
return false, err
|
fmt.Println("🛑 Worker arrêté !")
|
||||||
}
|
return
|
||||||
|
default:
|
||||||
|
fmt.Println("🔄 Worker en cours...")
|
||||||
|
time.Sleep(1 * time.Second)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
}
|
||||||
|
|
||||||
if firstIndex > 0 {
|
func (w *Worker) Stop() {
|
||||||
return true, nil
|
if !w.cancelled {
|
||||||
|
w.cancel() // Annuler le contexte
|
||||||
|
w.cancelled = true // Marquer comme annulé
|
||||||
|
} else {
|
||||||
|
fmt.Println("❗ Cancel déjà appelé, Worker déjà arrêté.")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false, nil
|
func (w *Worker) IsCancelled() bool {
|
||||||
|
return w.cancelled
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fonction pour surveiller et afficher les changements d'état
|
// Fonction pour surveiller et afficher les changements d'état
|
@ -36,7 +36,7 @@ func MigrationIteration(c *libvirt.Connect, d *libvirt.Domain, e *libvirt.Domain
|
|||||||
|
|
||||||
func Lifecyle(c *libvirt.Connect, d *libvirt.Domain, e *libvirt.DomainEventLifecycle) {
|
func Lifecyle(c *libvirt.Connect, d *libvirt.Domain, e *libvirt.DomainEventLifecycle) {
|
||||||
var detail, event string
|
var detail, event string
|
||||||
config, _ := config.New()
|
config, _ := config.NewConfig()
|
||||||
domainID, _ := d.GetUUIDString()
|
domainID, _ := d.GetUUIDString()
|
||||||
|
|
||||||
etcd, err := clientv3.New(clientv3.Config{
|
etcd, err := clientv3.New(clientv3.Config{
|
||||||
|
@ -231,7 +231,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func CollectDomain(ch chan<- prometheus.Metric, stat libvirt.DomainStats, hostname string) error {
|
func CollectDomain(ch chan<- prometheus.Metric, stat libvirt.DomainStats, hostname string) error {
|
||||||
config, err := config.New()
|
config, err := config.NewConfig()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
}
|
}
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"deevirt.fr/compute/pkg/api"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
api.Server()
|
|
||||||
}
|
|
@ -25,7 +25,7 @@ type Client struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewAMQP() (*Client, error) {
|
func NewAMQP() (*Client, error) {
|
||||||
config, _ := config.New()
|
config, _ := config.NewConfig()
|
||||||
|
|
||||||
amqp_config := amqp091.Config{
|
amqp_config := amqp091.Config{
|
||||||
Properties: amqp091.NewConnectionProperties(),
|
Properties: amqp091.NewConnectionProperties(),
|
||||||
|
@ -1,93 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"regexp"
|
|
||||||
"strconv"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"deevirt.fr/compute/pkg/api/proto"
|
|
||||||
"deevirt.fr/compute/pkg/config"
|
|
||||||
clientv3 "go.etcd.io/etcd/client/v3"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Domain struct {
|
|
||||||
Config *config.Config
|
|
||||||
Etcd *clientv3.Client
|
|
||||||
proto.UnimplementedDomainServer
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *Domain) List(ctx context.Context, in *proto.DomainListAllRequest) (*proto.DomainListAllResponse, error) {
|
|
||||||
var domains = []*proto.DomainListResponse{}
|
|
||||||
|
|
||||||
ctx_etcd, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
|
||||||
resp, _ := d.Etcd.Get(ctx_etcd, "/cluster/"+d.Config.ClusterID+"/domain", clientv3.WithPrefix(), clientv3.WithKeysOnly())
|
|
||||||
cancel()
|
|
||||||
|
|
||||||
re := regexp.MustCompile(`domain/(?P<domainID>[a-zA-Z1-9-]+)$`)
|
|
||||||
|
|
||||||
for _, data := range resp.Kvs {
|
|
||||||
key := string(data.Key[:])
|
|
||||||
|
|
||||||
if re.MatchString(key) {
|
|
||||||
matches := re.FindStringSubmatch(key)
|
|
||||||
index := re.SubexpIndex("domainID")
|
|
||||||
|
|
||||||
domain, _ := d.Get(context.Background(), &proto.DomainListRequest{
|
|
||||||
DomainId: matches[index],
|
|
||||||
})
|
|
||||||
|
|
||||||
domains = append(domains, domain)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return &proto.DomainListAllResponse{
|
|
||||||
Domains: domains,
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *Domain) Get(ctx context.Context, in *proto.DomainListRequest) (*proto.DomainListResponse, error) {
|
|
||||||
ctx_etcd, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
|
||||||
resp_config, _ := d.Etcd.Get(ctx_etcd, "/cluster/"+d.Config.ClusterID+"/domain/"+in.DomainId)
|
|
||||||
resp_state, _ := d.Etcd.Get(ctx_etcd, "/cluster/"+d.Config.ClusterID+"/domain/"+in.DomainId+"/state")
|
|
||||||
cancel()
|
|
||||||
|
|
||||||
state, _ := strconv.ParseInt(string(resp_state.Kvs[0].Value), 10, 64)
|
|
||||||
|
|
||||||
return &proto.DomainListResponse{
|
|
||||||
DomainId: in.DomainId,
|
|
||||||
Config: string(resp_config.Kvs[0].Value),
|
|
||||||
State: state,
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *Domain) Create(ctx context.Context, in *proto.DomainCreateRequest) (*proto.DomainCreateResponse, error) {
|
|
||||||
ctx_etcd, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
|
||||||
resp_config, _ := d.Etcd.Get(ctx_etcd, "/cluster/"+d.Config.ClusterID)
|
|
||||||
cancel()
|
|
||||||
|
|
||||||
println(string(resp_config.Kvs[0].Value))
|
|
||||||
|
|
||||||
/*if d.Config.LibvirtTLS {
|
|
||||||
libvirt_uri := "qemu+tls://"++"/system"
|
|
||||||
}
|
|
||||||
conn, err := libvirt.NewConnect("qemu:///system")
|
|
||||||
if err != nil {
|
|
||||||
log.Println("Connexion Error")
|
|
||||||
}
|
|
||||||
defer conn.Close()*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
async def Create(self, request, context):
|
|
||||||
yield domain_pb2.DomainCreateResponse(progress=40)
|
|
||||||
async with Libvirt() as libvirt:
|
|
||||||
if await libvirt.define(request.config.decode()):
|
|
||||||
yield domain_pb2.DomainCreateResponse(progress=100)
|
|
||||||
else:
|
|
||||||
context.set_code(grpc.StatusCode.ALREADY_EXISTS)
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
return &proto.DomainCreateResponse{}, nil
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
package api
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
"log"
|
|
||||||
"net"
|
|
||||||
|
|
||||||
"google.golang.org/grpc"
|
|
||||||
"google.golang.org/grpc/reflection"
|
|
||||||
|
|
||||||
pb "deevirt.fr/compute/pkg/api/proto"
|
|
||||||
"deevirt.fr/compute/pkg/raft"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Server() {
|
|
||||||
ctx := context.Background()
|
|
||||||
|
|
||||||
sock, err := net.Listen("tcp", fmt.Sprintf(":%d", 4480))
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("failed to listen: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
r, tm, err := raft.New(ctx, 4480)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("failed to start raft: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
s := grpc.NewServer()
|
|
||||||
pb.RegisterDomainServer(s, nil)
|
|
||||||
tm.Register(s)
|
|
||||||
//leaderhealth.Setup(r, s, []string{"Example"})
|
|
||||||
raft.Register(s, r)
|
|
||||||
reflection.Register(s)
|
|
||||||
if err := s.Serve(sock); err != nil {
|
|
||||||
log.Fatalf("failed to serve: %v", err)
|
|
||||||
}
|
|
||||||
}
|
|
@ -4,32 +4,20 @@ import (
|
|||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/denisbrodbeck/machineid"
|
"github.com/denisbrodbeck/machineid"
|
||||||
"gopkg.in/ini.v1"
|
"gopkg.in/ini.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
ClusterID string
|
ClusterID string
|
||||||
AddressPublic string
|
NodeID string
|
||||||
AddressPrivate string
|
|
||||||
NodeID string
|
|
||||||
|
|
||||||
Manager Manager
|
|
||||||
AmqpURI string
|
AmqpURI string
|
||||||
EtcdURI string
|
EtcdURI string
|
||||||
LibvirtTLS bool
|
LibvirtTLS bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type Manager struct {
|
func NewConfig() (*Config, error) {
|
||||||
Peers []string
|
|
||||||
TlsKey string
|
|
||||||
TlsCert string
|
|
||||||
TlsCA string
|
|
||||||
}
|
|
||||||
|
|
||||||
func New() (*Config, error) {
|
|
||||||
c, err := ini.Load("/etc/deevirt/config.ini")
|
c, err := ini.Load("/etc/deevirt/config.ini")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
@ -43,20 +31,9 @@ func New() (*Config, error) {
|
|||||||
mID, _ := hex.DecodeString(id)
|
mID, _ := hex.DecodeString(id)
|
||||||
libvirtTLS, _ := c.Section("libvirt").Key("tls").Bool()
|
libvirtTLS, _ := c.Section("libvirt").Key("tls").Bool()
|
||||||
|
|
||||||
//Manager
|
|
||||||
peers := strings.Split(c.Section("mgr").Key("peers").String(), ",")
|
|
||||||
|
|
||||||
manager := &Manager{
|
|
||||||
Peers: peers,
|
|
||||||
}
|
|
||||||
|
|
||||||
return &Config{
|
return &Config{
|
||||||
ClusterID: c.Section("").Key("id_cluster").String(),
|
ClusterID: c.Section("").Key("id").String(),
|
||||||
AddressPublic: c.Section("").Key("ip_public").String(),
|
NodeID: fmt.Sprintf("%x-%x-%x-%x-%x", mID[:4], mID[4:6], mID[6:8], mID[8:10], mID[10:]),
|
||||||
AddressPrivate: c.Section("").Key("ip_private").String(),
|
|
||||||
NodeID: fmt.Sprintf("%x-%x-%x-%x-%x", mID[:4], mID[4:6], mID[6:8], mID[8:10], mID[10:]),
|
|
||||||
|
|
||||||
Manager: *manager,
|
|
||||||
AmqpURI: c.Section("broker").Key("uri").String(),
|
AmqpURI: c.Section("broker").Key("uri").String(),
|
||||||
EtcdURI: c.Section("etcd").Key("uri").String(),
|
EtcdURI: c.Section("etcd").Key("uri").String(),
|
||||||
LibvirtTLS: libvirtTLS,
|
LibvirtTLS: libvirtTLS,
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
package etcd
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"encoding/json"
|
|
||||||
"log"
|
|
||||||
"strings"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
clientv3 "go.etcd.io/etcd/client/v3"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Node struct {
|
|
||||||
IpManagement string `json:"ip_mgmt"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func New(uri string) (*clientv3.Client, error) {
|
|
||||||
etcd, err := clientv3.New(clientv3.Config{
|
|
||||||
Endpoints: strings.Split(uri, ","),
|
|
||||||
DialTimeout: 5 * time.Second,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("Error connexion to etcd: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return etcd, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetNodes(c *clientv3.Client, cluster_id string) map[string]Node {
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
|
||||||
defer cancel()
|
|
||||||
|
|
||||||
resp, _ := c.Get(ctx, "/cluster/"+cluster_id)
|
|
||||||
|
|
||||||
var nodes map[string]Node
|
|
||||||
|
|
||||||
err := json.Unmarshal(resp.Kvs[0].Value, &nodes)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal("Erreur lors du parsing du JSON: ", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return nodes
|
|
||||||
}
|
|
@ -1,41 +0,0 @@
|
|||||||
package raft
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Worker struct {
|
|
||||||
ctx context.Context
|
|
||||||
cancel context.CancelFunc
|
|
||||||
cancelled bool // Variable pour suivre si cancel a été appelé
|
|
||||||
}
|
|
||||||
|
|
||||||
func (w *Worker) Start() {
|
|
||||||
go func() {
|
|
||||||
for {
|
|
||||||
select {
|
|
||||||
case <-w.ctx.Done():
|
|
||||||
fmt.Println("🛑 Worker arrêté !")
|
|
||||||
return
|
|
||||||
default:
|
|
||||||
fmt.Println("🔄 Worker en cours...")
|
|
||||||
time.Sleep(1 * time.Second)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (w *Worker) Stop() {
|
|
||||||
if !w.cancelled {
|
|
||||||
w.cancel() // Annuler le contexte
|
|
||||||
w.cancelled = true // Marquer comme annulé
|
|
||||||
} else {
|
|
||||||
fmt.Println("❗ Cancel déjà appelé, Worker déjà arrêté.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (w *Worker) IsCancelled() bool {
|
|
||||||
return w.cancelled
|
|
||||||
}
|
|
@ -22,7 +22,7 @@ type Scheduler struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func New() (*Scheduler, error) {
|
func New() (*Scheduler, error) {
|
||||||
config, _ := config.New()
|
config, _ := config.NewConfig()
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
|
|
||||||
logger, _ := zap.NewProduction()
|
logger, _ := zap.NewProduction()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user