Compare commits
3 Commits
5bd2bf3b86
...
0d996b202e
Author | SHA1 | Date | |
---|---|---|---|
0d996b202e | |||
e6c07d9a0a | |||
861f53b6c9 |
@ -6,7 +6,7 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"deevirt.fr/compute/cmd/compute_api/proto"
|
||||
"deevirt.fr/compute/pkg/api/proto"
|
||||
"deevirt.fr/compute/pkg/config"
|
||||
clientv3 "go.etcd.io/etcd/client/v3"
|
||||
)
|
||||
|
@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"deevirt.fr/compute/cmd/compute_api/proto"
|
||||
"deevirt.fr/compute/pkg/api/proto"
|
||||
"deevirt.fr/compute/pkg/config"
|
||||
clientv3 "go.etcd.io/etcd/client/v3"
|
||||
"google.golang.org/grpc"
|
||||
@ -14,7 +14,7 @@ import (
|
||||
)
|
||||
|
||||
func Server() {
|
||||
config, _ := config.NewConfig()
|
||||
config, _ := config.New()
|
||||
|
||||
//listen on the port
|
||||
lis, err := net.Listen("tcp", ":8080")
|
||||
|
@ -1,90 +0,0 @@
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -1,417 +0,0 @@
|
||||
// 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",
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
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)
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
package server
|
@ -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) {
|
||||
var detail, event string
|
||||
config, _ := config.NewConfig()
|
||||
config, _ := config.New()
|
||||
domainID, _ := d.GetUUIDString()
|
||||
|
||||
etcd, err := clientv3.New(clientv3.Config{
|
||||
|
@ -231,7 +231,7 @@ var (
|
||||
)
|
||||
|
||||
func CollectDomain(ch chan<- prometheus.Metric, stat libvirt.DomainStats, hostname string) error {
|
||||
config, err := config.NewConfig()
|
||||
config, err := config.New()
|
||||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
9
cmd/mgr/main.go
Normal file
9
cmd/mgr/main.go
Normal file
@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"deevirt.fr/compute/pkg/api"
|
||||
)
|
||||
|
||||
func main() {
|
||||
api.Server()
|
||||
}
|
@ -25,7 +25,7 @@ type Client struct {
|
||||
}
|
||||
|
||||
func NewAMQP() (*Client, error) {
|
||||
config, _ := config.NewConfig()
|
||||
config, _ := config.New()
|
||||
|
||||
amqp_config := amqp091.Config{
|
||||
Properties: amqp091.NewConnectionProperties(),
|
||||
|
93
pkg/api/domain.go
Normal file
93
pkg/api/domain.go
Normal file
@ -0,0 +1,93 @@
|
||||
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
|
||||
}
|
@ -557,7 +557,7 @@ type DomainPowerRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
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=domain.DomainPower" json:"action,omitempty"`
|
||||
Action DomainPower `protobuf:"varint,2,opt,name=action,proto3,enum=deevirt.DomainPower" json:"action,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DomainPowerRequest) Reset() {
|
||||
@ -742,96 +742,98 @@ var File_proto_domain_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_domain_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x16, 0x0a, 0x14,
|
||||
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x22, 0x4d, 0x0a, 0x15, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a,
|
||||
0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61,
|
||||
0x69, 0x6e, 0x73, 0x22, 0x30, 0x0a, 0x11, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x6f, 0x6d, 0x61,
|
||||
0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6f, 0x6d,
|
||||
0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x12, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64,
|
||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||
0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x22, 0x16, 0x0a,
|
||||
0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4e, 0x0a, 0x15, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35,
|
||||
0x0a, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
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, 0x52, 0x07, 0x64, 0x6f,
|
||||
0x6d, 0x61, 0x69, 0x6e, 0x73, 0x22, 0x30, 0x0a, 0x11, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x6f,
|
||||
0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64,
|
||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x22, 0x5f, 0x0a, 0x12, 0x44, 0x6f, 0x6d, 0x61, 0x69,
|
||||
0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a,
|
||||
0x09, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x08, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 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, 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,
|
||||
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, 0x22, 0x32,
|
||||
0x0a, 0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65,
|
||||
0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65,
|
||||
0x73, 0x73, 0x22, 0x2a, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x6d, 0x49, 0x64, 0x22, 0x16,
|
||||
0x0a, 0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a,
|
||||
0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x6d,
|
||||
0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x56, 0x0a, 0x12, 0x44, 0x6f,
|
||||
0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x04, 0x76, 0x6d, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x44,
|
||||
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65,
|
||||
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x23, 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,
|
||||
0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||
0x04, 0x76, 0x6d, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x24, 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, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x2a,
|
||||
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,
|
||||
0x22, 0x32, 0x0a, 0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67,
|
||||
0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67,
|
||||
0x72, 0x65, 0x73, 0x73, 0x22, 0x2a, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x76,
|
||||
0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x6d, 0x49, 0x64,
|
||||
0x22, 0x16, 0x0a, 0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61,
|
||||
0x69, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x76, 0x6d, 0x49, 0x64, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x57, 0x0a, 0x12,
|
||||
0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0c, 0x52, 0x04, 0x76, 0x6d, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72,
|
||||
0x74, 0x2e, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x06, 0x61,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x50,
|
||||
0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x0a, 0x23,
|
||||
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,
|
||||
0x70, 0x68, 0x69, 0x63, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x76, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0c, 0x52, 0x04, 0x76, 0x6d, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x24, 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,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
||||
0x72, 0x69, 0x2a, 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, 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,
|
||||
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 (
|
||||
@ -849,39 +851,39 @@ func file_proto_domain_proto_rawDescGZIP() []byte {
|
||||
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_goTypes = []interface{}{
|
||||
(DomainPower)(0), // 0: domain.DomainPower
|
||||
(*DomainListAllRequest)(nil), // 1: domain.DomainListAllRequest
|
||||
(*DomainListAllResponse)(nil), // 2: domain.DomainListAllResponse
|
||||
(*DomainListRequest)(nil), // 3: domain.DomainListRequest
|
||||
(*DomainListResponse)(nil), // 4: domain.DomainListResponse
|
||||
(*DomainCreateRequest)(nil), // 5: domain.DomainCreateRequest
|
||||
(*DomainCreateResponse)(nil), // 6: domain.DomainCreateResponse
|
||||
(*DomainUpdateRequest)(nil), // 7: domain.DomainUpdateRequest
|
||||
(*DomainUpdateResponse)(nil), // 8: domain.DomainUpdateResponse
|
||||
(*DomainDeleteRequest)(nil), // 9: domain.DomainDeleteRequest
|
||||
(*DomainDeleteResponse)(nil), // 10: domain.DomainDeleteResponse
|
||||
(*DomainPowerRequest)(nil), // 11: domain.DomainPowerRequest
|
||||
(*DomainPowerResponse)(nil), // 12: domain.DomainPowerResponse
|
||||
(*DomainDevicesGraphicsConsoleRequest)(nil), // 13: domain.DomainDevicesGraphicsConsoleRequest
|
||||
(*DomainDevicesGraphicsConsoleResponse)(nil), // 14: domain.DomainDevicesGraphicsConsoleResponse
|
||||
(DomainPower)(0), // 0: deevirt.DomainPower
|
||||
(*DomainListAllRequest)(nil), // 1: deevirt.DomainListAllRequest
|
||||
(*DomainListAllResponse)(nil), // 2: deevirt.DomainListAllResponse
|
||||
(*DomainListRequest)(nil), // 3: deevirt.DomainListRequest
|
||||
(*DomainListResponse)(nil), // 4: deevirt.DomainListResponse
|
||||
(*DomainCreateRequest)(nil), // 5: deevirt.DomainCreateRequest
|
||||
(*DomainCreateResponse)(nil), // 6: deevirt.DomainCreateResponse
|
||||
(*DomainUpdateRequest)(nil), // 7: deevirt.DomainUpdateRequest
|
||||
(*DomainUpdateResponse)(nil), // 8: deevirt.DomainUpdateResponse
|
||||
(*DomainDeleteRequest)(nil), // 9: deevirt.DomainDeleteRequest
|
||||
(*DomainDeleteResponse)(nil), // 10: deevirt.DomainDeleteResponse
|
||||
(*DomainPowerRequest)(nil), // 11: deevirt.DomainPowerRequest
|
||||
(*DomainPowerResponse)(nil), // 12: deevirt.DomainPowerResponse
|
||||
(*DomainDevicesGraphicsConsoleRequest)(nil), // 13: deevirt.DomainDevicesGraphicsConsoleRequest
|
||||
(*DomainDevicesGraphicsConsoleResponse)(nil), // 14: deevirt.DomainDevicesGraphicsConsoleResponse
|
||||
}
|
||||
var file_proto_domain_proto_depIdxs = []int32{
|
||||
4, // 0: domain.DomainListAllResponse.domains:type_name -> domain.DomainListResponse
|
||||
0, // 1: domain.DomainPowerRequest.action:type_name -> domain.DomainPower
|
||||
1, // 2: domain.Domain.List:input_type -> domain.DomainListAllRequest
|
||||
3, // 3: domain.Domain.Get:input_type -> domain.DomainListRequest
|
||||
5, // 4: domain.Domain.Create:input_type -> domain.DomainCreateRequest
|
||||
7, // 5: domain.Domain.Update:input_type -> domain.DomainUpdateRequest
|
||||
9, // 6: domain.Domain.Delete:input_type -> domain.DomainDeleteRequest
|
||||
11, // 7: domain.Domain.Power:input_type -> domain.DomainPowerRequest
|
||||
13, // 8: domain.DomainDevicesGraphics.Console:input_type -> domain.DomainDevicesGraphicsConsoleRequest
|
||||
2, // 9: domain.Domain.List:output_type -> domain.DomainListAllResponse
|
||||
4, // 10: domain.Domain.Get:output_type -> domain.DomainListResponse
|
||||
6, // 11: domain.Domain.Create:output_type -> domain.DomainCreateResponse
|
||||
8, // 12: domain.Domain.Update:output_type -> domain.DomainUpdateResponse
|
||||
10, // 13: domain.Domain.Delete:output_type -> domain.DomainDeleteResponse
|
||||
12, // 14: domain.Domain.Power:output_type -> domain.DomainPowerResponse
|
||||
14, // 15: domain.DomainDevicesGraphics.Console:output_type -> domain.DomainDevicesGraphicsConsoleResponse
|
||||
4, // 0: deevirt.DomainListAllResponse.domains:type_name -> deevirt.DomainListResponse
|
||||
0, // 1: deevirt.DomainPowerRequest.action:type_name -> deevirt.DomainPower
|
||||
1, // 2: deevirt.Domain.List:input_type -> deevirt.DomainListAllRequest
|
||||
3, // 3: deevirt.Domain.Get:input_type -> deevirt.DomainListRequest
|
||||
5, // 4: deevirt.Domain.Create:input_type -> deevirt.DomainCreateRequest
|
||||
7, // 5: deevirt.Domain.Update:input_type -> deevirt.DomainUpdateRequest
|
||||
9, // 6: deevirt.Domain.Delete:input_type -> deevirt.DomainDeleteRequest
|
||||
11, // 7: deevirt.Domain.Power:input_type -> deevirt.DomainPowerRequest
|
||||
13, // 8: deevirt.DomainDevicesGraphics.Console:input_type -> deevirt.DomainDevicesGraphicsConsoleRequest
|
||||
2, // 9: deevirt.Domain.List:output_type -> deevirt.DomainListAllResponse
|
||||
4, // 10: deevirt.Domain.Get:output_type -> deevirt.DomainListResponse
|
||||
6, // 11: deevirt.Domain.Create:output_type -> deevirt.DomainCreateResponse
|
||||
8, // 12: deevirt.Domain.Update:output_type -> deevirt.DomainUpdateResponse
|
||||
10, // 13: deevirt.Domain.Delete:output_type -> deevirt.DomainDeleteResponse
|
||||
12, // 14: deevirt.Domain.Power:output_type -> deevirt.DomainPowerResponse
|
||||
14, // 15: deevirt.DomainDevicesGraphics.Console:output_type -> deevirt.DomainDevicesGraphicsConsoleResponse
|
||||
9, // [9:16] is the sub-list for method output_type
|
||||
2, // [2:9] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
@ -1,7 +1,7 @@
|
||||
syntax="proto3";
|
||||
|
||||
option go_package = "./proto";
|
||||
package domain;
|
||||
package deevirt;
|
||||
|
||||
// The greeting service definition.
|
||||
service Domain {
|
@ -19,12 +19,12 @@ import (
|
||||
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"
|
||||
Domain_List_FullMethodName = "/deevirt.Domain/List"
|
||||
Domain_Get_FullMethodName = "/deevirt.Domain/Get"
|
||||
Domain_Create_FullMethodName = "/deevirt.Domain/Create"
|
||||
Domain_Update_FullMethodName = "/deevirt.Domain/Update"
|
||||
Domain_Delete_FullMethodName = "/deevirt.Domain/Delete"
|
||||
Domain_Power_FullMethodName = "/deevirt.Domain/Power"
|
||||
)
|
||||
|
||||
// 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,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Domain_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "domain.Domain",
|
||||
ServiceName: "deevirt.Domain",
|
||||
HandlerType: (*DomainServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -315,7 +315,7 @@ var Domain_ServiceDesc = grpc.ServiceDesc{
|
||||
}
|
||||
|
||||
const (
|
||||
DomainDevicesGraphics_Console_FullMethodName = "/domain.DomainDevicesGraphics/Console"
|
||||
DomainDevicesGraphics_Console_FullMethodName = "/deevirt.DomainDevicesGraphics/Console"
|
||||
)
|
||||
|
||||
// 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,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var DomainDevicesGraphics_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "domain.DomainDevicesGraphics",
|
||||
ServiceName: "deevirt.DomainDevicesGraphics",
|
||||
HandlerType: (*DomainDevicesGraphicsServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
@ -23,7 +23,7 @@ var File_proto_network_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_network_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x42, 0x09,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x42, 0x09,
|
||||
0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
syntax="proto3";
|
||||
|
||||
option go_package = "./proto";
|
||||
package network;
|
||||
package deevirt;
|
@ -1227,7 +1227,7 @@ type StateResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
State StateResponse_State `protobuf:"varint,1,opt,name=state,proto3,enum=StateResponse_State" json:"state,omitempty"`
|
||||
State StateResponse_State `protobuf:"varint,1,opt,name=state,proto3,enum=raft.StateResponse_State" json:"state,omitempty"`
|
||||
}
|
||||
|
||||
func (x *StateResponse) Reset() {
|
||||
@ -1397,7 +1397,7 @@ type GetConfigurationResponse_Server struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Suffrage GetConfigurationResponse_Server_Suffrage `protobuf:"varint,1,opt,name=suffrage,proto3,enum=GetConfigurationResponse_Server_Suffrage" json:"suffrage,omitempty"`
|
||||
Suffrage GetConfigurationResponse_Server_Suffrage `protobuf:"varint,1,opt,name=suffrage,proto3,enum=raft.GetConfigurationResponse_Server_Suffrage" json:"suffrage,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"`
|
||||
}
|
||||
@ -1459,52 +1459,53 @@ var File_proto_raft_admin_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_raft_admin_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x61, 0x66, 0x74, 0x5f, 0x61, 0x64, 0x6d,
|
||||
0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x31, 0x0a, 0x06, 0x46, 0x75, 0x74, 0x75,
|
||||
0x72, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
|
||||
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x70, 0x65,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x3b, 0x0a, 0x0d, 0x41,
|
||||
0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72,
|
||||
0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x10, 0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x67,
|
||||
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x0a, 0x0f, 0x41, 0x64,
|
||||
0x64, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a,
|
||||
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a,
|
||||
0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
|
||||
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69,
|
||||
0x6f, 0x75, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
|
||||
0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x65,
|
||||
0x0a, 0x12, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x6e, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25,
|
||||
0x0a, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73,
|
||||
0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x45, 0x0a, 0x0f, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x6f,
|
||||
0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a,
|
||||
0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
|
||||
0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x15, 0x0a, 0x13,
|
||||
0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x14, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69,
|
||||
0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65,
|
||||
0x78, 0x22, 0x10, 0x0a, 0x0e, 0x42, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x12, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x74,
|
||||
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65,
|
||||
0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x04, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78,
|
||||
0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x02, 0x0a, 0x18,
|
||||
0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76,
|
||||
0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 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, 0x76, 0x65, 0x72, 0x52, 0x07, 0x73, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x73, 0x1a, 0xab, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12,
|
||||
0x45, 0x0a, 0x08, 0x73, 0x75, 0x66, 0x66, 0x72, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0e, 0x32, 0x29, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61,
|
||||
0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x72, 0x61, 0x66, 0x74, 0x22, 0x31,
|
||||
0x0a, 0x06, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65,
|
||||
0x6e, 0x22, 0x3b, 0x0a, 0x0d, 0x41, 0x77, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65,
|
||||
0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x10,
|
||||
0x0a, 0x0e, 0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x62, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a,
|
||||
0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x49,
|
||||
0x6e, 0x64, 0x65, 0x78, 0x22, 0x65, 0x0a, 0x12, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x6e, 0x76, 0x6f,
|
||||
0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64,
|
||||
0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64,
|
||||
0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73,
|
||||
0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x72,
|
||||
0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x45, 0x0a, 0x0f, 0x41,
|
||||
0x70, 0x70, 0x6c, 0x79, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64,
|
||||
0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2c, 0x0a, 0x14, 0x41, 0x70, 0x70,
|
||||
0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
|
||||
0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x10, 0x0a, 0x0e, 0x42, 0x61, 0x72, 0x72, 0x69,
|
||||
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x12, 0x44, 0x65, 0x6d,
|
||||
0x6f, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
|
||||
0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x69, 0x6e, 0x64, 0x65,
|
||||
0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75,
|
||||
0x73, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x19, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x22, 0x8e, 0x02, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f,
|
||||
0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x25, 0x2e, 0x72, 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, 0x76, 0x65, 0x72, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x1a,
|
||||
0xb0, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x08, 0x73, 0x75,
|
||||
0x66, 0x66, 0x72, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x72,
|
||||
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,
|
||||
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,
|
||||
@ -1540,89 +1541,102 @@ var file_proto_raft_admin_proto_rawDesc = []byte{
|
||||
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,
|
||||
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, 0x7b, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74,
|
||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x74, 0x61,
|
||||
0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05,
|
||||
0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3e, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0c,
|
||||
0x0a, 0x08, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x52, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09,
|
||||
0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c,
|
||||
0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x48, 0x55, 0x54, 0x44,
|
||||
0x4f, 0x57, 0x4e, 0x10, 0x03, 0x22, 0x0e, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7a, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x73,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
||||
0x01, 0x22, 0x15, 0x0a, 0x13, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4c, 0x65, 0x61, 0x64, 0x65,
|
||||
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x32, 0xe7, 0x07, 0x0a, 0x09, 0x52, 0x61, 0x66,
|
||||
0x74, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x2d, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x6e,
|
||||
0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x13, 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,
|
||||
0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x27, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x56, 0x6f, 0x74, 0x65,
|
||||
0x72, 0x12, 0x10, 0x2e, 0x41, 0x64, 0x64, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x3d,
|
||||
0x0a, 0x0c, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14,
|
||||
0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x27, 0x0a,
|
||||
0x08, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c, 0x6f, 0x67, 0x12, 0x10, 0x2e, 0x41, 0x70, 0x70, 0x6c,
|
||||
0x79, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75,
|
||||
0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x25, 0x0a, 0x07, 0x42, 0x61, 0x72, 0x72, 0x69, 0x65,
|
||||
0x72, 0x12, 0x0f, 0x2e, 0x42, 0x61, 0x72, 0x72, 0x69, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x2d, 0x0a,
|
||||
0x0b, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x44,
|
||||
0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x10,
|
||||
0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x18, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 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, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0b, 0x4c, 0x61, 0x73, 0x74, 0x43,
|
||||
0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x13, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e,
|
||||
0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x4c, 0x61,
|
||||
0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x09, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78,
|
||||
0x12, 0x11, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2b, 0x0a, 0x06, 0x4c, 0x65, 0x61,
|
||||
0x64, 0x65, 0x72, 0x12, 0x0e, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3b, 0x0a, 0x12, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72,
|
||||
0x73, 0x68, 0x69, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x4c,
|
||||
0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65,
|
||||
0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72,
|
||||
0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x1a, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69,
|
||||
0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x12, 0x22, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x54, 0x72,
|
||||
0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00,
|
||||
0x12, 0x2f, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||
0x12, 0x14, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22,
|
||||
0x00, 0x12, 0x27, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x10, 0x2e,
|
||||
0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x27, 0x0a, 0x08, 0x53, 0x6e,
|
||||
0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x10, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f,
|
||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72,
|
||||
0x65, 0x22, 0x00, 0x12, 0x28, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x2e, 0x53,
|
||||
0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x53, 0x74,
|
||||
0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x28, 0x0a,
|
||||
0x05, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x0d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x69, 0x66,
|
||||
0x79, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79,
|
||||
0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x07, 0x2e,
|
||||
0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x22, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x69,
|
||||
0x74, 0x12, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x1a, 0x0e, 0x2e, 0x41, 0x77, 0x61,
|
||||
0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x24, 0x0a, 0x06,
|
||||
0x46, 0x6f, 0x72, 0x67, 0x65, 0x74, 0x12, 0x07, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x1a,
|
||||
0x0f, 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,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x61,
|
||||
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x73, 0x74,
|
||||
0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x72, 0x61, 0x66, 0x74,
|
||||
0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53,
|
||||
0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x3e, 0x0a, 0x05, 0x53,
|
||||
0x74, 0x61, 0x74, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x45, 0x52,
|
||||
0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x10,
|
||||
0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0c, 0x0a,
|
||||
0x08, 0x53, 0x48, 0x55, 0x54, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x22, 0x0e, 0x0a, 0x0c, 0x53,
|
||||
0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7f, 0x0a, 0x0d, 0x53,
|
||||
0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x05,
|
||||
0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61,
|
||||
0x66, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x73, 0x74, 0x61,
|
||||
0x74, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
||||
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x15, 0x0a, 0x13,
|
||||
0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x32, 0xaf, 0x09, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x74, 0x41, 0x64, 0x6d, 0x69,
|
||||
0x6e, 0x12, 0x37, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x4e, 0x6f, 0x6e, 0x76, 0x6f, 0x74, 0x65, 0x72,
|
||||
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, 0x0c, 0x2e, 0x72, 0x61, 0x66,
|
||||
0x74, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x08, 0x41, 0x64,
|
||||
0x64, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x15, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x41, 0x64,
|
||||
0x64, 0x56, 0x6f, 0x74, 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, 0x47, 0x0a,
|
||||
0x0c, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x19, 0x2e,
|
||||
0x72, 0x61, 0x66, 0x74, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65,
|
||||
0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e,
|
||||
0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x08, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c,
|
||||
0x6f, 0x67, 0x12, 0x15, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x4c,
|
||||
0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x72, 0x61, 0x66, 0x74,
|
||||
0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x07, 0x42, 0x61, 0x72,
|
||||
0x72, 0x69, 0x65, 0x72, 0x12, 0x14, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x42, 0x61, 0x72, 0x72,
|
||||
0x69, 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, 0x37, 0x0a, 0x0b, 0x44, 0x65,
|
||||
0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x72, 0x61, 0x66, 0x74,
|
||||
0x2e, 0x44, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x56, 0x6f, 0x74, 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, 0x53, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
|
||||
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 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, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x0b, 0x4c, 0x61, 0x73, 0x74,
|
||||
0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x18, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x4c,
|
||||
0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x19, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6e,
|
||||
0x74, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3e,
|
||||
0x0a, 0x09, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x16, 0x2e, 0x72, 0x61,
|
||||
0x66, 0x74, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x4c, 0x61, 0x73, 0x74, 0x49,
|
||||
0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x35,
|
||||
0x0a, 0x06, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x13, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e,
|
||||
0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e,
|
||||
0x72, 0x61, 0x66, 0x74, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x12, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73,
|
||||
0x68, 0x69, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x72, 0x61,
|
||||
0x66, 0x74, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x54, 0x72, 0x61,
|
||||
0x6e, 0x73, 0x66, 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, 0x55, 0x0a, 0x1a,
|
||||
0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66,
|
||||
0x65, 0x72, 0x54, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x72, 0x61, 0x66,
|
||||
0x74, 0x2e, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x54, 0x72, 0x61, 0x6e,
|
||||
0x73, 0x66, 0x65, 0x72, 0x54, 0x6f, 0x53, 0x65, 0x72, 0x76, 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, 0x39, 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x12, 0x19, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76,
|
||||
0x65, 0x53, 0x65, 0x72, 0x76, 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, 0x31,
|
||||
0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x15, 0x2e, 0x72, 0x61, 0x66,
|
||||
0x74, 0x2e, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x0c, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x46, 0x75, 0x74, 0x75, 0x72, 0x65, 0x22,
|
||||
0x00, 0x12, 0x31, 0x0a, 0x08, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x15, 0x2e,
|
||||
0x72, 0x61, 0x66, 0x74, 0x2e, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x46, 0x75, 0x74, 0x75,
|
||||
0x72, 0x65, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12, 0x2e,
|
||||
0x72, 0x61, 0x66, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x13, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74,
|
||||
0x73, 0x12, 0x12, 0x2e, 0x72, 0x61, 0x66, 0x74, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65,
|
||||
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 (
|
||||
@ -1640,84 +1654,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_msgTypes = make([]protoimpl.MessageInfo, 30)
|
||||
var file_proto_raft_admin_proto_goTypes = []interface{}{
|
||||
(GetConfigurationResponse_Server_Suffrage)(0), // 0: GetConfigurationResponse.Server.Suffrage
|
||||
(StateResponse_State)(0), // 1: StateResponse.State
|
||||
(*Future)(nil), // 2: Future
|
||||
(*AwaitResponse)(nil), // 3: AwaitResponse
|
||||
(*ForgetResponse)(nil), // 4: ForgetResponse
|
||||
(*AddVoterRequest)(nil), // 5: AddVoterRequest
|
||||
(*AddNonvoterRequest)(nil), // 6: AddNonvoterRequest
|
||||
(*ApplyLogRequest)(nil), // 7: ApplyLogRequest
|
||||
(*AppliedIndexRequest)(nil), // 8: AppliedIndexRequest
|
||||
(*AppliedIndexResponse)(nil), // 9: AppliedIndexResponse
|
||||
(*BarrierRequest)(nil), // 10: BarrierRequest
|
||||
(*DemoteVoterRequest)(nil), // 11: DemoteVoterRequest
|
||||
(*GetConfigurationRequest)(nil), // 12: GetConfigurationRequest
|
||||
(*GetConfigurationResponse)(nil), // 13: GetConfigurationResponse
|
||||
(*LastContactRequest)(nil), // 14: LastContactRequest
|
||||
(*LastContactResponse)(nil), // 15: LastContactResponse
|
||||
(*LastIndexRequest)(nil), // 16: LastIndexRequest
|
||||
(*LastIndexResponse)(nil), // 17: LastIndexResponse
|
||||
(*LeaderRequest)(nil), // 18: LeaderRequest
|
||||
(*LeaderResponse)(nil), // 19: LeaderResponse
|
||||
(*LeadershipTransferRequest)(nil), // 20: LeadershipTransferRequest
|
||||
(*LeadershipTransferToServerRequest)(nil), // 21: LeadershipTransferToServerRequest
|
||||
(*RemoveServerRequest)(nil), // 22: RemoveServerRequest
|
||||
(*ShutdownRequest)(nil), // 23: ShutdownRequest
|
||||
(*SnapshotRequest)(nil), // 24: SnapshotRequest
|
||||
(*StateRequest)(nil), // 25: StateRequest
|
||||
(*StateResponse)(nil), // 26: StateResponse
|
||||
(*StatsRequest)(nil), // 27: StatsRequest
|
||||
(*StatsResponse)(nil), // 28: StatsResponse
|
||||
(*VerifyLeaderRequest)(nil), // 29: VerifyLeaderRequest
|
||||
(*GetConfigurationResponse_Server)(nil), // 30: GetConfigurationResponse.Server
|
||||
nil, // 31: StatsResponse.StatsEntry
|
||||
(GetConfigurationResponse_Server_Suffrage)(0), // 0: raft.GetConfigurationResponse.Server.Suffrage
|
||||
(StateResponse_State)(0), // 1: raft.StateResponse.State
|
||||
(*Future)(nil), // 2: raft.Future
|
||||
(*AwaitResponse)(nil), // 3: raft.AwaitResponse
|
||||
(*ForgetResponse)(nil), // 4: raft.ForgetResponse
|
||||
(*AddVoterRequest)(nil), // 5: raft.AddVoterRequest
|
||||
(*AddNonvoterRequest)(nil), // 6: raft.AddNonvoterRequest
|
||||
(*ApplyLogRequest)(nil), // 7: raft.ApplyLogRequest
|
||||
(*AppliedIndexRequest)(nil), // 8: raft.AppliedIndexRequest
|
||||
(*AppliedIndexResponse)(nil), // 9: raft.AppliedIndexResponse
|
||||
(*BarrierRequest)(nil), // 10: raft.BarrierRequest
|
||||
(*DemoteVoterRequest)(nil), // 11: raft.DemoteVoterRequest
|
||||
(*GetConfigurationRequest)(nil), // 12: raft.GetConfigurationRequest
|
||||
(*GetConfigurationResponse)(nil), // 13: raft.GetConfigurationResponse
|
||||
(*LastContactRequest)(nil), // 14: raft.LastContactRequest
|
||||
(*LastContactResponse)(nil), // 15: raft.LastContactResponse
|
||||
(*LastIndexRequest)(nil), // 16: raft.LastIndexRequest
|
||||
(*LastIndexResponse)(nil), // 17: raft.LastIndexResponse
|
||||
(*LeaderRequest)(nil), // 18: raft.LeaderRequest
|
||||
(*LeaderResponse)(nil), // 19: raft.LeaderResponse
|
||||
(*LeadershipTransferRequest)(nil), // 20: raft.LeadershipTransferRequest
|
||||
(*LeadershipTransferToServerRequest)(nil), // 21: raft.LeadershipTransferToServerRequest
|
||||
(*RemoveServerRequest)(nil), // 22: raft.RemoveServerRequest
|
||||
(*ShutdownRequest)(nil), // 23: raft.ShutdownRequest
|
||||
(*SnapshotRequest)(nil), // 24: raft.SnapshotRequest
|
||||
(*StateRequest)(nil), // 25: raft.StateRequest
|
||||
(*StateResponse)(nil), // 26: raft.StateResponse
|
||||
(*StatsRequest)(nil), // 27: raft.StatsRequest
|
||||
(*StatsResponse)(nil), // 28: raft.StatsResponse
|
||||
(*VerifyLeaderRequest)(nil), // 29: raft.VerifyLeaderRequest
|
||||
(*GetConfigurationResponse_Server)(nil), // 30: raft.GetConfigurationResponse.Server
|
||||
nil, // 31: raft.StatsResponse.StatsEntry
|
||||
}
|
||||
var file_proto_raft_admin_proto_depIdxs = []int32{
|
||||
30, // 0: GetConfigurationResponse.servers:type_name -> GetConfigurationResponse.Server
|
||||
1, // 1: StateResponse.state:type_name -> StateResponse.State
|
||||
31, // 2: StatsResponse.stats:type_name -> StatsResponse.StatsEntry
|
||||
0, // 3: GetConfigurationResponse.Server.suffrage:type_name -> GetConfigurationResponse.Server.Suffrage
|
||||
6, // 4: RaftAdmin.AddNonvoter:input_type -> AddNonvoterRequest
|
||||
5, // 5: RaftAdmin.AddVoter:input_type -> AddVoterRequest
|
||||
8, // 6: RaftAdmin.AppliedIndex:input_type -> AppliedIndexRequest
|
||||
7, // 7: RaftAdmin.ApplyLog:input_type -> ApplyLogRequest
|
||||
10, // 8: RaftAdmin.Barrier:input_type -> BarrierRequest
|
||||
11, // 9: RaftAdmin.DemoteVoter:input_type -> DemoteVoterRequest
|
||||
12, // 10: RaftAdmin.GetConfiguration:input_type -> GetConfigurationRequest
|
||||
14, // 11: RaftAdmin.LastContact:input_type -> LastContactRequest
|
||||
16, // 12: RaftAdmin.LastIndex:input_type -> LastIndexRequest
|
||||
18, // 13: RaftAdmin.Leader:input_type -> LeaderRequest
|
||||
20, // 14: RaftAdmin.LeadershipTransfer:input_type -> LeadershipTransferRequest
|
||||
21, // 15: RaftAdmin.LeadershipTransferToServer:input_type -> LeadershipTransferToServerRequest
|
||||
22, // 16: RaftAdmin.RemoveServer:input_type -> RemoveServerRequest
|
||||
23, // 17: RaftAdmin.Shutdown:input_type -> ShutdownRequest
|
||||
24, // 18: RaftAdmin.Snapshot:input_type -> SnapshotRequest
|
||||
25, // 19: RaftAdmin.State:input_type -> StateRequest
|
||||
27, // 20: RaftAdmin.Stats:input_type -> StatsRequest
|
||||
29, // 21: RaftAdmin.VerifyLeader:input_type -> VerifyLeaderRequest
|
||||
2, // 22: RaftAdmin.Await:input_type -> Future
|
||||
2, // 23: RaftAdmin.Forget:input_type -> Future
|
||||
2, // 24: RaftAdmin.AddNonvoter:output_type -> Future
|
||||
2, // 25: RaftAdmin.AddVoter:output_type -> Future
|
||||
9, // 26: RaftAdmin.AppliedIndex:output_type -> AppliedIndexResponse
|
||||
2, // 27: RaftAdmin.ApplyLog:output_type -> Future
|
||||
2, // 28: RaftAdmin.Barrier:output_type -> Future
|
||||
2, // 29: RaftAdmin.DemoteVoter:output_type -> Future
|
||||
13, // 30: RaftAdmin.GetConfiguration:output_type -> GetConfigurationResponse
|
||||
15, // 31: RaftAdmin.LastContact:output_type -> LastContactResponse
|
||||
17, // 32: RaftAdmin.LastIndex:output_type -> LastIndexResponse
|
||||
19, // 33: RaftAdmin.Leader:output_type -> LeaderResponse
|
||||
2, // 34: RaftAdmin.LeadershipTransfer:output_type -> Future
|
||||
2, // 35: RaftAdmin.LeadershipTransferToServer:output_type -> Future
|
||||
2, // 36: RaftAdmin.RemoveServer:output_type -> Future
|
||||
2, // 37: RaftAdmin.Shutdown:output_type -> Future
|
||||
2, // 38: RaftAdmin.Snapshot:output_type -> Future
|
||||
26, // 39: RaftAdmin.State:output_type -> StateResponse
|
||||
28, // 40: RaftAdmin.Stats:output_type -> StatsResponse
|
||||
2, // 41: RaftAdmin.VerifyLeader:output_type -> Future
|
||||
3, // 42: RaftAdmin.Await:output_type -> AwaitResponse
|
||||
4, // 43: RaftAdmin.Forget:output_type -> ForgetResponse
|
||||
30, // 0: raft.GetConfigurationResponse.servers:type_name -> raft.GetConfigurationResponse.Server
|
||||
1, // 1: raft.StateResponse.state:type_name -> raft.StateResponse.State
|
||||
31, // 2: raft.StatsResponse.stats:type_name -> raft.StatsResponse.StatsEntry
|
||||
0, // 3: raft.GetConfigurationResponse.Server.suffrage:type_name -> raft.GetConfigurationResponse.Server.Suffrage
|
||||
6, // 4: raft.RaftAdmin.AddNonvoter:input_type -> raft.AddNonvoterRequest
|
||||
5, // 5: raft.RaftAdmin.AddVoter:input_type -> raft.AddVoterRequest
|
||||
8, // 6: raft.RaftAdmin.AppliedIndex:input_type -> raft.AppliedIndexRequest
|
||||
7, // 7: raft.RaftAdmin.ApplyLog:input_type -> raft.ApplyLogRequest
|
||||
10, // 8: raft.RaftAdmin.Barrier:input_type -> raft.BarrierRequest
|
||||
11, // 9: raft.RaftAdmin.DemoteVoter:input_type -> raft.DemoteVoterRequest
|
||||
12, // 10: raft.RaftAdmin.GetConfiguration:input_type -> raft.GetConfigurationRequest
|
||||
14, // 11: raft.RaftAdmin.LastContact:input_type -> raft.LastContactRequest
|
||||
16, // 12: raft.RaftAdmin.LastIndex:input_type -> raft.LastIndexRequest
|
||||
18, // 13: raft.RaftAdmin.Leader:input_type -> raft.LeaderRequest
|
||||
20, // 14: raft.RaftAdmin.LeadershipTransfer:input_type -> raft.LeadershipTransferRequest
|
||||
21, // 15: raft.RaftAdmin.LeadershipTransferToServer:input_type -> raft.LeadershipTransferToServerRequest
|
||||
22, // 16: raft.RaftAdmin.RemoveServer:input_type -> raft.RemoveServerRequest
|
||||
23, // 17: raft.RaftAdmin.Shutdown:input_type -> raft.ShutdownRequest
|
||||
24, // 18: raft.RaftAdmin.Snapshot:input_type -> raft.SnapshotRequest
|
||||
25, // 19: raft.RaftAdmin.State:input_type -> raft.StateRequest
|
||||
27, // 20: raft.RaftAdmin.Stats:input_type -> raft.StatsRequest
|
||||
29, // 21: raft.RaftAdmin.VerifyLeader:input_type -> raft.VerifyLeaderRequest
|
||||
2, // 22: raft.RaftAdmin.Await:input_type -> raft.Future
|
||||
2, // 23: raft.RaftAdmin.Forget:input_type -> raft.Future
|
||||
2, // 24: raft.RaftAdmin.AddNonvoter:output_type -> raft.Future
|
||||
2, // 25: raft.RaftAdmin.AddVoter:output_type -> raft.Future
|
||||
9, // 26: raft.RaftAdmin.AppliedIndex:output_type -> raft.AppliedIndexResponse
|
||||
2, // 27: raft.RaftAdmin.ApplyLog:output_type -> raft.Future
|
||||
2, // 28: raft.RaftAdmin.Barrier:output_type -> raft.Future
|
||||
2, // 29: raft.RaftAdmin.DemoteVoter:output_type -> raft.Future
|
||||
13, // 30: raft.RaftAdmin.GetConfiguration:output_type -> raft.GetConfigurationResponse
|
||||
15, // 31: raft.RaftAdmin.LastContact:output_type -> raft.LastContactResponse
|
||||
17, // 32: raft.RaftAdmin.LastIndex:output_type -> raft.LastIndexResponse
|
||||
19, // 33: raft.RaftAdmin.Leader:output_type -> raft.LeaderResponse
|
||||
2, // 34: raft.RaftAdmin.LeadershipTransfer:output_type -> raft.Future
|
||||
2, // 35: raft.RaftAdmin.LeadershipTransferToServer:output_type -> raft.Future
|
||||
2, // 36: raft.RaftAdmin.RemoveServer:output_type -> raft.Future
|
||||
2, // 37: raft.RaftAdmin.Shutdown:output_type -> raft.Future
|
||||
2, // 38: raft.RaftAdmin.Snapshot:output_type -> raft.Future
|
||||
26, // 39: raft.RaftAdmin.State:output_type -> raft.StateResponse
|
||||
28, // 40: raft.RaftAdmin.Stats:output_type -> raft.StatsResponse
|
||||
2, // 41: raft.RaftAdmin.VerifyLeader:output_type -> raft.Future
|
||||
3, // 42: raft.RaftAdmin.Await:output_type -> raft.AwaitResponse
|
||||
4, // 43: raft.RaftAdmin.Forget:output_type -> raft.ForgetResponse
|
||||
24, // [24:44] is the sub-list for method output_type
|
||||
4, // [4:24] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
@ -1,6 +1,7 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option go_package = "./proto";
|
||||
package raft;
|
||||
|
||||
service RaftAdmin {
|
||||
rpc AddNonvoter(AddNonvoterRequest) returns (Future) {}
|
@ -19,26 +19,26 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
RaftAdmin_AddNonvoter_FullMethodName = "/RaftAdmin/AddNonvoter"
|
||||
RaftAdmin_AddVoter_FullMethodName = "/RaftAdmin/AddVoter"
|
||||
RaftAdmin_AppliedIndex_FullMethodName = "/RaftAdmin/AppliedIndex"
|
||||
RaftAdmin_ApplyLog_FullMethodName = "/RaftAdmin/ApplyLog"
|
||||
RaftAdmin_Barrier_FullMethodName = "/RaftAdmin/Barrier"
|
||||
RaftAdmin_DemoteVoter_FullMethodName = "/RaftAdmin/DemoteVoter"
|
||||
RaftAdmin_GetConfiguration_FullMethodName = "/RaftAdmin/GetConfiguration"
|
||||
RaftAdmin_LastContact_FullMethodName = "/RaftAdmin/LastContact"
|
||||
RaftAdmin_LastIndex_FullMethodName = "/RaftAdmin/LastIndex"
|
||||
RaftAdmin_Leader_FullMethodName = "/RaftAdmin/Leader"
|
||||
RaftAdmin_LeadershipTransfer_FullMethodName = "/RaftAdmin/LeadershipTransfer"
|
||||
RaftAdmin_LeadershipTransferToServer_FullMethodName = "/RaftAdmin/LeadershipTransferToServer"
|
||||
RaftAdmin_RemoveServer_FullMethodName = "/RaftAdmin/RemoveServer"
|
||||
RaftAdmin_Shutdown_FullMethodName = "/RaftAdmin/Shutdown"
|
||||
RaftAdmin_Snapshot_FullMethodName = "/RaftAdmin/Snapshot"
|
||||
RaftAdmin_State_FullMethodName = "/RaftAdmin/State"
|
||||
RaftAdmin_Stats_FullMethodName = "/RaftAdmin/Stats"
|
||||
RaftAdmin_VerifyLeader_FullMethodName = "/RaftAdmin/VerifyLeader"
|
||||
RaftAdmin_Await_FullMethodName = "/RaftAdmin/Await"
|
||||
RaftAdmin_Forget_FullMethodName = "/RaftAdmin/Forget"
|
||||
RaftAdmin_AddNonvoter_FullMethodName = "/raft.RaftAdmin/AddNonvoter"
|
||||
RaftAdmin_AddVoter_FullMethodName = "/raft.RaftAdmin/AddVoter"
|
||||
RaftAdmin_AppliedIndex_FullMethodName = "/raft.RaftAdmin/AppliedIndex"
|
||||
RaftAdmin_ApplyLog_FullMethodName = "/raft.RaftAdmin/ApplyLog"
|
||||
RaftAdmin_Barrier_FullMethodName = "/raft.RaftAdmin/Barrier"
|
||||
RaftAdmin_DemoteVoter_FullMethodName = "/raft.RaftAdmin/DemoteVoter"
|
||||
RaftAdmin_GetConfiguration_FullMethodName = "/raft.RaftAdmin/GetConfiguration"
|
||||
RaftAdmin_LastContact_FullMethodName = "/raft.RaftAdmin/LastContact"
|
||||
RaftAdmin_LastIndex_FullMethodName = "/raft.RaftAdmin/LastIndex"
|
||||
RaftAdmin_Leader_FullMethodName = "/raft.RaftAdmin/Leader"
|
||||
RaftAdmin_LeadershipTransfer_FullMethodName = "/raft.RaftAdmin/LeadershipTransfer"
|
||||
RaftAdmin_LeadershipTransferToServer_FullMethodName = "/raft.RaftAdmin/LeadershipTransferToServer"
|
||||
RaftAdmin_RemoveServer_FullMethodName = "/raft.RaftAdmin/RemoveServer"
|
||||
RaftAdmin_Shutdown_FullMethodName = "/raft.RaftAdmin/Shutdown"
|
||||
RaftAdmin_Snapshot_FullMethodName = "/raft.RaftAdmin/Snapshot"
|
||||
RaftAdmin_State_FullMethodName = "/raft.RaftAdmin/State"
|
||||
RaftAdmin_Stats_FullMethodName = "/raft.RaftAdmin/Stats"
|
||||
RaftAdmin_VerifyLeader_FullMethodName = "/raft.RaftAdmin/VerifyLeader"
|
||||
RaftAdmin_Await_FullMethodName = "/raft.RaftAdmin/Await"
|
||||
RaftAdmin_Forget_FullMethodName = "/raft.RaftAdmin/Forget"
|
||||
)
|
||||
|
||||
// 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,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var RaftAdmin_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "RaftAdmin",
|
||||
ServiceName: "raft.RaftAdmin",
|
||||
HandlerType: (*RaftAdminServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
@ -23,7 +23,7 @@ var File_proto_storage_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_storage_proto_rawDesc = []byte{
|
||||
0x0a, 0x13, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x42, 0x09,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x64, 0x65, 0x65, 0x76, 0x69, 0x72, 0x74, 0x42, 0x09,
|
||||
0x5a, 0x07, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
syntax="proto3";
|
||||
|
||||
option go_package = "./proto";
|
||||
package storage;
|
||||
package deevirt;
|
38
pkg/api/server.go
Normal file
38
pkg/api/server.go
Normal file
@ -0,0 +1,38 @@
|
||||
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,20 +4,32 @@ import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
"github.com/denisbrodbeck/machineid"
|
||||
"gopkg.in/ini.v1"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
ClusterID string
|
||||
NodeID string
|
||||
ClusterID string
|
||||
AddressPublic string
|
||||
AddressPrivate string
|
||||
NodeID string
|
||||
|
||||
Manager Manager
|
||||
AmqpURI string
|
||||
EtcdURI string
|
||||
LibvirtTLS bool
|
||||
}
|
||||
|
||||
func NewConfig() (*Config, error) {
|
||||
type Manager struct {
|
||||
Peers []string
|
||||
TlsKey string
|
||||
TlsCert string
|
||||
TlsCA string
|
||||
}
|
||||
|
||||
func New() (*Config, error) {
|
||||
c, err := ini.Load("/etc/deevirt/config.ini")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
@ -31,9 +43,20 @@ func NewConfig() (*Config, error) {
|
||||
mID, _ := hex.DecodeString(id)
|
||||
libvirtTLS, _ := c.Section("libvirt").Key("tls").Bool()
|
||||
|
||||
//Manager
|
||||
peers := strings.Split(c.Section("mgr").Key("peers").String(), ",")
|
||||
|
||||
manager := &Manager{
|
||||
Peers: peers,
|
||||
}
|
||||
|
||||
return &Config{
|
||||
ClusterID: c.Section("").Key("id").String(),
|
||||
NodeID: fmt.Sprintf("%x-%x-%x-%x-%x", mID[:4], mID[4:6], mID[6:8], mID[8:10], mID[10:]),
|
||||
ClusterID: c.Section("").Key("id_cluster").String(),
|
||||
AddressPublic: c.Section("").Key("ip_public").String(),
|
||||
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(),
|
||||
EtcdURI: c.Section("etcd").Key("uri").String(),
|
||||
LibvirtTLS: libvirtTLS,
|
||||
|
43
pkg/etcd/client.go
Normal file
43
pkg/etcd/client.go
Normal file
@ -0,0 +1,43 @@
|
||||
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
|
||||
}
|
@ -8,7 +8,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
pb "deevirt.fr/compute/cmd/compute_mgr/proto"
|
||||
pb "deevirt.fr/compute/pkg/api/proto"
|
||||
"github.com/hashicorp/raft"
|
||||
"google.golang.org/grpc"
|
||||
)
|
@ -2,23 +2,19 @@ package raft
|
||||
|
||||
import (
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"deevirt.fr/compute/pkg/scheduler"
|
||||
transport "github.com/Jille/raft-grpc-transport"
|
||||
"github.com/hashicorp/raft"
|
||||
raftboltdb "github.com/hashicorp/raft-boltdb"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
var (
|
||||
raftDir = flag.String("raft_data_dir", "data/", "Raft data dir")
|
||||
raftBootstrap = flag.Bool("raft_bootstrap", false, "Whether to bootstrap the Raft cluster")
|
||||
"deevirt.fr/compute/pkg/config"
|
||||
etcd_client "deevirt.fr/compute/pkg/etcd"
|
||||
"deevirt.fr/compute/pkg/scheduler"
|
||||
)
|
||||
|
||||
type RaftNode struct {
|
||||
@ -28,47 +24,53 @@ type RaftNode struct {
|
||||
scheduler *scheduler.Scheduler
|
||||
}
|
||||
|
||||
type Worker struct {
|
||||
ctx context.Context
|
||||
cancel context.CancelFunc
|
||||
cancelled bool // Variable pour suivre si cancel a été appelé
|
||||
type Peers struct {
|
||||
Id string
|
||||
Address string
|
||||
}
|
||||
|
||||
// Vérifie si l'état Raft existe déjà
|
||||
func checkIfStateExists(logStore *raftboltdb.BoltStore, snapshotStore raft.SnapshotStore) (bool, error) {
|
||||
// Vérifier les snapshots
|
||||
snapshots, err := snapshotStore.List()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if len(snapshots) > 0 {
|
||||
return true, nil // Il y a déjà un snapshot, donc un état Raft
|
||||
}
|
||||
|
||||
// Vérifier les logs Raft
|
||||
firstIndex, err := logStore.FirstIndex()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
lastIndex, err := logStore.LastIndex()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
return lastIndex > firstIndex, nil
|
||||
}
|
||||
|
||||
func NewRaft(ctx context.Context, myID, myAddress string) (*raft.Raft, *transport.Manager, error) {
|
||||
|
||||
c := raft.DefaultConfig()
|
||||
c.LocalID = raft.ServerID(myID)
|
||||
|
||||
/*addr, err := net.ResolveTCPAddr("tcp", myAddress)
|
||||
func New(ctx context.Context, port int) (*raft.Raft, *transport.Manager, error) {
|
||||
// Récupération de la configuration deevirt
|
||||
conf, err := config.New()
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}*/
|
||||
}
|
||||
|
||||
baseDir := filepath.Join(*raftDir, myID)
|
||||
// Création du répertoire
|
||||
baseDir := filepath.Join("/var/lib/deevirt/mgr/", conf.NodeID)
|
||||
err = os.MkdirAll(baseDir, 0740)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
// Récupération des Noeuds ID
|
||||
etcd, err := etcd_client.New(conf.EtcdURI)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
defer etcd.Close()
|
||||
|
||||
peers := []raft.Server{}
|
||||
|
||||
for key, value := range etcd_client.GetNodes(etcd, conf.ClusterID) {
|
||||
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.LocalID = raft.ServerID(conf.NodeID)
|
||||
|
||||
ldb, err := raftboltdb.NewBoltStore(filepath.Join(baseDir, "logs.dat"))
|
||||
if err != nil {
|
||||
@ -85,12 +87,7 @@ func NewRaft(ctx context.Context, myID, myAddress string) (*raft.Raft, *transpor
|
||||
return nil, nil, fmt.Errorf(`raft.NewFileSnapshotStore(%q, ...): %v`, baseDir, err)
|
||||
}
|
||||
|
||||
/*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()})
|
||||
tm := transport.New(raft.ServerAddress(fmt.Sprintf("%s:%d", conf.AddressPrivate, port)), []grpc.DialOption{grpc.WithInsecure()})
|
||||
|
||||
r, err := raft.NewRaft(c, nil, ldb, sdb, fss, tm.Transport())
|
||||
if err != nil {
|
||||
@ -108,34 +105,20 @@ func NewRaft(ctx context.Context, myID, myAddress string) (*raft.Raft, *transpor
|
||||
|
||||
node := &RaftNode{
|
||||
Raft: r,
|
||||
NodeID: myID,
|
||||
NodeID: conf.NodeID,
|
||||
StateCh: stateCh,
|
||||
scheduler: s,
|
||||
}
|
||||
|
||||
go node.watchStateChanges()
|
||||
|
||||
// 🔍 Vérification si des logs ou snapshots existent
|
||||
hasState, _ := checkIfStateExists(ldb, fss)
|
||||
hasState, _ := checkIfStateExists(ldb)
|
||||
|
||||
println(myAddress)
|
||||
if conf.Manager.Peers[0] == conf.AddressPrivate && !hasState {
|
||||
println("Démarrage du bootstrap ! ")
|
||||
|
||||
if *raftBootstrap && !hasState {
|
||||
cfg := raft.Configuration{
|
||||
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"),
|
||||
},*/
|
||||
},
|
||||
Servers: peers,
|
||||
}
|
||||
f := r.BootstrapCluster(cfg)
|
||||
if err := f.Error(); err != nil {
|
||||
@ -146,32 +129,19 @@ func NewRaft(ctx context.Context, myID, myAddress string) (*raft.Raft, *transpor
|
||||
return r, tm, nil
|
||||
}
|
||||
|
||||
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é.")
|
||||
// Vérifie si l'état Raft existe déjà
|
||||
func checkIfStateExists(logStore *raftboltdb.BoltStore) (bool, error) {
|
||||
// Vérifier les logs Raft
|
||||
firstIndex, err := logStore.FirstIndex()
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
}
|
||||
|
||||
func (w *Worker) IsCancelled() bool {
|
||||
return w.cancelled
|
||||
if firstIndex > 0 {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// Fonction pour surveiller et afficher les changements d'état
|
41
pkg/raft/worker.go
Normal file
41
pkg/raft/worker.go
Normal file
@ -0,0 +1,41 @@
|
||||
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) {
|
||||
config, _ := config.NewConfig()
|
||||
config, _ := config.New()
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
logger, _ := zap.NewProduction()
|
||||
|
Loading…
x
Reference in New Issue
Block a user