mirror of https://github.com/dragonflyoss/api.git
feat: add SyncNetworkTopology to scheduler (#62)
Signed-off-by: Gaius <gaius.qi@gmail.com>
This commit is contained in:
parent
a0551da924
commit
b12d940bf7
|
@ -198,6 +198,26 @@ func (mr *MockSchedulerClientMockRecorder) StatTask(ctx, in interface{}, opts ..
|
|||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatTask", reflect.TypeOf((*MockSchedulerClient)(nil).StatTask), varargs...)
|
||||
}
|
||||
|
||||
// SyncNetworkTopology mocks base method.
|
||||
func (m *MockSchedulerClient) SyncNetworkTopology(ctx context.Context, opts ...grpc.CallOption) (scheduler.Scheduler_SyncNetworkTopologyClient, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{ctx}
|
||||
for _, a := range opts {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "SyncNetworkTopology", varargs...)
|
||||
ret0, _ := ret[0].(scheduler.Scheduler_SyncNetworkTopologyClient)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// SyncNetworkTopology indicates an expected call of SyncNetworkTopology.
|
||||
func (mr *MockSchedulerClientMockRecorder) SyncNetworkTopology(ctx interface{}, opts ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{ctx}, opts...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncNetworkTopology", reflect.TypeOf((*MockSchedulerClient)(nil).SyncNetworkTopology), varargs...)
|
||||
}
|
||||
|
||||
// SyncProbes mocks base method.
|
||||
func (m *MockSchedulerClient) SyncProbes(ctx context.Context, opts ...grpc.CallOption) (scheduler.Scheduler_SyncProbesClient, error) {
|
||||
m.ctrl.T.Helper()
|
||||
|
@ -492,6 +512,143 @@ func (mr *MockScheduler_SyncProbesClientMockRecorder) Trailer() *gomock.Call {
|
|||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockScheduler_SyncProbesClient)(nil).Trailer))
|
||||
}
|
||||
|
||||
// MockScheduler_SyncNetworkTopologyClient is a mock of Scheduler_SyncNetworkTopologyClient interface.
|
||||
type MockScheduler_SyncNetworkTopologyClient struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockScheduler_SyncNetworkTopologyClientMockRecorder
|
||||
}
|
||||
|
||||
// MockScheduler_SyncNetworkTopologyClientMockRecorder is the mock recorder for MockScheduler_SyncNetworkTopologyClient.
|
||||
type MockScheduler_SyncNetworkTopologyClientMockRecorder struct {
|
||||
mock *MockScheduler_SyncNetworkTopologyClient
|
||||
}
|
||||
|
||||
// NewMockScheduler_SyncNetworkTopologyClient creates a new mock instance.
|
||||
func NewMockScheduler_SyncNetworkTopologyClient(ctrl *gomock.Controller) *MockScheduler_SyncNetworkTopologyClient {
|
||||
mock := &MockScheduler_SyncNetworkTopologyClient{ctrl: ctrl}
|
||||
mock.recorder = &MockScheduler_SyncNetworkTopologyClientMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) EXPECT() *MockScheduler_SyncNetworkTopologyClientMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// CloseAndRecv mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) CloseAndRecv() (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "CloseAndRecv")
|
||||
ret0, _ := ret[0].(*emptypb.Empty)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// CloseAndRecv indicates an expected call of CloseAndRecv.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) CloseAndRecv() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseAndRecv", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).CloseAndRecv))
|
||||
}
|
||||
|
||||
// CloseSend mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) CloseSend() error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "CloseSend")
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// CloseSend indicates an expected call of CloseSend.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) CloseSend() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).CloseSend))
|
||||
}
|
||||
|
||||
// Context mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) Context() context.Context {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Context")
|
||||
ret0, _ := ret[0].(context.Context)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Context indicates an expected call of Context.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) Context() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).Context))
|
||||
}
|
||||
|
||||
// Header mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) Header() (metadata.MD, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Header")
|
||||
ret0, _ := ret[0].(metadata.MD)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Header indicates an expected call of Header.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) Header() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).Header))
|
||||
}
|
||||
|
||||
// RecvMsg mocks base method.
|
||||
func (m_2 *MockScheduler_SyncNetworkTopologyClient) RecvMsg(m interface{}) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// RecvMsg indicates an expected call of RecvMsg.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) RecvMsg(m interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).RecvMsg), m)
|
||||
}
|
||||
|
||||
// Send mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) Send(arg0 *scheduler.SyncNetworkTopologyRequest) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Send", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Send indicates an expected call of Send.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) Send(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).Send), arg0)
|
||||
}
|
||||
|
||||
// SendMsg mocks base method.
|
||||
func (m_2 *MockScheduler_SyncNetworkTopologyClient) SendMsg(m interface{}) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendMsg indicates an expected call of SendMsg.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) SendMsg(m interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).SendMsg), m)
|
||||
}
|
||||
|
||||
// Trailer mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) Trailer() metadata.MD {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Trailer")
|
||||
ret0, _ := ret[0].(metadata.MD)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Trailer indicates an expected call of Trailer.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) Trailer() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).Trailer))
|
||||
}
|
||||
|
||||
// MockSchedulerServer is a mock of SchedulerServer interface.
|
||||
type MockSchedulerServer struct {
|
||||
ctrl *gomock.Controller
|
||||
|
@ -634,6 +791,20 @@ func (mr *MockSchedulerServerMockRecorder) StatTask(arg0, arg1 interface{}) *gom
|
|||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatTask", reflect.TypeOf((*MockSchedulerServer)(nil).StatTask), arg0, arg1)
|
||||
}
|
||||
|
||||
// SyncNetworkTopology mocks base method.
|
||||
func (m *MockSchedulerServer) SyncNetworkTopology(arg0 scheduler.Scheduler_SyncNetworkTopologyServer) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SyncNetworkTopology", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SyncNetworkTopology indicates an expected call of SyncNetworkTopology.
|
||||
func (mr *MockSchedulerServerMockRecorder) SyncNetworkTopology(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncNetworkTopology", reflect.TypeOf((*MockSchedulerServer)(nil).SyncNetworkTopology), arg0)
|
||||
}
|
||||
|
||||
// SyncProbes mocks base method.
|
||||
func (m *MockSchedulerServer) SyncProbes(arg0 scheduler.Scheduler_SyncProbesServer) error {
|
||||
m.ctrl.T.Helper()
|
||||
|
@ -950,3 +1121,137 @@ func (mr *MockScheduler_SyncProbesServerMockRecorder) SetTrailer(arg0 interface{
|
|||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockScheduler_SyncProbesServer)(nil).SetTrailer), arg0)
|
||||
}
|
||||
|
||||
// MockScheduler_SyncNetworkTopologyServer is a mock of Scheduler_SyncNetworkTopologyServer interface.
|
||||
type MockScheduler_SyncNetworkTopologyServer struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockScheduler_SyncNetworkTopologyServerMockRecorder
|
||||
}
|
||||
|
||||
// MockScheduler_SyncNetworkTopologyServerMockRecorder is the mock recorder for MockScheduler_SyncNetworkTopologyServer.
|
||||
type MockScheduler_SyncNetworkTopologyServerMockRecorder struct {
|
||||
mock *MockScheduler_SyncNetworkTopologyServer
|
||||
}
|
||||
|
||||
// NewMockScheduler_SyncNetworkTopologyServer creates a new mock instance.
|
||||
func NewMockScheduler_SyncNetworkTopologyServer(ctrl *gomock.Controller) *MockScheduler_SyncNetworkTopologyServer {
|
||||
mock := &MockScheduler_SyncNetworkTopologyServer{ctrl: ctrl}
|
||||
mock.recorder = &MockScheduler_SyncNetworkTopologyServerMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) EXPECT() *MockScheduler_SyncNetworkTopologyServerMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// Context mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) Context() context.Context {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Context")
|
||||
ret0, _ := ret[0].(context.Context)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Context indicates an expected call of Context.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) Context() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).Context))
|
||||
}
|
||||
|
||||
// Recv mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) Recv() (*scheduler.SyncNetworkTopologyRequest, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Recv")
|
||||
ret0, _ := ret[0].(*scheduler.SyncNetworkTopologyRequest)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Recv indicates an expected call of Recv.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) Recv() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).Recv))
|
||||
}
|
||||
|
||||
// RecvMsg mocks base method.
|
||||
func (m_2 *MockScheduler_SyncNetworkTopologyServer) RecvMsg(m interface{}) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// RecvMsg indicates an expected call of RecvMsg.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) RecvMsg(m interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).RecvMsg), m)
|
||||
}
|
||||
|
||||
// SendAndClose mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) SendAndClose(arg0 *emptypb.Empty) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SendAndClose", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendAndClose indicates an expected call of SendAndClose.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) SendAndClose(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendAndClose", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).SendAndClose), arg0)
|
||||
}
|
||||
|
||||
// SendHeader mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) SendHeader(arg0 metadata.MD) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SendHeader", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendHeader indicates an expected call of SendHeader.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) SendHeader(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).SendHeader), arg0)
|
||||
}
|
||||
|
||||
// SendMsg mocks base method.
|
||||
func (m_2 *MockScheduler_SyncNetworkTopologyServer) SendMsg(m interface{}) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendMsg indicates an expected call of SendMsg.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) SendMsg(m interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).SendMsg), m)
|
||||
}
|
||||
|
||||
// SetHeader mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) SetHeader(arg0 metadata.MD) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SetHeader", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SetHeader indicates an expected call of SetHeader.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) SetHeader(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).SetHeader), arg0)
|
||||
}
|
||||
|
||||
// SetTrailer mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) SetTrailer(arg0 metadata.MD) {
|
||||
m.ctrl.T.Helper()
|
||||
m.ctrl.Call(m, "SetTrailer", arg0)
|
||||
}
|
||||
|
||||
// SetTrailer indicates an expected call of SetTrailer.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) SetTrailer(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).SetTrailer), arg0)
|
||||
}
|
||||
|
|
|
@ -2000,16 +2000,10 @@ type Probe struct {
|
|||
|
||||
// Host metadata.
|
||||
Host *v1.Host `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
|
||||
// RTTs is all of the round-trip times sent via this pinger.
|
||||
Rtts []*durationpb.Duration `protobuf:"bytes,2,rep,name=rtts,proto3" json:"rtts,omitempty"`
|
||||
// MinRTT is the minimum round-trip time sent via this pinger.
|
||||
MinRtt *durationpb.Duration `protobuf:"bytes,3,opt,name=min_rtt,json=minRtt,proto3" json:"min_rtt,omitempty"`
|
||||
// MaxRTT is the maximum round-trip time sent via this pinger.
|
||||
MaxRtt *durationpb.Duration `protobuf:"bytes,4,opt,name=max_rtt,json=maxRtt,proto3" json:"max_rtt,omitempty"`
|
||||
// AvgRTT is the average round-trip time sent via this pinger.
|
||||
AvgRtt *durationpb.Duration `protobuf:"bytes,5,opt,name=avg_rtt,json=avgRtt,proto3" json:"avg_rtt,omitempty"`
|
||||
// RTT is the round-trip time sent via this pinger.
|
||||
Rtt *durationpb.Duration `protobuf:"bytes,2,opt,name=rtt,proto3" json:"rtt,omitempty"`
|
||||
// Task update time.
|
||||
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
||||
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Probe) Reset() {
|
||||
|
@ -2051,30 +2045,9 @@ func (x *Probe) GetHost() *v1.Host {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (x *Probe) GetRtts() []*durationpb.Duration {
|
||||
func (x *Probe) GetRtt() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.Rtts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Probe) GetMinRtt() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.MinRtt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Probe) GetMaxRtt() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.MaxRtt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Probe) GetAvgRtt() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.AvgRtt
|
||||
return x.Rtt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -2086,8 +2059,8 @@ func (x *Probe) GetUpdatedAt() *timestamppb.Timestamp {
|
|||
return nil
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
type SyncProbesRequest struct {
|
||||
// ProbesOfHost represents probes information of the host.
|
||||
type ProbesOfHost struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
@ -2098,10 +2071,66 @@ type SyncProbesRequest struct {
|
|||
Probes []*Probe `protobuf:"bytes,2,rep,name=probes,proto3" json:"probes,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ProbesOfHost) Reset() {
|
||||
*x = ProbesOfHost{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[20]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ProbesOfHost) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ProbesOfHost) ProtoMessage() {}
|
||||
|
||||
func (x *ProbesOfHost) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[20]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ProbesOfHost.ProtoReflect.Descriptor instead.
|
||||
func (*ProbesOfHost) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{20}
|
||||
}
|
||||
|
||||
func (x *ProbesOfHost) GetHost() *v1.Host {
|
||||
if x != nil {
|
||||
return x.Host
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ProbesOfHost) GetProbes() []*Probe {
|
||||
if x != nil {
|
||||
return x.Probes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
type SyncProbesRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Probes information of the host.
|
||||
ProbesOfHost *ProbesOfHost `protobuf:"bytes,1,opt,name=probes_of_host,json=probesOfHost,proto3" json:"probes_of_host,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SyncProbesRequest) Reset() {
|
||||
*x = SyncProbesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[20]
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[21]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -2114,7 +2143,7 @@ func (x *SyncProbesRequest) String() string {
|
|||
func (*SyncProbesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SyncProbesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[20]
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[21]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -2127,19 +2156,12 @@ func (x *SyncProbesRequest) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SyncProbesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SyncProbesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{20}
|
||||
return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{21}
|
||||
}
|
||||
|
||||
func (x *SyncProbesRequest) GetHost() *v1.Host {
|
||||
func (x *SyncProbesRequest) GetProbesOfHost() *ProbesOfHost {
|
||||
if x != nil {
|
||||
return x.Host
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SyncProbesRequest) GetProbes() []*Probe {
|
||||
if x != nil {
|
||||
return x.Probes
|
||||
return x.ProbesOfHost
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -2159,7 +2181,7 @@ type SyncProbesResponse struct {
|
|||
func (x *SyncProbesResponse) Reset() {
|
||||
*x = SyncProbesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[21]
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[22]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -2172,7 +2194,7 @@ func (x *SyncProbesResponse) String() string {
|
|||
func (*SyncProbesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SyncProbesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[21]
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[22]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -2185,7 +2207,7 @@ func (x *SyncProbesResponse) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SyncProbesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SyncProbesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{21}
|
||||
return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{22}
|
||||
}
|
||||
|
||||
func (x *SyncProbesResponse) GetHosts() []*v1.Host {
|
||||
|
@ -2202,6 +2224,188 @@ func (x *SyncProbesResponse) GetProbeInterval() *durationpb.Duration {
|
|||
return nil
|
||||
}
|
||||
|
||||
// UpdateHostsRequest represents update hosts request of SyncNetworkTopologyRequest.
|
||||
type UpdateHostsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Hosts needs to be updated.
|
||||
ProbesOfHosts []*ProbesOfHost `protobuf:"bytes,1,rep,name=probes_of_hosts,json=probesOfHosts,proto3" json:"probes_of_hosts,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UpdateHostsRequest) Reset() {
|
||||
*x = UpdateHostsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[23]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UpdateHostsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateHostsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateHostsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[23]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateHostsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateHostsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{23}
|
||||
}
|
||||
|
||||
func (x *UpdateHostsRequest) GetProbesOfHosts() []*ProbesOfHost {
|
||||
if x != nil {
|
||||
return x.ProbesOfHosts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeleteHostsRequest represents delete hosts request of SyncNetworkTopologyRequest.
|
||||
type DeleteHostsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Hosts needs to be deleted.
|
||||
ProbesOfHosts []*ProbesOfHost `protobuf:"bytes,1,rep,name=probes_of_hosts,json=probesOfHosts,proto3" json:"probes_of_hosts,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeleteHostsRequest) Reset() {
|
||||
*x = DeleteHostsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[24]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteHostsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteHostsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteHostsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[24]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteHostsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteHostsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{24}
|
||||
}
|
||||
|
||||
func (x *DeleteHostsRequest) GetProbesOfHosts() []*ProbesOfHost {
|
||||
if x != nil {
|
||||
return x.ProbesOfHosts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
type SyncNetworkTopologyRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Request:
|
||||
//
|
||||
// *SyncNetworkTopologyRequest_UpdateProbesOfHostsRequest
|
||||
// *SyncNetworkTopologyRequest_DeleteProbesOfHostsRequest
|
||||
Request isSyncNetworkTopologyRequest_Request `protobuf_oneof:"request"`
|
||||
}
|
||||
|
||||
func (x *SyncNetworkTopologyRequest) Reset() {
|
||||
*x = SyncNetworkTopologyRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[25]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SyncNetworkTopologyRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SyncNetworkTopologyRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SyncNetworkTopologyRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[25]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SyncNetworkTopologyRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SyncNetworkTopologyRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP(), []int{25}
|
||||
}
|
||||
|
||||
func (m *SyncNetworkTopologyRequest) GetRequest() isSyncNetworkTopologyRequest_Request {
|
||||
if m != nil {
|
||||
return m.Request
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SyncNetworkTopologyRequest) GetUpdateProbesOfHostsRequest() *UpdateHostsRequest {
|
||||
if x, ok := x.GetRequest().(*SyncNetworkTopologyRequest_UpdateProbesOfHostsRequest); ok {
|
||||
return x.UpdateProbesOfHostsRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SyncNetworkTopologyRequest) GetDeleteProbesOfHostsRequest() *DeleteHostsRequest {
|
||||
if x, ok := x.GetRequest().(*SyncNetworkTopologyRequest_DeleteProbesOfHostsRequest); ok {
|
||||
return x.DeleteProbesOfHostsRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type isSyncNetworkTopologyRequest_Request interface {
|
||||
isSyncNetworkTopologyRequest_Request()
|
||||
}
|
||||
|
||||
type SyncNetworkTopologyRequest_UpdateProbesOfHostsRequest struct {
|
||||
UpdateProbesOfHostsRequest *UpdateHostsRequest `protobuf:"bytes,1,opt,name=update_probes_of_hosts_request,json=updateProbesOfHostsRequest,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SyncNetworkTopologyRequest_DeleteProbesOfHostsRequest struct {
|
||||
DeleteProbesOfHostsRequest *DeleteHostsRequest `protobuf:"bytes,2,opt,name=delete_probes_of_hosts_request,json=deleteProbesOfHostsRequest,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*SyncNetworkTopologyRequest_UpdateProbesOfHostsRequest) isSyncNetworkTopologyRequest_Request() {
|
||||
}
|
||||
|
||||
func (*SyncNetworkTopologyRequest_DeleteProbesOfHostsRequest) isSyncNetworkTopologyRequest_Request() {
|
||||
}
|
||||
|
||||
type PeerPacket_DestPeer struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -2218,7 +2422,7 @@ type PeerPacket_DestPeer struct {
|
|||
func (x *PeerPacket_DestPeer) Reset() {
|
||||
*x = PeerPacket_DestPeer{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[22]
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[26]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -2231,7 +2435,7 @@ func (x *PeerPacket_DestPeer) String() string {
|
|||
func (*PeerPacket_DestPeer) ProtoMessage() {}
|
||||
|
||||
func (x *PeerPacket_DestPeer) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[22]
|
||||
mi := &file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[26]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -2621,86 +2825,113 @@ var file_pkg_apis_scheduler_v1_scheduler_proto_rawDesc = []byte{
|
|||
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x6f, 0x56,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
|
||||
0x72, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f,
|
||||
0x72, 0x6d, 0x22, 0xeb, 0x02, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x2a, 0x0a, 0x04,
|
||||
0x72, 0x6d, 0x22, 0xaf, 0x01, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x2a, 0x0a, 0x04,
|
||||
0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02,
|
||||
0x10, 0x01, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x72, 0x74, 0x74, 0x73,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x72, 0x74, 0x74,
|
||||
0x73, 0x12, 0x3c, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x74, 0x74, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa,
|
||||
0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x52, 0x74, 0x74, 0x12,
|
||||
0x3c, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x74, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05,
|
||||
0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x52, 0x74, 0x74, 0x12, 0x3c, 0x0a,
|
||||
0x07, 0x61, 0x76, 0x67, 0x5f, 0x72, 0x74, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
|
||||
0x10, 0x01, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x03, 0x72, 0x74, 0x74, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x03, 0x72, 0x74, 0x74, 0x12,
|
||||
0x43, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42,
|
||||
0x08, 0xfa, 0x42, 0x05, 0xb2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x64, 0x41, 0x74, 0x22, 0x70, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66,
|
||||
0x48, 0x6f, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x6f, 0x73, 0x74,
|
||||
0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74,
|
||||
0x12, 0x34, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
|
||||
0x32, 0x10, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x6f,
|
||||
0x62, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01, 0x28, 0x01, 0x52, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x22, 0x5c, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72,
|
||||
0x6f, 0x62, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0e, 0x70,
|
||||
0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e,
|
||||
0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42,
|
||||
0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66,
|
||||
0x48, 0x6f, 0x73, 0x74, 0x22, 0x90, 0x01, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f,
|
||||
0x62, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x68,
|
||||
0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04,
|
||||
0x08, 0x01, 0x28, 0x01, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x0e, 0x70,
|
||||
0x72, 0x6f, 0x62, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08,
|
||||
0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x49,
|
||||
0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x5f, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x49, 0x0a,
|
||||
0x0f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73,
|
||||
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
|
||||
0x65, 0x72, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x42,
|
||||
0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x62, 0x65,
|
||||
0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x22, 0x5f, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x49,
|
||||
0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73, 0x74,
|
||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74,
|
||||
0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x62,
|
||||
0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x22, 0xf6, 0x01, 0x0a, 0x1a, 0x53, 0x79,
|
||||
0x6e, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67,
|
||||
0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x63, 0x0a, 0x1e, 0x75, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73,
|
||||
0x74, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x1d, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48,
|
||||
0x00, 0x52, 0x1a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f,
|
||||
0x66, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x63, 0x0a,
|
||||
0x1e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f,
|
||||
0x66, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65,
|
||||
0x72, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x1a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72,
|
||||
0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x03, 0xf8,
|
||||
0x42, 0x01, 0x32, 0xcf, 0x05, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72,
|
||||
0x12, 0x49, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72,
|
||||
0x54, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72,
|
||||
0x2e, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x19, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67,
|
||||
0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x52,
|
||||
0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
|
||||
0x12, 0x16, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x69, 0x65,
|
||||
0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x28,
|
||||
0x01, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x65, 0x65,
|
||||
0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x16,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01,
|
||||
0x02, 0x08, 0x01, 0x52, 0x06, 0x61, 0x76, 0x67, 0x52, 0x74, 0x74, 0x12, 0x43, 0x0a, 0x0a, 0x75,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xfa, 0x42, 0x05,
|
||||
0xb2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74,
|
||||
0x22, 0x75, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x6f, 0x73,
|
||||
0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x68, 0x6f, 0x73,
|
||||
0x74, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x10, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x72,
|
||||
0x6f, 0x62, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92, 0x01, 0x04, 0x08, 0x01, 0x28, 0x01, 0x52,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x22, 0x90, 0x01, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63,
|
||||
0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e,
|
||||
0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e,
|
||||
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x0a, 0xfa, 0x42, 0x07,
|
||||
0x92, 0x01, 0x04, 0x08, 0x01, 0x28, 0x01, 0x52, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x4a,
|
||||
0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f,
|
||||
0x62, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x32, 0xf7, 0x04, 0x0a, 0x09, 0x53,
|
||||
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69,
|
||||
0x73, 0x74, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x2e, 0x73,
|
||||
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x73,
|
||||
0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73,
|
||||
0x75, 0x6c, 0x74, 0x12, 0x46, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x69, 0x65,
|
||||
0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x16, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x69, 0x65, 0x63, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
|
||||
0x1a, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65,
|
||||
0x72, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x10, 0x52,
|
||||
0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12,
|
||||
0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72,
|
||||
0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x46,
|
||||
0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e,
|
||||
0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75,
|
||||
0x6e, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x37, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x12, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x53,
|
||||
0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f,
|
||||
0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x12,
|
||||
0x3a, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x15, 0x2e, 0x73,
|
||||
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x72,
|
||||
0x67, 0x65, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x46, 0x0a, 0x0c, 0x41,
|
||||
0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x73, 0x63,
|
||||
0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65,
|
||||
0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
|
||||
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x46, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e,
|
||||
0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
|
||||
0x65, 0x72, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x37,
|
||||
0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x2e, 0x73, 0x63, 0x68,
|
||||
0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
|
||||
0x65, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x3a, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65,
|
||||
0x54, 0x61, 0x73, 0x6b, 0x12, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72,
|
||||
0x2e, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
|
||||
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
|
||||
0x70, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74,
|
||||
0x12, 0x1b, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4c, 0x65, 0x61,
|
||||
0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
||||
0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4d, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f,
|
||||
0x62, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e,
|
||||
0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x79,
|
||||
0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x28, 0x01, 0x30, 0x01, 0x42, 0x2c, 0x5a, 0x2a, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61,
|
||||
0x70, 0x74, 0x79, 0x12, 0x46, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48,
|
||||
0x6f, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e,
|
||||
0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x40, 0x0a, 0x09, 0x4c,
|
||||
0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x72, 0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4d, 0x0a,
|
||||
0x0a, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x73, 0x63,
|
||||
0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62,
|
||||
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x63, 0x68, 0x65,
|
||||
0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x13,
|
||||
0x53, 0x79, 0x6e, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x6f, 0x70, 0x6f, 0x6c,
|
||||
0x6f, 0x67, 0x79, 0x12, 0x25, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e,
|
||||
0x53, 0x79, 0x6e, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x6f, 0x70, 0x6f, 0x6c,
|
||||
0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
|
||||
0x74, 0x79, 0x28, 0x01, 0x42, 0x2c, 0x5a, 0x2a, 0x64, 0x37, 0x79, 0x2e, 0x69, 0x6f, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x73, 0x63, 0x68, 0x65,
|
||||
0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
|
||||
0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
|
@ -2718,105 +2949,113 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_rawDescGZIP() []byte {
|
|||
return file_pkg_apis_scheduler_v1_scheduler_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
|
||||
var file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes = make([]protoimpl.MessageInfo, 27)
|
||||
var file_pkg_apis_scheduler_v1_scheduler_proto_goTypes = []interface{}{
|
||||
(*PeerTaskRequest)(nil), // 0: scheduler.PeerTaskRequest
|
||||
(*RegisterResult)(nil), // 1: scheduler.RegisterResult
|
||||
(*SinglePiece)(nil), // 2: scheduler.SinglePiece
|
||||
(*PeerHost)(nil), // 3: scheduler.PeerHost
|
||||
(*PieceResult)(nil), // 4: scheduler.PieceResult
|
||||
(*PeerPacket)(nil), // 5: scheduler.PeerPacket
|
||||
(*PeerResult)(nil), // 6: scheduler.PeerResult
|
||||
(*AnnounceTaskRequest)(nil), // 7: scheduler.AnnounceTaskRequest
|
||||
(*StatTaskRequest)(nil), // 8: scheduler.StatTaskRequest
|
||||
(*Task)(nil), // 9: scheduler.Task
|
||||
(*PeerTarget)(nil), // 10: scheduler.PeerTarget
|
||||
(*LeaveHostRequest)(nil), // 11: scheduler.LeaveHostRequest
|
||||
(*AnnounceHostRequest)(nil), // 12: scheduler.AnnounceHostRequest
|
||||
(*CPU)(nil), // 13: scheduler.CPU
|
||||
(*CPUTimes)(nil), // 14: scheduler.CPUTimes
|
||||
(*Memory)(nil), // 15: scheduler.Memory
|
||||
(*Network)(nil), // 16: scheduler.Network
|
||||
(*Disk)(nil), // 17: scheduler.Disk
|
||||
(*Build)(nil), // 18: scheduler.Build
|
||||
(*Probe)(nil), // 19: scheduler.Probe
|
||||
(*SyncProbesRequest)(nil), // 20: scheduler.SyncProbesRequest
|
||||
(*SyncProbesResponse)(nil), // 21: scheduler.SyncProbesResponse
|
||||
(*PeerPacket_DestPeer)(nil), // 22: scheduler.PeerPacket.DestPeer
|
||||
(*v1.UrlMeta)(nil), // 23: common.UrlMeta
|
||||
(v1.TaskType)(0), // 24: common.TaskType
|
||||
(v1.SizeScope)(0), // 25: common.SizeScope
|
||||
(*v1.ExtendAttribute)(nil), // 26: common.ExtendAttribute
|
||||
(*v1.PieceInfo)(nil), // 27: common.PieceInfo
|
||||
(v1.Code)(0), // 28: common.Code
|
||||
(*v11.SourceError)(nil), // 29: errordetails.SourceError
|
||||
(*v1.PiecePacket)(nil), // 30: common.PiecePacket
|
||||
(*v1.Host)(nil), // 31: common.Host
|
||||
(*durationpb.Duration)(nil), // 32: google.protobuf.Duration
|
||||
(*timestamppb.Timestamp)(nil), // 33: google.protobuf.Timestamp
|
||||
(*emptypb.Empty)(nil), // 34: google.protobuf.Empty
|
||||
(*PeerTaskRequest)(nil), // 0: scheduler.PeerTaskRequest
|
||||
(*RegisterResult)(nil), // 1: scheduler.RegisterResult
|
||||
(*SinglePiece)(nil), // 2: scheduler.SinglePiece
|
||||
(*PeerHost)(nil), // 3: scheduler.PeerHost
|
||||
(*PieceResult)(nil), // 4: scheduler.PieceResult
|
||||
(*PeerPacket)(nil), // 5: scheduler.PeerPacket
|
||||
(*PeerResult)(nil), // 6: scheduler.PeerResult
|
||||
(*AnnounceTaskRequest)(nil), // 7: scheduler.AnnounceTaskRequest
|
||||
(*StatTaskRequest)(nil), // 8: scheduler.StatTaskRequest
|
||||
(*Task)(nil), // 9: scheduler.Task
|
||||
(*PeerTarget)(nil), // 10: scheduler.PeerTarget
|
||||
(*LeaveHostRequest)(nil), // 11: scheduler.LeaveHostRequest
|
||||
(*AnnounceHostRequest)(nil), // 12: scheduler.AnnounceHostRequest
|
||||
(*CPU)(nil), // 13: scheduler.CPU
|
||||
(*CPUTimes)(nil), // 14: scheduler.CPUTimes
|
||||
(*Memory)(nil), // 15: scheduler.Memory
|
||||
(*Network)(nil), // 16: scheduler.Network
|
||||
(*Disk)(nil), // 17: scheduler.Disk
|
||||
(*Build)(nil), // 18: scheduler.Build
|
||||
(*Probe)(nil), // 19: scheduler.Probe
|
||||
(*ProbesOfHost)(nil), // 20: scheduler.ProbesOfHost
|
||||
(*SyncProbesRequest)(nil), // 21: scheduler.SyncProbesRequest
|
||||
(*SyncProbesResponse)(nil), // 22: scheduler.SyncProbesResponse
|
||||
(*UpdateHostsRequest)(nil), // 23: scheduler.UpdateHostsRequest
|
||||
(*DeleteHostsRequest)(nil), // 24: scheduler.DeleteHostsRequest
|
||||
(*SyncNetworkTopologyRequest)(nil), // 25: scheduler.SyncNetworkTopologyRequest
|
||||
(*PeerPacket_DestPeer)(nil), // 26: scheduler.PeerPacket.DestPeer
|
||||
(*v1.UrlMeta)(nil), // 27: common.UrlMeta
|
||||
(v1.TaskType)(0), // 28: common.TaskType
|
||||
(v1.SizeScope)(0), // 29: common.SizeScope
|
||||
(*v1.ExtendAttribute)(nil), // 30: common.ExtendAttribute
|
||||
(*v1.PieceInfo)(nil), // 31: common.PieceInfo
|
||||
(v1.Code)(0), // 32: common.Code
|
||||
(*v11.SourceError)(nil), // 33: errordetails.SourceError
|
||||
(*v1.PiecePacket)(nil), // 34: common.PiecePacket
|
||||
(*v1.Host)(nil), // 35: common.Host
|
||||
(*durationpb.Duration)(nil), // 36: google.protobuf.Duration
|
||||
(*timestamppb.Timestamp)(nil), // 37: google.protobuf.Timestamp
|
||||
(*emptypb.Empty)(nil), // 38: google.protobuf.Empty
|
||||
}
|
||||
var file_pkg_apis_scheduler_v1_scheduler_proto_depIdxs = []int32{
|
||||
23, // 0: scheduler.PeerTaskRequest.url_meta:type_name -> common.UrlMeta
|
||||
27, // 0: scheduler.PeerTaskRequest.url_meta:type_name -> common.UrlMeta
|
||||
3, // 1: scheduler.PeerTaskRequest.peer_host:type_name -> scheduler.PeerHost
|
||||
24, // 2: scheduler.RegisterResult.task_type:type_name -> common.TaskType
|
||||
25, // 3: scheduler.RegisterResult.size_scope:type_name -> common.SizeScope
|
||||
28, // 2: scheduler.RegisterResult.task_type:type_name -> common.TaskType
|
||||
29, // 3: scheduler.RegisterResult.size_scope:type_name -> common.SizeScope
|
||||
2, // 4: scheduler.RegisterResult.single_piece:type_name -> scheduler.SinglePiece
|
||||
26, // 5: scheduler.RegisterResult.extend_attribute:type_name -> common.ExtendAttribute
|
||||
27, // 6: scheduler.SinglePiece.piece_info:type_name -> common.PieceInfo
|
||||
27, // 7: scheduler.PieceResult.piece_info:type_name -> common.PieceInfo
|
||||
28, // 8: scheduler.PieceResult.code:type_name -> common.Code
|
||||
26, // 9: scheduler.PieceResult.extend_attribute:type_name -> common.ExtendAttribute
|
||||
22, // 10: scheduler.PeerPacket.main_peer:type_name -> scheduler.PeerPacket.DestPeer
|
||||
22, // 11: scheduler.PeerPacket.candidate_peers:type_name -> scheduler.PeerPacket.DestPeer
|
||||
28, // 12: scheduler.PeerPacket.code:type_name -> common.Code
|
||||
29, // 13: scheduler.PeerPacket.source_error:type_name -> errordetails.SourceError
|
||||
28, // 14: scheduler.PeerResult.code:type_name -> common.Code
|
||||
29, // 15: scheduler.PeerResult.source_error:type_name -> errordetails.SourceError
|
||||
23, // 16: scheduler.AnnounceTaskRequest.url_meta:type_name -> common.UrlMeta
|
||||
30, // 5: scheduler.RegisterResult.extend_attribute:type_name -> common.ExtendAttribute
|
||||
31, // 6: scheduler.SinglePiece.piece_info:type_name -> common.PieceInfo
|
||||
31, // 7: scheduler.PieceResult.piece_info:type_name -> common.PieceInfo
|
||||
32, // 8: scheduler.PieceResult.code:type_name -> common.Code
|
||||
30, // 9: scheduler.PieceResult.extend_attribute:type_name -> common.ExtendAttribute
|
||||
26, // 10: scheduler.PeerPacket.main_peer:type_name -> scheduler.PeerPacket.DestPeer
|
||||
26, // 11: scheduler.PeerPacket.candidate_peers:type_name -> scheduler.PeerPacket.DestPeer
|
||||
32, // 12: scheduler.PeerPacket.code:type_name -> common.Code
|
||||
33, // 13: scheduler.PeerPacket.source_error:type_name -> errordetails.SourceError
|
||||
32, // 14: scheduler.PeerResult.code:type_name -> common.Code
|
||||
33, // 15: scheduler.PeerResult.source_error:type_name -> errordetails.SourceError
|
||||
27, // 16: scheduler.AnnounceTaskRequest.url_meta:type_name -> common.UrlMeta
|
||||
3, // 17: scheduler.AnnounceTaskRequest.peer_host:type_name -> scheduler.PeerHost
|
||||
30, // 18: scheduler.AnnounceTaskRequest.piece_packet:type_name -> common.PiecePacket
|
||||
24, // 19: scheduler.AnnounceTaskRequest.task_type:type_name -> common.TaskType
|
||||
24, // 20: scheduler.Task.type:type_name -> common.TaskType
|
||||
34, // 18: scheduler.AnnounceTaskRequest.piece_packet:type_name -> common.PiecePacket
|
||||
28, // 19: scheduler.AnnounceTaskRequest.task_type:type_name -> common.TaskType
|
||||
28, // 20: scheduler.Task.type:type_name -> common.TaskType
|
||||
13, // 21: scheduler.AnnounceHostRequest.cpu:type_name -> scheduler.CPU
|
||||
15, // 22: scheduler.AnnounceHostRequest.memory:type_name -> scheduler.Memory
|
||||
16, // 23: scheduler.AnnounceHostRequest.network:type_name -> scheduler.Network
|
||||
17, // 24: scheduler.AnnounceHostRequest.disk:type_name -> scheduler.Disk
|
||||
18, // 25: scheduler.AnnounceHostRequest.build:type_name -> scheduler.Build
|
||||
14, // 26: scheduler.CPU.times:type_name -> scheduler.CPUTimes
|
||||
31, // 27: scheduler.Probe.host:type_name -> common.Host
|
||||
32, // 28: scheduler.Probe.rtts:type_name -> google.protobuf.Duration
|
||||
32, // 29: scheduler.Probe.min_rtt:type_name -> google.protobuf.Duration
|
||||
32, // 30: scheduler.Probe.max_rtt:type_name -> google.protobuf.Duration
|
||||
32, // 31: scheduler.Probe.avg_rtt:type_name -> google.protobuf.Duration
|
||||
33, // 32: scheduler.Probe.updated_at:type_name -> google.protobuf.Timestamp
|
||||
31, // 33: scheduler.SyncProbesRequest.host:type_name -> common.Host
|
||||
19, // 34: scheduler.SyncProbesRequest.probes:type_name -> scheduler.Probe
|
||||
31, // 35: scheduler.SyncProbesResponse.hosts:type_name -> common.Host
|
||||
32, // 36: scheduler.SyncProbesResponse.probe_interval:type_name -> google.protobuf.Duration
|
||||
0, // 37: scheduler.Scheduler.RegisterPeerTask:input_type -> scheduler.PeerTaskRequest
|
||||
4, // 38: scheduler.Scheduler.ReportPieceResult:input_type -> scheduler.PieceResult
|
||||
6, // 39: scheduler.Scheduler.ReportPeerResult:input_type -> scheduler.PeerResult
|
||||
7, // 40: scheduler.Scheduler.AnnounceTask:input_type -> scheduler.AnnounceTaskRequest
|
||||
8, // 41: scheduler.Scheduler.StatTask:input_type -> scheduler.StatTaskRequest
|
||||
10, // 42: scheduler.Scheduler.LeaveTask:input_type -> scheduler.PeerTarget
|
||||
12, // 43: scheduler.Scheduler.AnnounceHost:input_type -> scheduler.AnnounceHostRequest
|
||||
11, // 44: scheduler.Scheduler.LeaveHost:input_type -> scheduler.LeaveHostRequest
|
||||
20, // 45: scheduler.Scheduler.SyncProbes:input_type -> scheduler.SyncProbesRequest
|
||||
1, // 46: scheduler.Scheduler.RegisterPeerTask:output_type -> scheduler.RegisterResult
|
||||
5, // 47: scheduler.Scheduler.ReportPieceResult:output_type -> scheduler.PeerPacket
|
||||
34, // 48: scheduler.Scheduler.ReportPeerResult:output_type -> google.protobuf.Empty
|
||||
34, // 49: scheduler.Scheduler.AnnounceTask:output_type -> google.protobuf.Empty
|
||||
9, // 50: scheduler.Scheduler.StatTask:output_type -> scheduler.Task
|
||||
34, // 51: scheduler.Scheduler.LeaveTask:output_type -> google.protobuf.Empty
|
||||
34, // 52: scheduler.Scheduler.AnnounceHost:output_type -> google.protobuf.Empty
|
||||
34, // 53: scheduler.Scheduler.LeaveHost:output_type -> google.protobuf.Empty
|
||||
21, // 54: scheduler.Scheduler.SyncProbes:output_type -> scheduler.SyncProbesResponse
|
||||
46, // [46:55] is the sub-list for method output_type
|
||||
37, // [37:46] is the sub-list for method input_type
|
||||
37, // [37:37] is the sub-list for extension type_name
|
||||
37, // [37:37] is the sub-list for extension extendee
|
||||
0, // [0:37] is the sub-list for field type_name
|
||||
35, // 27: scheduler.Probe.host:type_name -> common.Host
|
||||
36, // 28: scheduler.Probe.rtt:type_name -> google.protobuf.Duration
|
||||
37, // 29: scheduler.Probe.updated_at:type_name -> google.protobuf.Timestamp
|
||||
35, // 30: scheduler.ProbesOfHost.host:type_name -> common.Host
|
||||
19, // 31: scheduler.ProbesOfHost.probes:type_name -> scheduler.Probe
|
||||
20, // 32: scheduler.SyncProbesRequest.probes_of_host:type_name -> scheduler.ProbesOfHost
|
||||
35, // 33: scheduler.SyncProbesResponse.hosts:type_name -> common.Host
|
||||
36, // 34: scheduler.SyncProbesResponse.probe_interval:type_name -> google.protobuf.Duration
|
||||
20, // 35: scheduler.UpdateHostsRequest.probes_of_hosts:type_name -> scheduler.ProbesOfHost
|
||||
20, // 36: scheduler.DeleteHostsRequest.probes_of_hosts:type_name -> scheduler.ProbesOfHost
|
||||
23, // 37: scheduler.SyncNetworkTopologyRequest.update_probes_of_hosts_request:type_name -> scheduler.UpdateHostsRequest
|
||||
24, // 38: scheduler.SyncNetworkTopologyRequest.delete_probes_of_hosts_request:type_name -> scheduler.DeleteHostsRequest
|
||||
0, // 39: scheduler.Scheduler.RegisterPeerTask:input_type -> scheduler.PeerTaskRequest
|
||||
4, // 40: scheduler.Scheduler.ReportPieceResult:input_type -> scheduler.PieceResult
|
||||
6, // 41: scheduler.Scheduler.ReportPeerResult:input_type -> scheduler.PeerResult
|
||||
7, // 42: scheduler.Scheduler.AnnounceTask:input_type -> scheduler.AnnounceTaskRequest
|
||||
8, // 43: scheduler.Scheduler.StatTask:input_type -> scheduler.StatTaskRequest
|
||||
10, // 44: scheduler.Scheduler.LeaveTask:input_type -> scheduler.PeerTarget
|
||||
12, // 45: scheduler.Scheduler.AnnounceHost:input_type -> scheduler.AnnounceHostRequest
|
||||
11, // 46: scheduler.Scheduler.LeaveHost:input_type -> scheduler.LeaveHostRequest
|
||||
21, // 47: scheduler.Scheduler.SyncProbes:input_type -> scheduler.SyncProbesRequest
|
||||
25, // 48: scheduler.Scheduler.SyncNetworkTopology:input_type -> scheduler.SyncNetworkTopologyRequest
|
||||
1, // 49: scheduler.Scheduler.RegisterPeerTask:output_type -> scheduler.RegisterResult
|
||||
5, // 50: scheduler.Scheduler.ReportPieceResult:output_type -> scheduler.PeerPacket
|
||||
38, // 51: scheduler.Scheduler.ReportPeerResult:output_type -> google.protobuf.Empty
|
||||
38, // 52: scheduler.Scheduler.AnnounceTask:output_type -> google.protobuf.Empty
|
||||
9, // 53: scheduler.Scheduler.StatTask:output_type -> scheduler.Task
|
||||
38, // 54: scheduler.Scheduler.LeaveTask:output_type -> google.protobuf.Empty
|
||||
38, // 55: scheduler.Scheduler.AnnounceHost:output_type -> google.protobuf.Empty
|
||||
38, // 56: scheduler.Scheduler.LeaveHost:output_type -> google.protobuf.Empty
|
||||
22, // 57: scheduler.Scheduler.SyncProbes:output_type -> scheduler.SyncProbesResponse
|
||||
38, // 58: scheduler.Scheduler.SyncNetworkTopology:output_type -> google.protobuf.Empty
|
||||
49, // [49:59] is the sub-list for method output_type
|
||||
39, // [39:49] is the sub-list for method input_type
|
||||
39, // [39:39] is the sub-list for extension type_name
|
||||
39, // [39:39] is the sub-list for extension extendee
|
||||
0, // [0:39] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_pkg_apis_scheduler_v1_scheduler_proto_init() }
|
||||
|
@ -3066,7 +3305,7 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() {
|
|||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SyncProbesRequest); i {
|
||||
switch v := v.(*ProbesOfHost); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -3078,7 +3317,7 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() {
|
|||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SyncProbesResponse); i {
|
||||
switch v := v.(*SyncProbesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -3090,6 +3329,54 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() {
|
|||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SyncProbesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateHostsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteHostsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SyncNetworkTopologyRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*PeerPacket_DestPeer); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3112,13 +3399,17 @@ func file_pkg_apis_scheduler_v1_scheduler_proto_init() {
|
|||
file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[6].OneofWrappers = []interface{}{
|
||||
(*PeerResult_SourceError)(nil),
|
||||
}
|
||||
file_pkg_apis_scheduler_v1_scheduler_proto_msgTypes[25].OneofWrappers = []interface{}{
|
||||
(*SyncNetworkTopologyRequest_UpdateProbesOfHostsRequest)(nil),
|
||||
(*SyncNetworkTopologyRequest_DeleteProbesOfHostsRequest)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_pkg_apis_scheduler_v1_scheduler_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 23,
|
||||
NumMessages: 27,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
|
|
@ -3496,76 +3496,9 @@ func (m *Probe) validate(all bool) error {
|
|||
}
|
||||
}
|
||||
|
||||
if len(m.GetRtts()) < 1 {
|
||||
if m.GetRtt() == nil {
|
||||
err := ProbeValidationError{
|
||||
field: "Rtts",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
for idx, item := range m.GetRtts() {
|
||||
_, _ = idx, item
|
||||
|
||||
if all {
|
||||
switch v := interface{}(item).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, ProbeValidationError{
|
||||
field: fmt.Sprintf("Rtts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, ProbeValidationError{
|
||||
field: fmt.Sprintf("Rtts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return ProbeValidationError{
|
||||
field: fmt.Sprintf("Rtts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if m.GetMinRtt() == nil {
|
||||
err := ProbeValidationError{
|
||||
field: "MinRtt",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if m.GetMaxRtt() == nil {
|
||||
err := ProbeValidationError{
|
||||
field: "MaxRtt",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if m.GetAvgRtt() == nil {
|
||||
err := ProbeValidationError{
|
||||
field: "AvgRtt",
|
||||
field: "Rtt",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
|
@ -3662,6 +3595,194 @@ var _ interface {
|
|||
ErrorName() string
|
||||
} = ProbeValidationError{}
|
||||
|
||||
// Validate checks the field values on ProbesOfHost with the rules defined in
|
||||
// the proto definition for this message. If any rules are violated, the first
|
||||
// error encountered is returned, or nil if there are no violations.
|
||||
func (m *ProbesOfHost) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on ProbesOfHost with the rules defined
|
||||
// in the proto definition for this message. If any rules are violated, the
|
||||
// result is a list of violation errors wrapped in ProbesOfHostMultiError, or
|
||||
// nil if none found.
|
||||
func (m *ProbesOfHost) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *ProbesOfHost) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
if m.GetHost() == nil {
|
||||
err := ProbesOfHostValidationError{
|
||||
field: "Host",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if all {
|
||||
switch v := interface{}(m.GetHost()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, ProbesOfHostValidationError{
|
||||
field: "Host",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, ProbesOfHostValidationError{
|
||||
field: "Host",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return ProbesOfHostValidationError{
|
||||
field: "Host",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(m.GetProbes()) > 0 {
|
||||
|
||||
if len(m.GetProbes()) < 1 {
|
||||
err := ProbesOfHostValidationError{
|
||||
field: "Probes",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
for idx, item := range m.GetProbes() {
|
||||
_, _ = idx, item
|
||||
|
||||
if all {
|
||||
switch v := interface{}(item).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, ProbesOfHostValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, ProbesOfHostValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return ProbesOfHostValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return ProbesOfHostMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ProbesOfHostMultiError is an error wrapping multiple validation errors
|
||||
// returned by ProbesOfHost.ValidateAll() if the designated constraints aren't met.
|
||||
type ProbesOfHostMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m ProbesOfHostMultiError) Error() string {
|
||||
var msgs []string
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m ProbesOfHostMultiError) AllErrors() []error { return m }
|
||||
|
||||
// ProbesOfHostValidationError is the validation error returned by
|
||||
// ProbesOfHost.Validate if the designated constraints aren't met.
|
||||
type ProbesOfHostValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e ProbesOfHostValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e ProbesOfHostValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e ProbesOfHostValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e ProbesOfHostValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e ProbesOfHostValidationError) ErrorName() string { return "ProbesOfHostValidationError" }
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e ProbesOfHostValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sProbesOfHost.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = ProbesOfHostValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = ProbesOfHostValidationError{}
|
||||
|
||||
// Validate checks the field values on SyncProbesRequest with the rules defined
|
||||
// in the proto definition for this message. If any rules are violated, the
|
||||
// first error encountered is returned, or nil if there are no violations.
|
||||
|
@ -3684,9 +3805,9 @@ func (m *SyncProbesRequest) validate(all bool) error {
|
|||
|
||||
var errors []error
|
||||
|
||||
if m.GetHost() == nil {
|
||||
if m.GetProbesOfHost() == nil {
|
||||
err := SyncProbesRequestValidationError{
|
||||
field: "Host",
|
||||
field: "ProbesOfHost",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
|
@ -3696,11 +3817,11 @@ func (m *SyncProbesRequest) validate(all bool) error {
|
|||
}
|
||||
|
||||
if all {
|
||||
switch v := interface{}(m.GetHost()).(type) {
|
||||
switch v := interface{}(m.GetProbesOfHost()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, SyncProbesRequestValidationError{
|
||||
field: "Host",
|
||||
field: "ProbesOfHost",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
|
@ -3708,71 +3829,22 @@ func (m *SyncProbesRequest) validate(all bool) error {
|
|||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, SyncProbesRequestValidationError{
|
||||
field: "Host",
|
||||
field: "ProbesOfHost",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok {
|
||||
} else if v, ok := interface{}(m.GetProbesOfHost()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return SyncProbesRequestValidationError{
|
||||
field: "Host",
|
||||
field: "ProbesOfHost",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(m.GetProbes()) > 0 {
|
||||
|
||||
if len(m.GetProbes()) < 1 {
|
||||
err := SyncProbesRequestValidationError{
|
||||
field: "Probes",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
for idx, item := range m.GetProbes() {
|
||||
_, _ = idx, item
|
||||
|
||||
if all {
|
||||
switch v := interface{}(item).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, SyncProbesRequestValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, SyncProbesRequestValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return SyncProbesRequestValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return SyncProbesRequestMultiError(errors)
|
||||
}
|
||||
|
@ -4015,6 +4087,502 @@ var _ interface {
|
|||
ErrorName() string
|
||||
} = SyncProbesResponseValidationError{}
|
||||
|
||||
// Validate checks the field values on UpdateHostsRequest with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the first error encountered is returned, or nil if there are no violations.
|
||||
func (m *UpdateHostsRequest) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on UpdateHostsRequest with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the result is a list of violation errors wrapped in
|
||||
// UpdateHostsRequestMultiError, or nil if none found.
|
||||
func (m *UpdateHostsRequest) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *UpdateHostsRequest) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
if len(m.GetProbesOfHosts()) < 1 {
|
||||
err := UpdateHostsRequestValidationError{
|
||||
field: "ProbesOfHosts",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
for idx, item := range m.GetProbesOfHosts() {
|
||||
_, _ = idx, item
|
||||
|
||||
if all {
|
||||
switch v := interface{}(item).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, UpdateHostsRequestValidationError{
|
||||
field: fmt.Sprintf("ProbesOfHosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, UpdateHostsRequestValidationError{
|
||||
field: fmt.Sprintf("ProbesOfHosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return UpdateHostsRequestValidationError{
|
||||
field: fmt.Sprintf("ProbesOfHosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return UpdateHostsRequestMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// UpdateHostsRequestMultiError is an error wrapping multiple validation errors
|
||||
// returned by UpdateHostsRequest.ValidateAll() if the designated constraints
|
||||
// aren't met.
|
||||
type UpdateHostsRequestMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m UpdateHostsRequestMultiError) Error() string {
|
||||
var msgs []string
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m UpdateHostsRequestMultiError) AllErrors() []error { return m }
|
||||
|
||||
// UpdateHostsRequestValidationError is the validation error returned by
|
||||
// UpdateHostsRequest.Validate if the designated constraints aren't met.
|
||||
type UpdateHostsRequestValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e UpdateHostsRequestValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e UpdateHostsRequestValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e UpdateHostsRequestValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e UpdateHostsRequestValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e UpdateHostsRequestValidationError) ErrorName() string {
|
||||
return "UpdateHostsRequestValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e UpdateHostsRequestValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sUpdateHostsRequest.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = UpdateHostsRequestValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = UpdateHostsRequestValidationError{}
|
||||
|
||||
// Validate checks the field values on DeleteHostsRequest with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the first error encountered is returned, or nil if there are no violations.
|
||||
func (m *DeleteHostsRequest) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on DeleteHostsRequest with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the result is a list of violation errors wrapped in
|
||||
// DeleteHostsRequestMultiError, or nil if none found.
|
||||
func (m *DeleteHostsRequest) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *DeleteHostsRequest) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
if len(m.GetProbesOfHosts()) < 1 {
|
||||
err := DeleteHostsRequestValidationError{
|
||||
field: "ProbesOfHosts",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
for idx, item := range m.GetProbesOfHosts() {
|
||||
_, _ = idx, item
|
||||
|
||||
if all {
|
||||
switch v := interface{}(item).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, DeleteHostsRequestValidationError{
|
||||
field: fmt.Sprintf("ProbesOfHosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, DeleteHostsRequestValidationError{
|
||||
field: fmt.Sprintf("ProbesOfHosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return DeleteHostsRequestValidationError{
|
||||
field: fmt.Sprintf("ProbesOfHosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return DeleteHostsRequestMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeleteHostsRequestMultiError is an error wrapping multiple validation errors
|
||||
// returned by DeleteHostsRequest.ValidateAll() if the designated constraints
|
||||
// aren't met.
|
||||
type DeleteHostsRequestMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m DeleteHostsRequestMultiError) Error() string {
|
||||
var msgs []string
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m DeleteHostsRequestMultiError) AllErrors() []error { return m }
|
||||
|
||||
// DeleteHostsRequestValidationError is the validation error returned by
|
||||
// DeleteHostsRequest.Validate if the designated constraints aren't met.
|
||||
type DeleteHostsRequestValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e DeleteHostsRequestValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e DeleteHostsRequestValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e DeleteHostsRequestValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e DeleteHostsRequestValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e DeleteHostsRequestValidationError) ErrorName() string {
|
||||
return "DeleteHostsRequestValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e DeleteHostsRequestValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sDeleteHostsRequest.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = DeleteHostsRequestValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = DeleteHostsRequestValidationError{}
|
||||
|
||||
// Validate checks the field values on SyncNetworkTopologyRequest with the
|
||||
// rules defined in the proto definition for this message. If any rules are
|
||||
// violated, the first error encountered is returned, or nil if there are no violations.
|
||||
func (m *SyncNetworkTopologyRequest) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on SyncNetworkTopologyRequest with the
|
||||
// rules defined in the proto definition for this message. If any rules are
|
||||
// violated, the result is a list of violation errors wrapped in
|
||||
// SyncNetworkTopologyRequestMultiError, or nil if none found.
|
||||
func (m *SyncNetworkTopologyRequest) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *SyncNetworkTopologyRequest) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
oneofRequestPresent := false
|
||||
switch v := m.Request.(type) {
|
||||
case *SyncNetworkTopologyRequest_UpdateProbesOfHostsRequest:
|
||||
if v == nil {
|
||||
err := SyncNetworkTopologyRequestValidationError{
|
||||
field: "Request",
|
||||
reason: "oneof value cannot be a typed-nil",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
oneofRequestPresent = true
|
||||
|
||||
if all {
|
||||
switch v := interface{}(m.GetUpdateProbesOfHostsRequest()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, SyncNetworkTopologyRequestValidationError{
|
||||
field: "UpdateProbesOfHostsRequest",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, SyncNetworkTopologyRequestValidationError{
|
||||
field: "UpdateProbesOfHostsRequest",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetUpdateProbesOfHostsRequest()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return SyncNetworkTopologyRequestValidationError{
|
||||
field: "UpdateProbesOfHostsRequest",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
case *SyncNetworkTopologyRequest_DeleteProbesOfHostsRequest:
|
||||
if v == nil {
|
||||
err := SyncNetworkTopologyRequestValidationError{
|
||||
field: "Request",
|
||||
reason: "oneof value cannot be a typed-nil",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
oneofRequestPresent = true
|
||||
|
||||
if all {
|
||||
switch v := interface{}(m.GetDeleteProbesOfHostsRequest()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, SyncNetworkTopologyRequestValidationError{
|
||||
field: "DeleteProbesOfHostsRequest",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, SyncNetworkTopologyRequestValidationError{
|
||||
field: "DeleteProbesOfHostsRequest",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetDeleteProbesOfHostsRequest()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return SyncNetworkTopologyRequestValidationError{
|
||||
field: "DeleteProbesOfHostsRequest",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
_ = v // ensures v is used
|
||||
}
|
||||
if !oneofRequestPresent {
|
||||
err := SyncNetworkTopologyRequestValidationError{
|
||||
field: "Request",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return SyncNetworkTopologyRequestMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SyncNetworkTopologyRequestMultiError is an error wrapping multiple
|
||||
// validation errors returned by SyncNetworkTopologyRequest.ValidateAll() if
|
||||
// the designated constraints aren't met.
|
||||
type SyncNetworkTopologyRequestMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m SyncNetworkTopologyRequestMultiError) Error() string {
|
||||
var msgs []string
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m SyncNetworkTopologyRequestMultiError) AllErrors() []error { return m }
|
||||
|
||||
// SyncNetworkTopologyRequestValidationError is the validation error returned
|
||||
// by SyncNetworkTopologyRequest.Validate if the designated constraints aren't met.
|
||||
type SyncNetworkTopologyRequestValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e SyncNetworkTopologyRequestValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e SyncNetworkTopologyRequestValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e SyncNetworkTopologyRequestValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e SyncNetworkTopologyRequestValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e SyncNetworkTopologyRequestValidationError) ErrorName() string {
|
||||
return "SyncNetworkTopologyRequestValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e SyncNetworkTopologyRequestValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sSyncNetworkTopologyRequest.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = SyncNetworkTopologyRequestValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = SyncNetworkTopologyRequestValidationError{}
|
||||
|
||||
// Validate checks the field values on PeerPacket_DestPeer with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the first error encountered is returned, or nil if there are no violations.
|
||||
|
|
|
@ -376,26 +376,26 @@ message Build {
|
|||
message Probe {
|
||||
// Host metadata.
|
||||
common.Host host = 1 [(validate.rules).message.required = true];
|
||||
// RTTs is all of the round-trip times sent via this pinger.
|
||||
repeated google.protobuf.Duration rtts = 2 [(validate.rules).repeated = {min_items: 1}];
|
||||
// MinRTT is the minimum round-trip time sent via this pinger.
|
||||
google.protobuf.Duration min_rtt = 3 [(validate.rules).duration.required = true];
|
||||
// MaxRTT is the maximum round-trip time sent via this pinger.
|
||||
google.protobuf.Duration max_rtt = 4 [(validate.rules).duration.required = true];
|
||||
// AvgRTT is the average round-trip time sent via this pinger.
|
||||
google.protobuf.Duration avg_rtt = 5 [(validate.rules).duration.required = true];
|
||||
// RTT is the round-trip time sent via this pinger.
|
||||
google.protobuf.Duration rtt = 2 [(validate.rules).duration.required = true];
|
||||
// Task update time.
|
||||
google.protobuf.Timestamp updated_at = 6 [(validate.rules).timestamp.required = true];
|
||||
google.protobuf.Timestamp updated_at = 3 [(validate.rules).timestamp.required = true];
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
message SyncProbesRequest {
|
||||
// ProbesOfHost represents probes information of the host.
|
||||
message ProbesOfHost {
|
||||
// Host metadata.
|
||||
common.Host host = 1 [(validate.rules).message.required = true];
|
||||
// Probes information.
|
||||
repeated Probe probes = 2 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
message SyncProbesRequest {
|
||||
// Probes information of the host.
|
||||
ProbesOfHost probes_of_host = 1 [(validate.rules).message.required = true];
|
||||
}
|
||||
|
||||
// SyncProbesResponse represents response of SyncProbes.
|
||||
message SyncProbesResponse {
|
||||
// Hosts needs to be probed.
|
||||
|
@ -404,6 +404,28 @@ message SyncProbesResponse {
|
|||
google.protobuf.Duration probe_interval = 2 [(validate.rules).duration.required = true];
|
||||
}
|
||||
|
||||
// UpdateHostsRequest represents update hosts request of SyncNetworkTopologyRequest.
|
||||
message UpdateHostsRequest {
|
||||
// Hosts needs to be updated.
|
||||
repeated ProbesOfHost probes_of_hosts = 1 [(validate.rules).repeated = {min_items: 1}];
|
||||
}
|
||||
|
||||
// DeleteHostsRequest represents delete hosts request of SyncNetworkTopologyRequest.
|
||||
message DeleteHostsRequest {
|
||||
// Hosts needs to be deleted.
|
||||
repeated ProbesOfHost probes_of_hosts = 1 [(validate.rules).repeated = {min_items: 1}];
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
message SyncNetworkTopologyRequest {
|
||||
oneof request {
|
||||
option (validate.required) = true;
|
||||
|
||||
UpdateHostsRequest update_probes_of_hosts_request = 1;
|
||||
DeleteHostsRequest delete_probes_of_hosts_request = 2;
|
||||
}
|
||||
}
|
||||
|
||||
// Scheduler RPC Service.
|
||||
service Scheduler{
|
||||
// RegisterPeerTask registers a peer into task.
|
||||
|
@ -432,4 +454,7 @@ service Scheduler{
|
|||
|
||||
// SyncProbes sync probes of the host.
|
||||
rpc SyncProbes(stream SyncProbesRequest)returns(stream SyncProbesResponse);
|
||||
|
||||
// SyncNetworkTopology sync network topology of the hosts.
|
||||
rpc SyncNetworkTopology(stream SyncNetworkTopologyRequest)returns(google.protobuf.Empty);
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ type SchedulerClient interface {
|
|||
LeaveHost(ctx context.Context, in *LeaveHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// SyncProbes sync probes of the host.
|
||||
SyncProbes(ctx context.Context, opts ...grpc.CallOption) (Scheduler_SyncProbesClient, error)
|
||||
// SyncNetworkTopology sync network topology of the hosts.
|
||||
SyncNetworkTopology(ctx context.Context, opts ...grpc.CallOption) (Scheduler_SyncNetworkTopologyClient, error)
|
||||
}
|
||||
|
||||
type schedulerClient struct {
|
||||
|
@ -176,6 +178,40 @@ func (x *schedulerSyncProbesClient) Recv() (*SyncProbesResponse, error) {
|
|||
return m, nil
|
||||
}
|
||||
|
||||
func (c *schedulerClient) SyncNetworkTopology(ctx context.Context, opts ...grpc.CallOption) (Scheduler_SyncNetworkTopologyClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[2], "/scheduler.Scheduler/SyncNetworkTopology", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &schedulerSyncNetworkTopologyClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Scheduler_SyncNetworkTopologyClient interface {
|
||||
Send(*SyncNetworkTopologyRequest) error
|
||||
CloseAndRecv() (*emptypb.Empty, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type schedulerSyncNetworkTopologyClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *schedulerSyncNetworkTopologyClient) Send(m *SyncNetworkTopologyRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *schedulerSyncNetworkTopologyClient) CloseAndRecv() (*emptypb.Empty, error) {
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
m := new(emptypb.Empty)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// SchedulerServer is the server API for Scheduler service.
|
||||
// All implementations should embed UnimplementedSchedulerServer
|
||||
// for forward compatibility
|
||||
|
@ -198,6 +234,8 @@ type SchedulerServer interface {
|
|||
LeaveHost(context.Context, *LeaveHostRequest) (*emptypb.Empty, error)
|
||||
// SyncProbes sync probes of the host.
|
||||
SyncProbes(Scheduler_SyncProbesServer) error
|
||||
// SyncNetworkTopology sync network topology of the hosts.
|
||||
SyncNetworkTopology(Scheduler_SyncNetworkTopologyServer) error
|
||||
}
|
||||
|
||||
// UnimplementedSchedulerServer should be embedded to have forward compatible implementations.
|
||||
|
@ -231,6 +269,9 @@ func (UnimplementedSchedulerServer) LeaveHost(context.Context, *LeaveHostRequest
|
|||
func (UnimplementedSchedulerServer) SyncProbes(Scheduler_SyncProbesServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SyncProbes not implemented")
|
||||
}
|
||||
func (UnimplementedSchedulerServer) SyncNetworkTopology(Scheduler_SyncNetworkTopologyServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SyncNetworkTopology not implemented")
|
||||
}
|
||||
|
||||
// UnsafeSchedulerServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SchedulerServer will
|
||||
|
@ -421,6 +462,32 @@ func (x *schedulerSyncProbesServer) Recv() (*SyncProbesRequest, error) {
|
|||
return m, nil
|
||||
}
|
||||
|
||||
func _Scheduler_SyncNetworkTopology_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(SchedulerServer).SyncNetworkTopology(&schedulerSyncNetworkTopologyServer{stream})
|
||||
}
|
||||
|
||||
type Scheduler_SyncNetworkTopologyServer interface {
|
||||
SendAndClose(*emptypb.Empty) error
|
||||
Recv() (*SyncNetworkTopologyRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type schedulerSyncNetworkTopologyServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *schedulerSyncNetworkTopologyServer) SendAndClose(m *emptypb.Empty) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *schedulerSyncNetworkTopologyServer) Recv() (*SyncNetworkTopologyRequest, error) {
|
||||
m := new(SyncNetworkTopologyRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// Scheduler_ServiceDesc is the grpc.ServiceDesc for Scheduler service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
|
@ -470,6 +537,11 @@ var Scheduler_ServiceDesc = grpc.ServiceDesc{
|
|||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "SyncNetworkTopology",
|
||||
Handler: _Scheduler_SyncNetworkTopology_Handler,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "pkg/apis/scheduler/v1/scheduler.proto",
|
||||
}
|
||||
|
|
|
@ -179,6 +179,26 @@ func (mr *MockSchedulerClientMockRecorder) StatTask(ctx, in interface{}, opts ..
|
|||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatTask", reflect.TypeOf((*MockSchedulerClient)(nil).StatTask), varargs...)
|
||||
}
|
||||
|
||||
// SyncNetworkTopology mocks base method.
|
||||
func (m *MockSchedulerClient) SyncNetworkTopology(ctx context.Context, opts ...grpc.CallOption) (scheduler.Scheduler_SyncNetworkTopologyClient, error) {
|
||||
m.ctrl.T.Helper()
|
||||
varargs := []interface{}{ctx}
|
||||
for _, a := range opts {
|
||||
varargs = append(varargs, a)
|
||||
}
|
||||
ret := m.ctrl.Call(m, "SyncNetworkTopology", varargs...)
|
||||
ret0, _ := ret[0].(scheduler.Scheduler_SyncNetworkTopologyClient)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// SyncNetworkTopology indicates an expected call of SyncNetworkTopology.
|
||||
func (mr *MockSchedulerClientMockRecorder) SyncNetworkTopology(ctx interface{}, opts ...interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
varargs := append([]interface{}{ctx}, opts...)
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncNetworkTopology", reflect.TypeOf((*MockSchedulerClient)(nil).SyncNetworkTopology), varargs...)
|
||||
}
|
||||
|
||||
// SyncProbes mocks base method.
|
||||
func (m *MockSchedulerClient) SyncProbes(ctx context.Context, opts ...grpc.CallOption) (scheduler.Scheduler_SyncProbesClient, error) {
|
||||
m.ctrl.T.Helper()
|
||||
|
@ -473,6 +493,143 @@ func (mr *MockScheduler_SyncProbesClientMockRecorder) Trailer() *gomock.Call {
|
|||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockScheduler_SyncProbesClient)(nil).Trailer))
|
||||
}
|
||||
|
||||
// MockScheduler_SyncNetworkTopologyClient is a mock of Scheduler_SyncNetworkTopologyClient interface.
|
||||
type MockScheduler_SyncNetworkTopologyClient struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockScheduler_SyncNetworkTopologyClientMockRecorder
|
||||
}
|
||||
|
||||
// MockScheduler_SyncNetworkTopologyClientMockRecorder is the mock recorder for MockScheduler_SyncNetworkTopologyClient.
|
||||
type MockScheduler_SyncNetworkTopologyClientMockRecorder struct {
|
||||
mock *MockScheduler_SyncNetworkTopologyClient
|
||||
}
|
||||
|
||||
// NewMockScheduler_SyncNetworkTopologyClient creates a new mock instance.
|
||||
func NewMockScheduler_SyncNetworkTopologyClient(ctrl *gomock.Controller) *MockScheduler_SyncNetworkTopologyClient {
|
||||
mock := &MockScheduler_SyncNetworkTopologyClient{ctrl: ctrl}
|
||||
mock.recorder = &MockScheduler_SyncNetworkTopologyClientMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) EXPECT() *MockScheduler_SyncNetworkTopologyClientMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// CloseAndRecv mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) CloseAndRecv() (*emptypb.Empty, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "CloseAndRecv")
|
||||
ret0, _ := ret[0].(*emptypb.Empty)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// CloseAndRecv indicates an expected call of CloseAndRecv.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) CloseAndRecv() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseAndRecv", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).CloseAndRecv))
|
||||
}
|
||||
|
||||
// CloseSend mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) CloseSend() error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "CloseSend")
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// CloseSend indicates an expected call of CloseSend.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) CloseSend() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CloseSend", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).CloseSend))
|
||||
}
|
||||
|
||||
// Context mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) Context() context.Context {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Context")
|
||||
ret0, _ := ret[0].(context.Context)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Context indicates an expected call of Context.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) Context() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).Context))
|
||||
}
|
||||
|
||||
// Header mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) Header() (metadata.MD, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Header")
|
||||
ret0, _ := ret[0].(metadata.MD)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Header indicates an expected call of Header.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) Header() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Header", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).Header))
|
||||
}
|
||||
|
||||
// RecvMsg mocks base method.
|
||||
func (m_2 *MockScheduler_SyncNetworkTopologyClient) RecvMsg(m interface{}) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// RecvMsg indicates an expected call of RecvMsg.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) RecvMsg(m interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).RecvMsg), m)
|
||||
}
|
||||
|
||||
// Send mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) Send(arg0 *scheduler.SyncNetworkTopologyRequest) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Send", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Send indicates an expected call of Send.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) Send(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Send", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).Send), arg0)
|
||||
}
|
||||
|
||||
// SendMsg mocks base method.
|
||||
func (m_2 *MockScheduler_SyncNetworkTopologyClient) SendMsg(m interface{}) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendMsg indicates an expected call of SendMsg.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) SendMsg(m interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).SendMsg), m)
|
||||
}
|
||||
|
||||
// Trailer mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyClient) Trailer() metadata.MD {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Trailer")
|
||||
ret0, _ := ret[0].(metadata.MD)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Trailer indicates an expected call of Trailer.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyClientMockRecorder) Trailer() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Trailer", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyClient)(nil).Trailer))
|
||||
}
|
||||
|
||||
// MockSchedulerServer is a mock of SchedulerServer interface.
|
||||
type MockSchedulerServer struct {
|
||||
ctrl *gomock.Controller
|
||||
|
@ -600,6 +757,20 @@ func (mr *MockSchedulerServerMockRecorder) StatTask(arg0, arg1 interface{}) *gom
|
|||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StatTask", reflect.TypeOf((*MockSchedulerServer)(nil).StatTask), arg0, arg1)
|
||||
}
|
||||
|
||||
// SyncNetworkTopology mocks base method.
|
||||
func (m *MockSchedulerServer) SyncNetworkTopology(arg0 scheduler.Scheduler_SyncNetworkTopologyServer) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SyncNetworkTopology", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SyncNetworkTopology indicates an expected call of SyncNetworkTopology.
|
||||
func (mr *MockSchedulerServerMockRecorder) SyncNetworkTopology(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SyncNetworkTopology", reflect.TypeOf((*MockSchedulerServer)(nil).SyncNetworkTopology), arg0)
|
||||
}
|
||||
|
||||
// SyncProbes mocks base method.
|
||||
func (m *MockSchedulerServer) SyncProbes(arg0 scheduler.Scheduler_SyncProbesServer) error {
|
||||
m.ctrl.T.Helper()
|
||||
|
@ -916,3 +1087,137 @@ func (mr *MockScheduler_SyncProbesServerMockRecorder) SetTrailer(arg0 interface{
|
|||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockScheduler_SyncProbesServer)(nil).SetTrailer), arg0)
|
||||
}
|
||||
|
||||
// MockScheduler_SyncNetworkTopologyServer is a mock of Scheduler_SyncNetworkTopologyServer interface.
|
||||
type MockScheduler_SyncNetworkTopologyServer struct {
|
||||
ctrl *gomock.Controller
|
||||
recorder *MockScheduler_SyncNetworkTopologyServerMockRecorder
|
||||
}
|
||||
|
||||
// MockScheduler_SyncNetworkTopologyServerMockRecorder is the mock recorder for MockScheduler_SyncNetworkTopologyServer.
|
||||
type MockScheduler_SyncNetworkTopologyServerMockRecorder struct {
|
||||
mock *MockScheduler_SyncNetworkTopologyServer
|
||||
}
|
||||
|
||||
// NewMockScheduler_SyncNetworkTopologyServer creates a new mock instance.
|
||||
func NewMockScheduler_SyncNetworkTopologyServer(ctrl *gomock.Controller) *MockScheduler_SyncNetworkTopologyServer {
|
||||
mock := &MockScheduler_SyncNetworkTopologyServer{ctrl: ctrl}
|
||||
mock.recorder = &MockScheduler_SyncNetworkTopologyServerMockRecorder{mock}
|
||||
return mock
|
||||
}
|
||||
|
||||
// EXPECT returns an object that allows the caller to indicate expected use.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) EXPECT() *MockScheduler_SyncNetworkTopologyServerMockRecorder {
|
||||
return m.recorder
|
||||
}
|
||||
|
||||
// Context mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) Context() context.Context {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Context")
|
||||
ret0, _ := ret[0].(context.Context)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// Context indicates an expected call of Context.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) Context() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Context", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).Context))
|
||||
}
|
||||
|
||||
// Recv mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) Recv() (*scheduler.SyncNetworkTopologyRequest, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Recv")
|
||||
ret0, _ := ret[0].(*scheduler.SyncNetworkTopologyRequest)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// Recv indicates an expected call of Recv.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) Recv() *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Recv", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).Recv))
|
||||
}
|
||||
|
||||
// RecvMsg mocks base method.
|
||||
func (m_2 *MockScheduler_SyncNetworkTopologyServer) RecvMsg(m interface{}) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "RecvMsg", m)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// RecvMsg indicates an expected call of RecvMsg.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) RecvMsg(m interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RecvMsg", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).RecvMsg), m)
|
||||
}
|
||||
|
||||
// SendAndClose mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) SendAndClose(arg0 *emptypb.Empty) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SendAndClose", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendAndClose indicates an expected call of SendAndClose.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) SendAndClose(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendAndClose", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).SendAndClose), arg0)
|
||||
}
|
||||
|
||||
// SendHeader mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) SendHeader(arg0 metadata.MD) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SendHeader", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendHeader indicates an expected call of SendHeader.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) SendHeader(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendHeader", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).SendHeader), arg0)
|
||||
}
|
||||
|
||||
// SendMsg mocks base method.
|
||||
func (m_2 *MockScheduler_SyncNetworkTopologyServer) SendMsg(m interface{}) error {
|
||||
m_2.ctrl.T.Helper()
|
||||
ret := m_2.ctrl.Call(m_2, "SendMsg", m)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SendMsg indicates an expected call of SendMsg.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) SendMsg(m interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendMsg", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).SendMsg), m)
|
||||
}
|
||||
|
||||
// SetHeader mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) SetHeader(arg0 metadata.MD) error {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "SetHeader", arg0)
|
||||
ret0, _ := ret[0].(error)
|
||||
return ret0
|
||||
}
|
||||
|
||||
// SetHeader indicates an expected call of SetHeader.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) SetHeader(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetHeader", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).SetHeader), arg0)
|
||||
}
|
||||
|
||||
// SetTrailer mocks base method.
|
||||
func (m *MockScheduler_SyncNetworkTopologyServer) SetTrailer(arg0 metadata.MD) {
|
||||
m.ctrl.T.Helper()
|
||||
m.ctrl.Call(m, "SetTrailer", arg0)
|
||||
}
|
||||
|
||||
// SetTrailer indicates an expected call of SetTrailer.
|
||||
func (mr *MockScheduler_SyncNetworkTopologyServerMockRecorder) SetTrailer(arg0 interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTrailer", reflect.TypeOf((*MockScheduler_SyncNetworkTopologyServer)(nil).SetTrailer), arg0)
|
||||
}
|
||||
|
|
|
@ -2077,16 +2077,10 @@ type Probe struct {
|
|||
|
||||
// Host metadata.
|
||||
Host *v2.Host `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
|
||||
// RTTs is all of the round-trip times sent via this pinger.
|
||||
Rtts []*durationpb.Duration `protobuf:"bytes,2,rep,name=rtts,proto3" json:"rtts,omitempty"`
|
||||
// MinRTT is the minimum round-trip time sent via this pinger.
|
||||
MinRtt *durationpb.Duration `protobuf:"bytes,3,opt,name=min_rtt,json=minRtt,proto3" json:"min_rtt,omitempty"`
|
||||
// MaxRTT is the maximum round-trip time sent via this pinger.
|
||||
MaxRtt *durationpb.Duration `protobuf:"bytes,4,opt,name=max_rtt,json=maxRtt,proto3" json:"max_rtt,omitempty"`
|
||||
// AvgRTT is the average round-trip time sent via this pinger.
|
||||
AvgRtt *durationpb.Duration `protobuf:"bytes,5,opt,name=avg_rtt,json=avgRtt,proto3" json:"avg_rtt,omitempty"`
|
||||
// RTT is the round-trip time sent via this pinger.
|
||||
Rtt *durationpb.Duration `protobuf:"bytes,2,opt,name=rtt,proto3" json:"rtt,omitempty"`
|
||||
// Task update time.
|
||||
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
||||
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Probe) Reset() {
|
||||
|
@ -2128,30 +2122,9 @@ func (x *Probe) GetHost() *v2.Host {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (x *Probe) GetRtts() []*durationpb.Duration {
|
||||
func (x *Probe) GetRtt() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.Rtts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Probe) GetMinRtt() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.MinRtt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Probe) GetMaxRtt() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.MaxRtt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Probe) GetAvgRtt() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.AvgRtt
|
||||
return x.Rtt
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -2163,8 +2136,8 @@ func (x *Probe) GetUpdatedAt() *timestamppb.Timestamp {
|
|||
return nil
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
type SyncProbesRequest struct {
|
||||
// ProbesOfHost represents probes information of the host.
|
||||
type ProbesOfHost struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
@ -2175,10 +2148,66 @@ type SyncProbesRequest struct {
|
|||
Probes []*Probe `protobuf:"bytes,2,rep,name=probes,proto3" json:"probes,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ProbesOfHost) Reset() {
|
||||
*x = ProbesOfHost{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[27]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ProbesOfHost) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ProbesOfHost) ProtoMessage() {}
|
||||
|
||||
func (x *ProbesOfHost) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[27]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ProbesOfHost.ProtoReflect.Descriptor instead.
|
||||
func (*ProbesOfHost) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{27}
|
||||
}
|
||||
|
||||
func (x *ProbesOfHost) GetHost() *v2.Host {
|
||||
if x != nil {
|
||||
return x.Host
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ProbesOfHost) GetProbes() []*Probe {
|
||||
if x != nil {
|
||||
return x.Probes
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
type SyncProbesRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Probes information of the host.
|
||||
ProbesOfHost *ProbesOfHost `protobuf:"bytes,1,opt,name=probes_of_host,json=probesOfHost,proto3" json:"probes_of_host,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SyncProbesRequest) Reset() {
|
||||
*x = SyncProbesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[27]
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[28]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -2191,7 +2220,7 @@ func (x *SyncProbesRequest) String() string {
|
|||
func (*SyncProbesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SyncProbesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[27]
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[28]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -2204,19 +2233,12 @@ func (x *SyncProbesRequest) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SyncProbesRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SyncProbesRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{27}
|
||||
return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{28}
|
||||
}
|
||||
|
||||
func (x *SyncProbesRequest) GetHost() *v2.Host {
|
||||
func (x *SyncProbesRequest) GetProbesOfHost() *ProbesOfHost {
|
||||
if x != nil {
|
||||
return x.Host
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SyncProbesRequest) GetProbes() []*Probe {
|
||||
if x != nil {
|
||||
return x.Probes
|
||||
return x.ProbesOfHost
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -2236,7 +2258,7 @@ type SyncProbesResponse struct {
|
|||
func (x *SyncProbesResponse) Reset() {
|
||||
*x = SyncProbesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[28]
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[29]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
@ -2249,7 +2271,7 @@ func (x *SyncProbesResponse) String() string {
|
|||
func (*SyncProbesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SyncProbesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[28]
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[29]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
@ -2262,7 +2284,7 @@ func (x *SyncProbesResponse) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SyncProbesResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SyncProbesResponse) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{28}
|
||||
return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{29}
|
||||
}
|
||||
|
||||
func (x *SyncProbesResponse) GetHosts() []*v2.Host {
|
||||
|
@ -2279,6 +2301,188 @@ func (x *SyncProbesResponse) GetProbeInterval() *durationpb.Duration {
|
|||
return nil
|
||||
}
|
||||
|
||||
// UpdateHostsRequest represents update hosts request of SyncNetworkTopologyRequest.
|
||||
type UpdateHostsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Hosts needs to be updated.
|
||||
ProbesOfHosts []*ProbesOfHost `protobuf:"bytes,1,rep,name=probes_of_hosts,json=probesOfHosts,proto3" json:"probes_of_hosts,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UpdateHostsRequest) Reset() {
|
||||
*x = UpdateHostsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[30]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *UpdateHostsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*UpdateHostsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateHostsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[30]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use UpdateHostsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*UpdateHostsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{30}
|
||||
}
|
||||
|
||||
func (x *UpdateHostsRequest) GetProbesOfHosts() []*ProbesOfHost {
|
||||
if x != nil {
|
||||
return x.ProbesOfHosts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeleteHostsRequest represents delete hosts request of SyncNetworkTopologyRequest.
|
||||
type DeleteHostsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Hosts needs to be deleted.
|
||||
ProbesOfHosts []*ProbesOfHost `protobuf:"bytes,1,rep,name=probes_of_hosts,json=probesOfHosts,proto3" json:"probes_of_hosts,omitempty"`
|
||||
}
|
||||
|
||||
func (x *DeleteHostsRequest) Reset() {
|
||||
*x = DeleteHostsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[31]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DeleteHostsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DeleteHostsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteHostsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[31]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DeleteHostsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*DeleteHostsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{31}
|
||||
}
|
||||
|
||||
func (x *DeleteHostsRequest) GetProbesOfHosts() []*ProbesOfHost {
|
||||
if x != nil {
|
||||
return x.ProbesOfHosts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
type SyncNetworkTopologyRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Types that are assignable to Request:
|
||||
//
|
||||
// *SyncNetworkTopologyRequest_UpdateProbesOfHostsRequest
|
||||
// *SyncNetworkTopologyRequest_DeleteProbesOfHostsRequest
|
||||
Request isSyncNetworkTopologyRequest_Request `protobuf_oneof:"request"`
|
||||
}
|
||||
|
||||
func (x *SyncNetworkTopologyRequest) Reset() {
|
||||
*x = SyncNetworkTopologyRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[32]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *SyncNetworkTopologyRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SyncNetworkTopologyRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SyncNetworkTopologyRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[32]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SyncNetworkTopologyRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SyncNetworkTopologyRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP(), []int{32}
|
||||
}
|
||||
|
||||
func (m *SyncNetworkTopologyRequest) GetRequest() isSyncNetworkTopologyRequest_Request {
|
||||
if m != nil {
|
||||
return m.Request
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SyncNetworkTopologyRequest) GetUpdateProbesOfHostsRequest() *UpdateHostsRequest {
|
||||
if x, ok := x.GetRequest().(*SyncNetworkTopologyRequest_UpdateProbesOfHostsRequest); ok {
|
||||
return x.UpdateProbesOfHostsRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SyncNetworkTopologyRequest) GetDeleteProbesOfHostsRequest() *DeleteHostsRequest {
|
||||
if x, ok := x.GetRequest().(*SyncNetworkTopologyRequest_DeleteProbesOfHostsRequest); ok {
|
||||
return x.DeleteProbesOfHostsRequest
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type isSyncNetworkTopologyRequest_Request interface {
|
||||
isSyncNetworkTopologyRequest_Request()
|
||||
}
|
||||
|
||||
type SyncNetworkTopologyRequest_UpdateProbesOfHostsRequest struct {
|
||||
UpdateProbesOfHostsRequest *UpdateHostsRequest `protobuf:"bytes,1,opt,name=update_probes_of_hosts_request,json=updateProbesOfHostsRequest,proto3,oneof"`
|
||||
}
|
||||
|
||||
type SyncNetworkTopologyRequest_DeleteProbesOfHostsRequest struct {
|
||||
DeleteProbesOfHostsRequest *DeleteHostsRequest `protobuf:"bytes,2,opt,name=delete_probes_of_hosts_request,json=deleteProbesOfHostsRequest,proto3,oneof"`
|
||||
}
|
||||
|
||||
func (*SyncNetworkTopologyRequest_UpdateProbesOfHostsRequest) isSyncNetworkTopologyRequest_Request() {
|
||||
}
|
||||
|
||||
func (*SyncNetworkTopologyRequest_DeleteProbesOfHostsRequest) isSyncNetworkTopologyRequest_Request() {
|
||||
}
|
||||
|
||||
var File_pkg_apis_scheduler_v2_scheduler_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_pkg_apis_scheduler_v2_scheduler_proto_rawDesc = []byte{
|
||||
|
@ -2646,37 +2850,31 @@ var file_pkg_apis_scheduler_v2_scheduler_proto_rawDesc = []byte{
|
|||
0x66, 0x6f, 0x72, 0x6d, 0x22, 0x2b, 0x0a, 0x10, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73,
|
||||
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x02, 0x69,
|
||||
0x64, 0x22, 0xee, 0x02, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x68,
|
||||
0x64, 0x22, 0xb2, 0x01, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x68,
|
||||
0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a,
|
||||
0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x72, 0x74,
|
||||
0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x72,
|
||||
0x74, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x72, 0x74, 0x74, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42,
|
||||
0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x52, 0x74,
|
||||
0x74, 0x12, 0x3c, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x74, 0x74, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa,
|
||||
0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x52, 0x74, 0x74, 0x12,
|
||||
0x3c, 0x0a, 0x07, 0x61, 0x76, 0x67, 0x5f, 0x72, 0x74, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05,
|
||||
0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x06, 0x61, 0x76, 0x67, 0x52, 0x74, 0x74, 0x12, 0x43, 0x0a,
|
||||
0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x08, 0xfa,
|
||||
0x42, 0x05, 0xb2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64,
|
||||
0x41, 0x74, 0x22, 0x7b, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01,
|
||||
0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
|
||||
0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07,
|
||||
0x92, 0x01, 0x04, 0x08, 0x01, 0x28, 0x01, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x22,
|
||||
0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x03, 0x72, 0x74,
|
||||
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x03, 0x72, 0x74,
|
||||
0x74, 0x12, 0x43, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||
0x70, 0x42, 0x08, 0xfa, 0x42, 0x05, 0xb2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x75, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x76, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73,
|
||||
0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52,
|
||||
0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x18,
|
||||
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65,
|
||||
0x72, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x92,
|
||||
0x01, 0x04, 0x08, 0x01, 0x28, 0x01, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x22, 0x5f,
|
||||
0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66,
|
||||
0x5f, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x63,
|
||||
0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65,
|
||||
0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10,
|
||||
0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x22,
|
||||
0x93, 0x01, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18,
|
||||
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76,
|
||||
|
@ -2686,48 +2884,82 @@ var file_pkg_apis_scheduler_v2_scheduler_proto_rawDesc = []byte{
|
|||
0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42,
|
||||
0x05, 0xaa, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x49, 0x6e, 0x74,
|
||||
0x65, 0x72, 0x76, 0x61, 0x6c, 0x32, 0xdf, 0x04, 0x0a, 0x09, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x50,
|
||||
0x65, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e,
|
||||
0x76, 0x32, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
|
||||
0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x50, 0x65,
|
||||
0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x3a,
|
||||
0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x73, 0x63, 0x68,
|
||||
0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x65,
|
||||
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x09, 0x4c, 0x65,
|
||||
0x61, 0x76, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x50, 0x65, 0x65, 0x72,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12,
|
||||
0x55, 0x0a, 0x0c, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12,
|
||||
0x21, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45,
|
||||
0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x12, 0x1d, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61,
|
||||
0x73, 0x6b, 0x12, 0x49, 0x0a, 0x0c, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f,
|
||||
0x73, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76,
|
||||
0x32, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a,
|
||||
0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x73, 0x63, 0x68,
|
||||
0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48,
|
||||
0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70,
|
||||
0x74, 0x79, 0x12, 0x53, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73,
|
||||
0x12, 0x1f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e,
|
||||
0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x20, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x2c, 0x5a, 0x2a, 0x64, 0x37, 0x79, 0x2e, 0x69,
|
||||
0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x73,
|
||||
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x73, 0x63, 0x68, 0x65,
|
||||
0x64, 0x75, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x62, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48,
|
||||
0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0f, 0x70,
|
||||
0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74,
|
||||
0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x62,
|
||||
0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x22, 0x62, 0x0a, 0x12, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x4c, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73,
|
||||
0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66,
|
||||
0x48, 0x6f, 0x73, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0d,
|
||||
0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x22, 0xfc, 0x01,
|
||||
0x0a, 0x1a, 0x53, 0x79, 0x6e, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x6f, 0x70,
|
||||
0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x66, 0x0a, 0x1e,
|
||||
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66,
|
||||
0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72,
|
||||
0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x1a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x66, 0x0a, 0x1e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x70,
|
||||
0x72, 0x6f, 0x62, 0x65, 0x73, 0x5f, 0x6f, 0x66, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x5f, 0x72,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73,
|
||||
0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00,
|
||||
0x52, 0x1a, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x4f, 0x66,
|
||||
0x48, 0x6f, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x0e, 0x0a, 0x07,
|
||||
0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x32, 0xba, 0x05, 0x0a,
|
||||
0x09, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x59, 0x0a, 0x0c, 0x41, 0x6e,
|
||||
0x6e, 0x6f, 0x75, 0x6e, 0x63, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x73, 0x63, 0x68,
|
||||
0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e,
|
||||
0x63, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e,
|
||||
0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x6e,
|
||||
0x6f, 0x75, 0x6e, 0x63, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x3a, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x74, 0x50, 0x65, 0x65,
|
||||
0x72, 0x12, 0x1d, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x53, 0x74, 0x61, 0x74, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, 0x65,
|
||||
0x72, 0x12, 0x43, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x1e,
|
||||
0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x65,
|
||||
0x61, 0x76, 0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x55, 0x0a, 0x0c, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e,
|
||||
0x67, 0x65, 0x50, 0x65, 0x65, 0x72, 0x12, 0x21, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
|
||||
0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x65,
|
||||
0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x63, 0x68, 0x65,
|
||||
0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67,
|
||||
0x65, 0x50, 0x65, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a,
|
||||
0x08, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x1d, 0x2e, 0x73, 0x63, 0x68, 0x65,
|
||||
0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x54, 0x61, 0x73,
|
||||
0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
|
||||
0x6e, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x49, 0x0a, 0x0c, 0x41, 0x6e, 0x6e,
|
||||
0x6f, 0x75, 0x6e, 0x63, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x2e, 0x73, 0x63, 0x68, 0x65,
|
||||
0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x75, 0x6e, 0x63,
|
||||
0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
|
||||
0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x09, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73,
|
||||
0x74, 0x12, 0x1e, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32,
|
||||
0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x53, 0x0a, 0x0a, 0x53, 0x79, 0x6e,
|
||||
0x63, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62, 0x65,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x50, 0x72, 0x6f, 0x62,
|
||||
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x59,
|
||||
0x0a, 0x13, 0x53, 0x79, 0x6e, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x6f, 0x70,
|
||||
0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x12, 0x28, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65,
|
||||
0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x54, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||
0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x28, 0x01, 0x42, 0x2c, 0x5a, 0x2a, 0x64, 0x37, 0x79,
|
||||
0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73,
|
||||
0x2f, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x3b, 0x73, 0x63,
|
||||
0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -2742,7 +2974,7 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_rawDescGZIP() []byte {
|
|||
return file_pkg_apis_scheduler_v2_scheduler_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes = make([]protoimpl.MessageInfo, 29)
|
||||
var file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
|
||||
var file_pkg_apis_scheduler_v2_scheduler_proto_goTypes = []interface{}{
|
||||
(*RegisterPeerRequest)(nil), // 0: scheduler.v2.RegisterPeerRequest
|
||||
(*DownloadPeerStartedRequest)(nil), // 1: scheduler.v2.DownloadPeerStartedRequest
|
||||
|
@ -2771,27 +3003,31 @@ var file_pkg_apis_scheduler_v2_scheduler_proto_goTypes = []interface{}{
|
|||
(*Build)(nil), // 24: scheduler.v2.Build
|
||||
(*LeaveHostRequest)(nil), // 25: scheduler.v2.LeaveHostRequest
|
||||
(*Probe)(nil), // 26: scheduler.v2.Probe
|
||||
(*SyncProbesRequest)(nil), // 27: scheduler.v2.SyncProbesRequest
|
||||
(*SyncProbesResponse)(nil), // 28: scheduler.v2.SyncProbesResponse
|
||||
(*v2.Metadata)(nil), // 29: common.v2.Metadata
|
||||
(*v2.Piece)(nil), // 30: common.v2.Piece
|
||||
(*v21.DownloadPeerBackToSourceFailed)(nil), // 31: errordetails.v2.DownloadPeerBackToSourceFailed
|
||||
(*v21.DownloadPieceBackToSourceFailed)(nil), // 32: errordetails.v2.DownloadPieceBackToSourceFailed
|
||||
(*v21.SyncPiecesFailed)(nil), // 33: errordetails.v2.SyncPiecesFailed
|
||||
(*v21.DownloadPieceFailed)(nil), // 34: errordetails.v2.DownloadPieceFailed
|
||||
(*v2.Peer)(nil), // 35: common.v2.Peer
|
||||
(*v21.SchedulePeerForbidden)(nil), // 36: errordetails.v2.SchedulePeerForbidden
|
||||
(*v21.SchedulePeerFailed)(nil), // 37: errordetails.v2.SchedulePeerFailed
|
||||
(*v2.Host)(nil), // 38: common.v2.Host
|
||||
(*durationpb.Duration)(nil), // 39: google.protobuf.Duration
|
||||
(*timestamppb.Timestamp)(nil), // 40: google.protobuf.Timestamp
|
||||
(*emptypb.Empty)(nil), // 41: google.protobuf.Empty
|
||||
(*v2.Task)(nil), // 42: common.v2.Task
|
||||
(*ProbesOfHost)(nil), // 27: scheduler.v2.ProbesOfHost
|
||||
(*SyncProbesRequest)(nil), // 28: scheduler.v2.SyncProbesRequest
|
||||
(*SyncProbesResponse)(nil), // 29: scheduler.v2.SyncProbesResponse
|
||||
(*UpdateHostsRequest)(nil), // 30: scheduler.v2.UpdateHostsRequest
|
||||
(*DeleteHostsRequest)(nil), // 31: scheduler.v2.DeleteHostsRequest
|
||||
(*SyncNetworkTopologyRequest)(nil), // 32: scheduler.v2.SyncNetworkTopologyRequest
|
||||
(*v2.Metadata)(nil), // 33: common.v2.Metadata
|
||||
(*v2.Piece)(nil), // 34: common.v2.Piece
|
||||
(*v21.DownloadPeerBackToSourceFailed)(nil), // 35: errordetails.v2.DownloadPeerBackToSourceFailed
|
||||
(*v21.DownloadPieceBackToSourceFailed)(nil), // 36: errordetails.v2.DownloadPieceBackToSourceFailed
|
||||
(*v21.SyncPiecesFailed)(nil), // 37: errordetails.v2.SyncPiecesFailed
|
||||
(*v21.DownloadPieceFailed)(nil), // 38: errordetails.v2.DownloadPieceFailed
|
||||
(*v2.Peer)(nil), // 39: common.v2.Peer
|
||||
(*v21.SchedulePeerForbidden)(nil), // 40: errordetails.v2.SchedulePeerForbidden
|
||||
(*v21.SchedulePeerFailed)(nil), // 41: errordetails.v2.SchedulePeerFailed
|
||||
(*v2.Host)(nil), // 42: common.v2.Host
|
||||
(*durationpb.Duration)(nil), // 43: google.protobuf.Duration
|
||||
(*timestamppb.Timestamp)(nil), // 44: google.protobuf.Timestamp
|
||||
(*emptypb.Empty)(nil), // 45: google.protobuf.Empty
|
||||
(*v2.Task)(nil), // 46: common.v2.Task
|
||||
}
|
||||
var file_pkg_apis_scheduler_v2_scheduler_proto_depIdxs = []int32{
|
||||
29, // 0: scheduler.v2.RegisterPeerRequest.metadata:type_name -> common.v2.Metadata
|
||||
30, // 1: scheduler.v2.DownloadPieceFinishedRequest.piece:type_name -> common.v2.Piece
|
||||
30, // 2: scheduler.v2.DownloadPieceBackToSourceFinishedRequest.piece:type_name -> common.v2.Piece
|
||||
33, // 0: scheduler.v2.RegisterPeerRequest.metadata:type_name -> common.v2.Metadata
|
||||
34, // 1: scheduler.v2.DownloadPieceFinishedRequest.piece:type_name -> common.v2.Piece
|
||||
34, // 2: scheduler.v2.DownloadPieceBackToSourceFinishedRequest.piece:type_name -> common.v2.Piece
|
||||
0, // 3: scheduler.v2.AnnouncePeerRequest.register_peer_request:type_name -> scheduler.v2.RegisterPeerRequest
|
||||
1, // 4: scheduler.v2.AnnouncePeerRequest.download_peer_started_request:type_name -> scheduler.v2.DownloadPeerStartedRequest
|
||||
2, // 5: scheduler.v2.AnnouncePeerRequest.download_peer_back_to_source_started_request:type_name -> scheduler.v2.DownloadPeerBackToSourceStartedRequest
|
||||
|
@ -2799,55 +3035,59 @@ var file_pkg_apis_scheduler_v2_scheduler_proto_depIdxs = []int32{
|
|||
4, // 7: scheduler.v2.AnnouncePeerRequest.download_peer_back_to_source_finished_request:type_name -> scheduler.v2.DownloadPeerBackToSourceFinishedRequest
|
||||
5, // 8: scheduler.v2.AnnouncePeerRequest.download_piece_finished_request:type_name -> scheduler.v2.DownloadPieceFinishedRequest
|
||||
6, // 9: scheduler.v2.AnnouncePeerRequest.download_piece_back_to_source_finished_request:type_name -> scheduler.v2.DownloadPieceBackToSourceFinishedRequest
|
||||
31, // 10: scheduler.v2.AnnouncePeerRequest.download_peer_back_to_source_failed:type_name -> errordetails.v2.DownloadPeerBackToSourceFailed
|
||||
32, // 11: scheduler.v2.AnnouncePeerRequest.download_piece_back_to_source_failed:type_name -> errordetails.v2.DownloadPieceBackToSourceFailed
|
||||
33, // 12: scheduler.v2.AnnouncePeerRequest.sync_pieces_failed:type_name -> errordetails.v2.SyncPiecesFailed
|
||||
34, // 13: scheduler.v2.AnnouncePeerRequest.download_piece_failed:type_name -> errordetails.v2.DownloadPieceFailed
|
||||
30, // 14: scheduler.v2.SmallTaskResponse.piece:type_name -> common.v2.Piece
|
||||
35, // 15: scheduler.v2.NormalTaskResponse.candidate_parents:type_name -> common.v2.Peer
|
||||
35, // 10: scheduler.v2.AnnouncePeerRequest.download_peer_back_to_source_failed:type_name -> errordetails.v2.DownloadPeerBackToSourceFailed
|
||||
36, // 11: scheduler.v2.AnnouncePeerRequest.download_piece_back_to_source_failed:type_name -> errordetails.v2.DownloadPieceBackToSourceFailed
|
||||
37, // 12: scheduler.v2.AnnouncePeerRequest.sync_pieces_failed:type_name -> errordetails.v2.SyncPiecesFailed
|
||||
38, // 13: scheduler.v2.AnnouncePeerRequest.download_piece_failed:type_name -> errordetails.v2.DownloadPieceFailed
|
||||
34, // 14: scheduler.v2.SmallTaskResponse.piece:type_name -> common.v2.Piece
|
||||
39, // 15: scheduler.v2.NormalTaskResponse.candidate_parents:type_name -> common.v2.Peer
|
||||
8, // 16: scheduler.v2.AnnouncePeerResponse.tiny_task_response:type_name -> scheduler.v2.TinyTaskResponse
|
||||
9, // 17: scheduler.v2.AnnouncePeerResponse.small_task_response:type_name -> scheduler.v2.SmallTaskResponse
|
||||
10, // 18: scheduler.v2.AnnouncePeerResponse.normal_task_response:type_name -> scheduler.v2.NormalTaskResponse
|
||||
11, // 19: scheduler.v2.AnnouncePeerResponse.need_back_to_source_response:type_name -> scheduler.v2.NeedBackToSourceResponse
|
||||
36, // 20: scheduler.v2.AnnouncePeerResponse.schedule_peer_forbidden:type_name -> errordetails.v2.SchedulePeerForbidden
|
||||
37, // 21: scheduler.v2.AnnouncePeerResponse.schedule_peer_failed:type_name -> errordetails.v2.SchedulePeerFailed
|
||||
40, // 20: scheduler.v2.AnnouncePeerResponse.schedule_peer_forbidden:type_name -> errordetails.v2.SchedulePeerForbidden
|
||||
41, // 21: scheduler.v2.AnnouncePeerResponse.schedule_peer_failed:type_name -> errordetails.v2.SchedulePeerFailed
|
||||
19, // 22: scheduler.v2.AnnounceHostRequest.cpu:type_name -> scheduler.v2.CPU
|
||||
21, // 23: scheduler.v2.AnnounceHostRequest.memory:type_name -> scheduler.v2.Memory
|
||||
22, // 24: scheduler.v2.AnnounceHostRequest.network:type_name -> scheduler.v2.Network
|
||||
23, // 25: scheduler.v2.AnnounceHostRequest.disk:type_name -> scheduler.v2.Disk
|
||||
24, // 26: scheduler.v2.AnnounceHostRequest.build:type_name -> scheduler.v2.Build
|
||||
20, // 27: scheduler.v2.CPU.times:type_name -> scheduler.v2.CPUTimes
|
||||
38, // 28: scheduler.v2.Probe.host:type_name -> common.v2.Host
|
||||
39, // 29: scheduler.v2.Probe.rtts:type_name -> google.protobuf.Duration
|
||||
39, // 30: scheduler.v2.Probe.min_rtt:type_name -> google.protobuf.Duration
|
||||
39, // 31: scheduler.v2.Probe.max_rtt:type_name -> google.protobuf.Duration
|
||||
39, // 32: scheduler.v2.Probe.avg_rtt:type_name -> google.protobuf.Duration
|
||||
40, // 33: scheduler.v2.Probe.updated_at:type_name -> google.protobuf.Timestamp
|
||||
38, // 34: scheduler.v2.SyncProbesRequest.host:type_name -> common.v2.Host
|
||||
26, // 35: scheduler.v2.SyncProbesRequest.probes:type_name -> scheduler.v2.Probe
|
||||
38, // 36: scheduler.v2.SyncProbesResponse.hosts:type_name -> common.v2.Host
|
||||
39, // 37: scheduler.v2.SyncProbesResponse.probe_interval:type_name -> google.protobuf.Duration
|
||||
7, // 38: scheduler.v2.Scheduler.AnnouncePeer:input_type -> scheduler.v2.AnnouncePeerRequest
|
||||
13, // 39: scheduler.v2.Scheduler.StatPeer:input_type -> scheduler.v2.StatPeerRequest
|
||||
16, // 40: scheduler.v2.Scheduler.LeavePeer:input_type -> scheduler.v2.LeavePeerRequest
|
||||
14, // 41: scheduler.v2.Scheduler.ExchangePeer:input_type -> scheduler.v2.ExchangePeerRequest
|
||||
17, // 42: scheduler.v2.Scheduler.StatTask:input_type -> scheduler.v2.StatTaskRequest
|
||||
18, // 43: scheduler.v2.Scheduler.AnnounceHost:input_type -> scheduler.v2.AnnounceHostRequest
|
||||
25, // 44: scheduler.v2.Scheduler.LeaveHost:input_type -> scheduler.v2.LeaveHostRequest
|
||||
27, // 45: scheduler.v2.Scheduler.SyncProbes:input_type -> scheduler.v2.SyncProbesRequest
|
||||
12, // 46: scheduler.v2.Scheduler.AnnouncePeer:output_type -> scheduler.v2.AnnouncePeerResponse
|
||||
35, // 47: scheduler.v2.Scheduler.StatPeer:output_type -> common.v2.Peer
|
||||
41, // 48: scheduler.v2.Scheduler.LeavePeer:output_type -> google.protobuf.Empty
|
||||
15, // 49: scheduler.v2.Scheduler.ExchangePeer:output_type -> scheduler.v2.ExchangePeerResponse
|
||||
42, // 50: scheduler.v2.Scheduler.StatTask:output_type -> common.v2.Task
|
||||
41, // 51: scheduler.v2.Scheduler.AnnounceHost:output_type -> google.protobuf.Empty
|
||||
41, // 52: scheduler.v2.Scheduler.LeaveHost:output_type -> google.protobuf.Empty
|
||||
28, // 53: scheduler.v2.Scheduler.SyncProbes:output_type -> scheduler.v2.SyncProbesResponse
|
||||
46, // [46:54] is the sub-list for method output_type
|
||||
38, // [38:46] is the sub-list for method input_type
|
||||
38, // [38:38] is the sub-list for extension type_name
|
||||
38, // [38:38] is the sub-list for extension extendee
|
||||
0, // [0:38] is the sub-list for field type_name
|
||||
42, // 28: scheduler.v2.Probe.host:type_name -> common.v2.Host
|
||||
43, // 29: scheduler.v2.Probe.rtt:type_name -> google.protobuf.Duration
|
||||
44, // 30: scheduler.v2.Probe.updated_at:type_name -> google.protobuf.Timestamp
|
||||
42, // 31: scheduler.v2.ProbesOfHost.host:type_name -> common.v2.Host
|
||||
26, // 32: scheduler.v2.ProbesOfHost.probes:type_name -> scheduler.v2.Probe
|
||||
27, // 33: scheduler.v2.SyncProbesRequest.probes_of_host:type_name -> scheduler.v2.ProbesOfHost
|
||||
42, // 34: scheduler.v2.SyncProbesResponse.hosts:type_name -> common.v2.Host
|
||||
43, // 35: scheduler.v2.SyncProbesResponse.probe_interval:type_name -> google.protobuf.Duration
|
||||
27, // 36: scheduler.v2.UpdateHostsRequest.probes_of_hosts:type_name -> scheduler.v2.ProbesOfHost
|
||||
27, // 37: scheduler.v2.DeleteHostsRequest.probes_of_hosts:type_name -> scheduler.v2.ProbesOfHost
|
||||
30, // 38: scheduler.v2.SyncNetworkTopologyRequest.update_probes_of_hosts_request:type_name -> scheduler.v2.UpdateHostsRequest
|
||||
31, // 39: scheduler.v2.SyncNetworkTopologyRequest.delete_probes_of_hosts_request:type_name -> scheduler.v2.DeleteHostsRequest
|
||||
7, // 40: scheduler.v2.Scheduler.AnnouncePeer:input_type -> scheduler.v2.AnnouncePeerRequest
|
||||
13, // 41: scheduler.v2.Scheduler.StatPeer:input_type -> scheduler.v2.StatPeerRequest
|
||||
16, // 42: scheduler.v2.Scheduler.LeavePeer:input_type -> scheduler.v2.LeavePeerRequest
|
||||
14, // 43: scheduler.v2.Scheduler.ExchangePeer:input_type -> scheduler.v2.ExchangePeerRequest
|
||||
17, // 44: scheduler.v2.Scheduler.StatTask:input_type -> scheduler.v2.StatTaskRequest
|
||||
18, // 45: scheduler.v2.Scheduler.AnnounceHost:input_type -> scheduler.v2.AnnounceHostRequest
|
||||
25, // 46: scheduler.v2.Scheduler.LeaveHost:input_type -> scheduler.v2.LeaveHostRequest
|
||||
28, // 47: scheduler.v2.Scheduler.SyncProbes:input_type -> scheduler.v2.SyncProbesRequest
|
||||
32, // 48: scheduler.v2.Scheduler.SyncNetworkTopology:input_type -> scheduler.v2.SyncNetworkTopologyRequest
|
||||
12, // 49: scheduler.v2.Scheduler.AnnouncePeer:output_type -> scheduler.v2.AnnouncePeerResponse
|
||||
39, // 50: scheduler.v2.Scheduler.StatPeer:output_type -> common.v2.Peer
|
||||
45, // 51: scheduler.v2.Scheduler.LeavePeer:output_type -> google.protobuf.Empty
|
||||
15, // 52: scheduler.v2.Scheduler.ExchangePeer:output_type -> scheduler.v2.ExchangePeerResponse
|
||||
46, // 53: scheduler.v2.Scheduler.StatTask:output_type -> common.v2.Task
|
||||
45, // 54: scheduler.v2.Scheduler.AnnounceHost:output_type -> google.protobuf.Empty
|
||||
45, // 55: scheduler.v2.Scheduler.LeaveHost:output_type -> google.protobuf.Empty
|
||||
29, // 56: scheduler.v2.Scheduler.SyncProbes:output_type -> scheduler.v2.SyncProbesResponse
|
||||
45, // 57: scheduler.v2.Scheduler.SyncNetworkTopology:output_type -> google.protobuf.Empty
|
||||
49, // [49:58] is the sub-list for method output_type
|
||||
40, // [40:49] is the sub-list for method input_type
|
||||
40, // [40:40] is the sub-list for extension type_name
|
||||
40, // [40:40] is the sub-list for extension extendee
|
||||
0, // [0:40] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_pkg_apis_scheduler_v2_scheduler_proto_init() }
|
||||
|
@ -3181,7 +3421,7 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() {
|
|||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SyncProbesRequest); i {
|
||||
switch v := v.(*ProbesOfHost); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
|
@ -3193,6 +3433,18 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() {
|
|||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SyncProbesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SyncProbesResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
|
@ -3204,6 +3456,42 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateHostsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteHostsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*SyncNetworkTopologyRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[7].OneofWrappers = []interface{}{
|
||||
(*AnnouncePeerRequest_RegisterPeerRequest)(nil),
|
||||
|
@ -3226,13 +3514,17 @@ func file_pkg_apis_scheduler_v2_scheduler_proto_init() {
|
|||
(*AnnouncePeerResponse_SchedulePeerForbidden)(nil),
|
||||
(*AnnouncePeerResponse_SchedulePeerFailed)(nil),
|
||||
}
|
||||
file_pkg_apis_scheduler_v2_scheduler_proto_msgTypes[32].OneofWrappers = []interface{}{
|
||||
(*SyncNetworkTopologyRequest_UpdateProbesOfHostsRequest)(nil),
|
||||
(*SyncNetworkTopologyRequest_DeleteProbesOfHostsRequest)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_pkg_apis_scheduler_v2_scheduler_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 29,
|
||||
NumMessages: 33,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
|
|
@ -4414,76 +4414,9 @@ func (m *Probe) validate(all bool) error {
|
|||
}
|
||||
}
|
||||
|
||||
if len(m.GetRtts()) < 1 {
|
||||
if m.GetRtt() == nil {
|
||||
err := ProbeValidationError{
|
||||
field: "Rtts",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
for idx, item := range m.GetRtts() {
|
||||
_, _ = idx, item
|
||||
|
||||
if all {
|
||||
switch v := interface{}(item).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, ProbeValidationError{
|
||||
field: fmt.Sprintf("Rtts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, ProbeValidationError{
|
||||
field: fmt.Sprintf("Rtts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return ProbeValidationError{
|
||||
field: fmt.Sprintf("Rtts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if m.GetMinRtt() == nil {
|
||||
err := ProbeValidationError{
|
||||
field: "MinRtt",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if m.GetMaxRtt() == nil {
|
||||
err := ProbeValidationError{
|
||||
field: "MaxRtt",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if m.GetAvgRtt() == nil {
|
||||
err := ProbeValidationError{
|
||||
field: "AvgRtt",
|
||||
field: "Rtt",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
|
@ -4580,6 +4513,194 @@ var _ interface {
|
|||
ErrorName() string
|
||||
} = ProbeValidationError{}
|
||||
|
||||
// Validate checks the field values on ProbesOfHost with the rules defined in
|
||||
// the proto definition for this message. If any rules are violated, the first
|
||||
// error encountered is returned, or nil if there are no violations.
|
||||
func (m *ProbesOfHost) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on ProbesOfHost with the rules defined
|
||||
// in the proto definition for this message. If any rules are violated, the
|
||||
// result is a list of violation errors wrapped in ProbesOfHostMultiError, or
|
||||
// nil if none found.
|
||||
func (m *ProbesOfHost) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *ProbesOfHost) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
if m.GetHost() == nil {
|
||||
err := ProbesOfHostValidationError{
|
||||
field: "Host",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if all {
|
||||
switch v := interface{}(m.GetHost()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, ProbesOfHostValidationError{
|
||||
field: "Host",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, ProbesOfHostValidationError{
|
||||
field: "Host",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return ProbesOfHostValidationError{
|
||||
field: "Host",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(m.GetProbes()) > 0 {
|
||||
|
||||
if len(m.GetProbes()) < 1 {
|
||||
err := ProbesOfHostValidationError{
|
||||
field: "Probes",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
for idx, item := range m.GetProbes() {
|
||||
_, _ = idx, item
|
||||
|
||||
if all {
|
||||
switch v := interface{}(item).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, ProbesOfHostValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, ProbesOfHostValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return ProbesOfHostValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return ProbesOfHostMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ProbesOfHostMultiError is an error wrapping multiple validation errors
|
||||
// returned by ProbesOfHost.ValidateAll() if the designated constraints aren't met.
|
||||
type ProbesOfHostMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m ProbesOfHostMultiError) Error() string {
|
||||
var msgs []string
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m ProbesOfHostMultiError) AllErrors() []error { return m }
|
||||
|
||||
// ProbesOfHostValidationError is the validation error returned by
|
||||
// ProbesOfHost.Validate if the designated constraints aren't met.
|
||||
type ProbesOfHostValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e ProbesOfHostValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e ProbesOfHostValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e ProbesOfHostValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e ProbesOfHostValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e ProbesOfHostValidationError) ErrorName() string { return "ProbesOfHostValidationError" }
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e ProbesOfHostValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sProbesOfHost.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = ProbesOfHostValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = ProbesOfHostValidationError{}
|
||||
|
||||
// Validate checks the field values on SyncProbesRequest with the rules defined
|
||||
// in the proto definition for this message. If any rules are violated, the
|
||||
// first error encountered is returned, or nil if there are no violations.
|
||||
|
@ -4602,9 +4723,9 @@ func (m *SyncProbesRequest) validate(all bool) error {
|
|||
|
||||
var errors []error
|
||||
|
||||
if m.GetHost() == nil {
|
||||
if m.GetProbesOfHost() == nil {
|
||||
err := SyncProbesRequestValidationError{
|
||||
field: "Host",
|
||||
field: "ProbesOfHost",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
|
@ -4614,11 +4735,11 @@ func (m *SyncProbesRequest) validate(all bool) error {
|
|||
}
|
||||
|
||||
if all {
|
||||
switch v := interface{}(m.GetHost()).(type) {
|
||||
switch v := interface{}(m.GetProbesOfHost()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, SyncProbesRequestValidationError{
|
||||
field: "Host",
|
||||
field: "ProbesOfHost",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
|
@ -4626,71 +4747,22 @@ func (m *SyncProbesRequest) validate(all bool) error {
|
|||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, SyncProbesRequestValidationError{
|
||||
field: "Host",
|
||||
field: "ProbesOfHost",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok {
|
||||
} else if v, ok := interface{}(m.GetProbesOfHost()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return SyncProbesRequestValidationError{
|
||||
field: "Host",
|
||||
field: "ProbesOfHost",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(m.GetProbes()) > 0 {
|
||||
|
||||
if len(m.GetProbes()) < 1 {
|
||||
err := SyncProbesRequestValidationError{
|
||||
field: "Probes",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
for idx, item := range m.GetProbes() {
|
||||
_, _ = idx, item
|
||||
|
||||
if all {
|
||||
switch v := interface{}(item).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, SyncProbesRequestValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, SyncProbesRequestValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return SyncProbesRequestValidationError{
|
||||
field: fmt.Sprintf("Probes[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return SyncProbesRequestMultiError(errors)
|
||||
}
|
||||
|
@ -4932,3 +5004,499 @@ var _ interface {
|
|||
Cause() error
|
||||
ErrorName() string
|
||||
} = SyncProbesResponseValidationError{}
|
||||
|
||||
// Validate checks the field values on UpdateHostsRequest with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the first error encountered is returned, or nil if there are no violations.
|
||||
func (m *UpdateHostsRequest) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on UpdateHostsRequest with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the result is a list of violation errors wrapped in
|
||||
// UpdateHostsRequestMultiError, or nil if none found.
|
||||
func (m *UpdateHostsRequest) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *UpdateHostsRequest) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
if len(m.GetProbesOfHosts()) < 1 {
|
||||
err := UpdateHostsRequestValidationError{
|
||||
field: "ProbesOfHosts",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
for idx, item := range m.GetProbesOfHosts() {
|
||||
_, _ = idx, item
|
||||
|
||||
if all {
|
||||
switch v := interface{}(item).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, UpdateHostsRequestValidationError{
|
||||
field: fmt.Sprintf("ProbesOfHosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, UpdateHostsRequestValidationError{
|
||||
field: fmt.Sprintf("ProbesOfHosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return UpdateHostsRequestValidationError{
|
||||
field: fmt.Sprintf("ProbesOfHosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return UpdateHostsRequestMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// UpdateHostsRequestMultiError is an error wrapping multiple validation errors
|
||||
// returned by UpdateHostsRequest.ValidateAll() if the designated constraints
|
||||
// aren't met.
|
||||
type UpdateHostsRequestMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m UpdateHostsRequestMultiError) Error() string {
|
||||
var msgs []string
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m UpdateHostsRequestMultiError) AllErrors() []error { return m }
|
||||
|
||||
// UpdateHostsRequestValidationError is the validation error returned by
|
||||
// UpdateHostsRequest.Validate if the designated constraints aren't met.
|
||||
type UpdateHostsRequestValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e UpdateHostsRequestValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e UpdateHostsRequestValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e UpdateHostsRequestValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e UpdateHostsRequestValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e UpdateHostsRequestValidationError) ErrorName() string {
|
||||
return "UpdateHostsRequestValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e UpdateHostsRequestValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sUpdateHostsRequest.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = UpdateHostsRequestValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = UpdateHostsRequestValidationError{}
|
||||
|
||||
// Validate checks the field values on DeleteHostsRequest with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the first error encountered is returned, or nil if there are no violations.
|
||||
func (m *DeleteHostsRequest) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on DeleteHostsRequest with the rules
|
||||
// defined in the proto definition for this message. If any rules are
|
||||
// violated, the result is a list of violation errors wrapped in
|
||||
// DeleteHostsRequestMultiError, or nil if none found.
|
||||
func (m *DeleteHostsRequest) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *DeleteHostsRequest) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
if len(m.GetProbesOfHosts()) < 1 {
|
||||
err := DeleteHostsRequestValidationError{
|
||||
field: "ProbesOfHosts",
|
||||
reason: "value must contain at least 1 item(s)",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
for idx, item := range m.GetProbesOfHosts() {
|
||||
_, _ = idx, item
|
||||
|
||||
if all {
|
||||
switch v := interface{}(item).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, DeleteHostsRequestValidationError{
|
||||
field: fmt.Sprintf("ProbesOfHosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, DeleteHostsRequestValidationError{
|
||||
field: fmt.Sprintf("ProbesOfHosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return DeleteHostsRequestValidationError{
|
||||
field: fmt.Sprintf("ProbesOfHosts[%v]", idx),
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return DeleteHostsRequestMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// DeleteHostsRequestMultiError is an error wrapping multiple validation errors
|
||||
// returned by DeleteHostsRequest.ValidateAll() if the designated constraints
|
||||
// aren't met.
|
||||
type DeleteHostsRequestMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m DeleteHostsRequestMultiError) Error() string {
|
||||
var msgs []string
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m DeleteHostsRequestMultiError) AllErrors() []error { return m }
|
||||
|
||||
// DeleteHostsRequestValidationError is the validation error returned by
|
||||
// DeleteHostsRequest.Validate if the designated constraints aren't met.
|
||||
type DeleteHostsRequestValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e DeleteHostsRequestValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e DeleteHostsRequestValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e DeleteHostsRequestValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e DeleteHostsRequestValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e DeleteHostsRequestValidationError) ErrorName() string {
|
||||
return "DeleteHostsRequestValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e DeleteHostsRequestValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sDeleteHostsRequest.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = DeleteHostsRequestValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = DeleteHostsRequestValidationError{}
|
||||
|
||||
// Validate checks the field values on SyncNetworkTopologyRequest with the
|
||||
// rules defined in the proto definition for this message. If any rules are
|
||||
// violated, the first error encountered is returned, or nil if there are no violations.
|
||||
func (m *SyncNetworkTopologyRequest) Validate() error {
|
||||
return m.validate(false)
|
||||
}
|
||||
|
||||
// ValidateAll checks the field values on SyncNetworkTopologyRequest with the
|
||||
// rules defined in the proto definition for this message. If any rules are
|
||||
// violated, the result is a list of violation errors wrapped in
|
||||
// SyncNetworkTopologyRequestMultiError, or nil if none found.
|
||||
func (m *SyncNetworkTopologyRequest) ValidateAll() error {
|
||||
return m.validate(true)
|
||||
}
|
||||
|
||||
func (m *SyncNetworkTopologyRequest) validate(all bool) error {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
var errors []error
|
||||
|
||||
oneofRequestPresent := false
|
||||
switch v := m.Request.(type) {
|
||||
case *SyncNetworkTopologyRequest_UpdateProbesOfHostsRequest:
|
||||
if v == nil {
|
||||
err := SyncNetworkTopologyRequestValidationError{
|
||||
field: "Request",
|
||||
reason: "oneof value cannot be a typed-nil",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
oneofRequestPresent = true
|
||||
|
||||
if all {
|
||||
switch v := interface{}(m.GetUpdateProbesOfHostsRequest()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, SyncNetworkTopologyRequestValidationError{
|
||||
field: "UpdateProbesOfHostsRequest",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, SyncNetworkTopologyRequestValidationError{
|
||||
field: "UpdateProbesOfHostsRequest",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetUpdateProbesOfHostsRequest()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return SyncNetworkTopologyRequestValidationError{
|
||||
field: "UpdateProbesOfHostsRequest",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
case *SyncNetworkTopologyRequest_DeleteProbesOfHostsRequest:
|
||||
if v == nil {
|
||||
err := SyncNetworkTopologyRequestValidationError{
|
||||
field: "Request",
|
||||
reason: "oneof value cannot be a typed-nil",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
oneofRequestPresent = true
|
||||
|
||||
if all {
|
||||
switch v := interface{}(m.GetDeleteProbesOfHostsRequest()).(type) {
|
||||
case interface{ ValidateAll() error }:
|
||||
if err := v.ValidateAll(); err != nil {
|
||||
errors = append(errors, SyncNetworkTopologyRequestValidationError{
|
||||
field: "DeleteProbesOfHostsRequest",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
case interface{ Validate() error }:
|
||||
if err := v.Validate(); err != nil {
|
||||
errors = append(errors, SyncNetworkTopologyRequestValidationError{
|
||||
field: "DeleteProbesOfHostsRequest",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if v, ok := interface{}(m.GetDeleteProbesOfHostsRequest()).(interface{ Validate() error }); ok {
|
||||
if err := v.Validate(); err != nil {
|
||||
return SyncNetworkTopologyRequestValidationError{
|
||||
field: "DeleteProbesOfHostsRequest",
|
||||
reason: "embedded message failed validation",
|
||||
cause: err,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
default:
|
||||
_ = v // ensures v is used
|
||||
}
|
||||
if !oneofRequestPresent {
|
||||
err := SyncNetworkTopologyRequestValidationError{
|
||||
field: "Request",
|
||||
reason: "value is required",
|
||||
}
|
||||
if !all {
|
||||
return err
|
||||
}
|
||||
errors = append(errors, err)
|
||||
}
|
||||
|
||||
if len(errors) > 0 {
|
||||
return SyncNetworkTopologyRequestMultiError(errors)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// SyncNetworkTopologyRequestMultiError is an error wrapping multiple
|
||||
// validation errors returned by SyncNetworkTopologyRequest.ValidateAll() if
|
||||
// the designated constraints aren't met.
|
||||
type SyncNetworkTopologyRequestMultiError []error
|
||||
|
||||
// Error returns a concatenation of all the error messages it wraps.
|
||||
func (m SyncNetworkTopologyRequestMultiError) Error() string {
|
||||
var msgs []string
|
||||
for _, err := range m {
|
||||
msgs = append(msgs, err.Error())
|
||||
}
|
||||
return strings.Join(msgs, "; ")
|
||||
}
|
||||
|
||||
// AllErrors returns a list of validation violation errors.
|
||||
func (m SyncNetworkTopologyRequestMultiError) AllErrors() []error { return m }
|
||||
|
||||
// SyncNetworkTopologyRequestValidationError is the validation error returned
|
||||
// by SyncNetworkTopologyRequest.Validate if the designated constraints aren't met.
|
||||
type SyncNetworkTopologyRequestValidationError struct {
|
||||
field string
|
||||
reason string
|
||||
cause error
|
||||
key bool
|
||||
}
|
||||
|
||||
// Field function returns field value.
|
||||
func (e SyncNetworkTopologyRequestValidationError) Field() string { return e.field }
|
||||
|
||||
// Reason function returns reason value.
|
||||
func (e SyncNetworkTopologyRequestValidationError) Reason() string { return e.reason }
|
||||
|
||||
// Cause function returns cause value.
|
||||
func (e SyncNetworkTopologyRequestValidationError) Cause() error { return e.cause }
|
||||
|
||||
// Key function returns key value.
|
||||
func (e SyncNetworkTopologyRequestValidationError) Key() bool { return e.key }
|
||||
|
||||
// ErrorName returns error name.
|
||||
func (e SyncNetworkTopologyRequestValidationError) ErrorName() string {
|
||||
return "SyncNetworkTopologyRequestValidationError"
|
||||
}
|
||||
|
||||
// Error satisfies the builtin error interface
|
||||
func (e SyncNetworkTopologyRequestValidationError) Error() string {
|
||||
cause := ""
|
||||
if e.cause != nil {
|
||||
cause = fmt.Sprintf(" | caused by: %v", e.cause)
|
||||
}
|
||||
|
||||
key := ""
|
||||
if e.key {
|
||||
key = "key for "
|
||||
}
|
||||
|
||||
return fmt.Sprintf(
|
||||
"invalid %sSyncNetworkTopologyRequest.%s: %s%s",
|
||||
key,
|
||||
e.field,
|
||||
e.reason,
|
||||
cause)
|
||||
}
|
||||
|
||||
var _ error = SyncNetworkTopologyRequestValidationError{}
|
||||
|
||||
var _ interface {
|
||||
Field() string
|
||||
Reason() string
|
||||
Key() bool
|
||||
Cause() error
|
||||
ErrorName() string
|
||||
} = SyncNetworkTopologyRequestValidationError{}
|
||||
|
|
|
@ -323,26 +323,26 @@ message LeaveHostRequest{
|
|||
message Probe {
|
||||
// Host metadata.
|
||||
common.v2.Host host = 1 [(validate.rules).message.required = true];
|
||||
// RTTs is all of the round-trip times sent via this pinger.
|
||||
repeated google.protobuf.Duration rtts = 2 [(validate.rules).repeated = {min_items: 1}];
|
||||
// MinRTT is the minimum round-trip time sent via this pinger.
|
||||
google.protobuf.Duration min_rtt = 3 [(validate.rules).duration.required = true];
|
||||
// MaxRTT is the maximum round-trip time sent via this pinger.
|
||||
google.protobuf.Duration max_rtt = 4 [(validate.rules).duration.required = true];
|
||||
// AvgRTT is the average round-trip time sent via this pinger.
|
||||
google.protobuf.Duration avg_rtt = 5 [(validate.rules).duration.required = true];
|
||||
// RTT is the round-trip time sent via this pinger.
|
||||
google.protobuf.Duration rtt = 2 [(validate.rules).duration.required = true];
|
||||
// Task update time.
|
||||
google.protobuf.Timestamp updated_at = 6 [(validate.rules).timestamp.required = true];
|
||||
google.protobuf.Timestamp updated_at = 3 [(validate.rules).timestamp.required = true];
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
message SyncProbesRequest {
|
||||
// ProbesOfHost represents probes information of the host.
|
||||
message ProbesOfHost {
|
||||
// Host metadata.
|
||||
common.v2.Host host = 1 [(validate.rules).message.required = true];
|
||||
// Probes information.
|
||||
repeated Probe probes = 2 [(validate.rules).repeated = {min_items: 1, ignore_empty: true}];
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
message SyncProbesRequest {
|
||||
// Probes information of the host.
|
||||
ProbesOfHost probes_of_host = 1 [(validate.rules).message.required = true];
|
||||
}
|
||||
|
||||
// SyncProbesResponse represents response of SyncProbes.
|
||||
message SyncProbesResponse {
|
||||
// Hosts needs to be probed.
|
||||
|
@ -351,6 +351,28 @@ message SyncProbesResponse {
|
|||
google.protobuf.Duration probe_interval = 2 [(validate.rules).duration.required = true];
|
||||
}
|
||||
|
||||
// UpdateHostsRequest represents update hosts request of SyncNetworkTopologyRequest.
|
||||
message UpdateHostsRequest {
|
||||
// Hosts needs to be updated.
|
||||
repeated ProbesOfHost probes_of_hosts = 1 [(validate.rules).repeated = {min_items: 1}];
|
||||
}
|
||||
|
||||
// DeleteHostsRequest represents delete hosts request of SyncNetworkTopologyRequest.
|
||||
message DeleteHostsRequest {
|
||||
// Hosts needs to be deleted.
|
||||
repeated ProbesOfHost probes_of_hosts = 1 [(validate.rules).repeated = {min_items: 1}];
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
message SyncNetworkTopologyRequest {
|
||||
oneof request {
|
||||
option (validate.required) = true;
|
||||
|
||||
UpdateHostsRequest update_probes_of_hosts_request = 1;
|
||||
DeleteHostsRequest delete_probes_of_hosts_request = 2;
|
||||
}
|
||||
}
|
||||
|
||||
// Scheduler RPC Service.
|
||||
service Scheduler{
|
||||
// AnnouncePeer announces peer to scheduler.
|
||||
|
@ -377,4 +399,7 @@ service Scheduler{
|
|||
|
||||
// SyncProbes sync probes of the host.
|
||||
rpc SyncProbes(stream SyncProbesRequest)returns(stream SyncProbesResponse);
|
||||
|
||||
// SyncNetworkTopology sync network topology of the hosts.
|
||||
rpc SyncNetworkTopology(stream SyncNetworkTopologyRequest)returns(google.protobuf.Empty);
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ type SchedulerClient interface {
|
|||
LeaveHost(ctx context.Context, in *LeaveHostRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// SyncProbes sync probes of the host.
|
||||
SyncProbes(ctx context.Context, opts ...grpc.CallOption) (Scheduler_SyncProbesClient, error)
|
||||
// SyncNetworkTopology sync network topology of the hosts.
|
||||
SyncNetworkTopology(ctx context.Context, opts ...grpc.CallOption) (Scheduler_SyncNetworkTopologyClient, error)
|
||||
}
|
||||
|
||||
type schedulerClient struct {
|
||||
|
@ -167,6 +169,40 @@ func (x *schedulerSyncProbesClient) Recv() (*SyncProbesResponse, error) {
|
|||
return m, nil
|
||||
}
|
||||
|
||||
func (c *schedulerClient) SyncNetworkTopology(ctx context.Context, opts ...grpc.CallOption) (Scheduler_SyncNetworkTopologyClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &Scheduler_ServiceDesc.Streams[2], "/scheduler.v2.Scheduler/SyncNetworkTopology", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &schedulerSyncNetworkTopologyClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Scheduler_SyncNetworkTopologyClient interface {
|
||||
Send(*SyncNetworkTopologyRequest) error
|
||||
CloseAndRecv() (*emptypb.Empty, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type schedulerSyncNetworkTopologyClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *schedulerSyncNetworkTopologyClient) Send(m *SyncNetworkTopologyRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *schedulerSyncNetworkTopologyClient) CloseAndRecv() (*emptypb.Empty, error) {
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
m := new(emptypb.Empty)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// SchedulerServer is the server API for Scheduler service.
|
||||
// All implementations should embed UnimplementedSchedulerServer
|
||||
// for forward compatibility
|
||||
|
@ -188,6 +224,8 @@ type SchedulerServer interface {
|
|||
LeaveHost(context.Context, *LeaveHostRequest) (*emptypb.Empty, error)
|
||||
// SyncProbes sync probes of the host.
|
||||
SyncProbes(Scheduler_SyncProbesServer) error
|
||||
// SyncNetworkTopology sync network topology of the hosts.
|
||||
SyncNetworkTopology(Scheduler_SyncNetworkTopologyServer) error
|
||||
}
|
||||
|
||||
// UnimplementedSchedulerServer should be embedded to have forward compatible implementations.
|
||||
|
@ -218,6 +256,9 @@ func (UnimplementedSchedulerServer) LeaveHost(context.Context, *LeaveHostRequest
|
|||
func (UnimplementedSchedulerServer) SyncProbes(Scheduler_SyncProbesServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SyncProbes not implemented")
|
||||
}
|
||||
func (UnimplementedSchedulerServer) SyncNetworkTopology(Scheduler_SyncNetworkTopologyServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SyncNetworkTopology not implemented")
|
||||
}
|
||||
|
||||
// UnsafeSchedulerServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to SchedulerServer will
|
||||
|
@ -390,6 +431,32 @@ func (x *schedulerSyncProbesServer) Recv() (*SyncProbesRequest, error) {
|
|||
return m, nil
|
||||
}
|
||||
|
||||
func _Scheduler_SyncNetworkTopology_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(SchedulerServer).SyncNetworkTopology(&schedulerSyncNetworkTopologyServer{stream})
|
||||
}
|
||||
|
||||
type Scheduler_SyncNetworkTopologyServer interface {
|
||||
SendAndClose(*emptypb.Empty) error
|
||||
Recv() (*SyncNetworkTopologyRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type schedulerSyncNetworkTopologyServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *schedulerSyncNetworkTopologyServer) SendAndClose(m *emptypb.Empty) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *schedulerSyncNetworkTopologyServer) Recv() (*SyncNetworkTopologyRequest, error) {
|
||||
m := new(SyncNetworkTopologyRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// Scheduler_ServiceDesc is the grpc.ServiceDesc for Scheduler service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
|
@ -435,6 +502,11 @@ var Scheduler_ServiceDesc = grpc.ServiceDesc{
|
|||
ServerStreams: true,
|
||||
ClientStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "SyncNetworkTopology",
|
||||
Handler: _Scheduler_SyncNetworkTopology_Handler,
|
||||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "pkg/apis/scheduler/v2/scheduler.proto",
|
||||
}
|
||||
|
|
|
@ -316,26 +316,26 @@ message LeaveHostRequest{
|
|||
message Probe {
|
||||
// Host metadata.
|
||||
common.Host host = 1;
|
||||
// RTTs is all of the round-trip times sent via this pinger.
|
||||
repeated google.protobuf.Duration rtts = 2;
|
||||
// MinRTT is the minimum round-trip time sent via this pinger.
|
||||
google.protobuf.Duration min_rtt = 3;
|
||||
// MaxRTT is the maximum round-trip time sent via this pinger.
|
||||
google.protobuf.Duration max_rtt = 4;
|
||||
// AvgRTT is the average round-trip time sent via this pinger.
|
||||
google.protobuf.Duration avg_rtt = 5;
|
||||
// RTT is the round-trip time sent via this pinger.
|
||||
google.protobuf.Duration rtt = 2;
|
||||
// Task update time.
|
||||
google.protobuf.Timestamp updated_at = 6;
|
||||
google.protobuf.Timestamp updated_at = 3;
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
message SyncProbesRequest {
|
||||
// ProbesOfHost represents probes information of the host.
|
||||
message ProbesOfHost {
|
||||
// Host metadata.
|
||||
common.Host host = 1;
|
||||
// Probes information.
|
||||
repeated Probe probes = 2;
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
message SyncProbesRequest {
|
||||
// Probes information of the host.
|
||||
ProbesOfHost probes_of_host = 1;
|
||||
}
|
||||
|
||||
// SyncProbesResponse represents response of SyncProbes.
|
||||
message SyncProbesResponse {
|
||||
// Hosts needs to be probed.
|
||||
|
@ -344,6 +344,26 @@ message SyncProbesResponse {
|
|||
google.protobuf.Duration probe_interval = 2;
|
||||
}
|
||||
|
||||
// UpdateHostsRequest represents update hosts request of SyncNetworkTopologyRequest.
|
||||
message UpdateHostsRequest {
|
||||
// Hosts needs to be updated.
|
||||
repeated ProbesOfHost probes_of_hosts = 1;
|
||||
}
|
||||
|
||||
// DeleteHostsRequest represents delete hosts request of SyncNetworkTopologyRequest.
|
||||
message DeleteHostsRequest {
|
||||
// Hosts needs to be deleted.
|
||||
repeated ProbesOfHost probes_of_hosts = 1;
|
||||
}
|
||||
|
||||
// SyncProbesRequest represents request of SyncProbes.
|
||||
message SyncNetworkTopologyRequest {
|
||||
oneof request {
|
||||
UpdateHostsRequest update_probes_of_hosts_request = 1;
|
||||
DeleteHostsRequest delete_probes_of_hosts_request = 2;
|
||||
}
|
||||
}
|
||||
|
||||
// Scheduler RPC Service.
|
||||
service Scheduler{
|
||||
// AnnouncePeer announces peer to scheduler.
|
||||
|
@ -370,4 +390,7 @@ service Scheduler{
|
|||
|
||||
// SyncProbes sync probes of the host.
|
||||
rpc SyncProbes(stream SyncProbesRequest)returns(stream SyncProbesResponse);
|
||||
|
||||
// SyncNetworkTopology sync network topology of the hosts.
|
||||
rpc SyncNetworkTopology(stream SyncNetworkTopologyRequest)returns(google.protobuf.Empty);
|
||||
}
|
||||
|
|
135
src/scheduler.rs
135
src/scheduler.rs
|
@ -440,26 +440,17 @@ pub struct Probe {
|
|||
/// Host metadata.
|
||||
#[prost(message, optional, tag = "1")]
|
||||
pub host: ::core::option::Option<super::common::Host>,
|
||||
/// RTTs is all of the round-trip times sent via this pinger.
|
||||
#[prost(message, repeated, tag = "2")]
|
||||
pub rtts: ::prost::alloc::vec::Vec<::prost_types::Duration>,
|
||||
/// MinRTT is the minimum round-trip time sent via this pinger.
|
||||
#[prost(message, optional, tag = "3")]
|
||||
pub min_rtt: ::core::option::Option<::prost_types::Duration>,
|
||||
/// MaxRTT is the maximum round-trip time sent via this pinger.
|
||||
#[prost(message, optional, tag = "4")]
|
||||
pub max_rtt: ::core::option::Option<::prost_types::Duration>,
|
||||
/// AvgRTT is the average round-trip time sent via this pinger.
|
||||
#[prost(message, optional, tag = "5")]
|
||||
pub avg_rtt: ::core::option::Option<::prost_types::Duration>,
|
||||
/// RTT is the round-trip time sent via this pinger.
|
||||
#[prost(message, optional, tag = "2")]
|
||||
pub rtt: ::core::option::Option<::prost_types::Duration>,
|
||||
/// Task update time.
|
||||
#[prost(message, optional, tag = "6")]
|
||||
#[prost(message, optional, tag = "3")]
|
||||
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
|
||||
}
|
||||
/// SyncProbesRequest represents request of SyncProbes.
|
||||
/// ProbesOfHost represents probes information of the host.
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct SyncProbesRequest {
|
||||
pub struct ProbesOfHost {
|
||||
/// Host metadata.
|
||||
#[prost(message, optional, tag = "1")]
|
||||
pub host: ::core::option::Option<super::common::Host>,
|
||||
|
@ -467,6 +458,14 @@ pub struct SyncProbesRequest {
|
|||
#[prost(message, repeated, tag = "2")]
|
||||
pub probes: ::prost::alloc::vec::Vec<Probe>,
|
||||
}
|
||||
/// SyncProbesRequest represents request of SyncProbes.
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct SyncProbesRequest {
|
||||
/// Probes information of the host.
|
||||
#[prost(message, optional, tag = "1")]
|
||||
pub probes_of_host: ::core::option::Option<ProbesOfHost>,
|
||||
}
|
||||
/// SyncProbesResponse represents response of SyncProbes.
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
|
@ -478,6 +477,40 @@ pub struct SyncProbesResponse {
|
|||
#[prost(message, optional, tag = "2")]
|
||||
pub probe_interval: ::core::option::Option<::prost_types::Duration>,
|
||||
}
|
||||
/// UpdateHostsRequest represents update hosts request of SyncNetworkTopologyRequest.
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct UpdateHostsRequest {
|
||||
/// Hosts needs to be updated.
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub probes_of_hosts: ::prost::alloc::vec::Vec<ProbesOfHost>,
|
||||
}
|
||||
/// DeleteHostsRequest represents delete hosts request of SyncNetworkTopologyRequest.
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct DeleteHostsRequest {
|
||||
/// Hosts needs to be deleted.
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub probes_of_hosts: ::prost::alloc::vec::Vec<ProbesOfHost>,
|
||||
}
|
||||
/// SyncProbesRequest represents request of SyncProbes.
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
pub struct SyncNetworkTopologyRequest {
|
||||
#[prost(oneof = "sync_network_topology_request::Request", tags = "1, 2")]
|
||||
pub request: ::core::option::Option<sync_network_topology_request::Request>,
|
||||
}
|
||||
/// Nested message and enum types in `SyncNetworkTopologyRequest`.
|
||||
pub mod sync_network_topology_request {
|
||||
#[allow(clippy::derive_partial_eq_without_eq)]
|
||||
#[derive(Clone, PartialEq, ::prost::Oneof)]
|
||||
pub enum Request {
|
||||
#[prost(message, tag = "1")]
|
||||
UpdateProbesOfHostsRequest(super::UpdateHostsRequest),
|
||||
#[prost(message, tag = "2")]
|
||||
DeleteProbesOfHostsRequest(super::DeleteHostsRequest),
|
||||
}
|
||||
}
|
||||
/// Generated client implementations.
|
||||
pub mod scheduler_client {
|
||||
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
|
||||
|
@ -717,6 +750,30 @@ pub mod scheduler_client {
|
|||
);
|
||||
self.inner.streaming(request.into_streaming_request(), path, codec).await
|
||||
}
|
||||
/// SyncNetworkTopology sync network topology of the hosts.
|
||||
pub async fn sync_network_topology(
|
||||
&mut self,
|
||||
request: impl tonic::IntoStreamingRequest<
|
||||
Message = super::SyncNetworkTopologyRequest,
|
||||
>,
|
||||
) -> Result<tonic::Response<()>, tonic::Status> {
|
||||
self.inner
|
||||
.ready()
|
||||
.await
|
||||
.map_err(|e| {
|
||||
tonic::Status::new(
|
||||
tonic::Code::Unknown,
|
||||
format!("Service was not ready: {}", e.into()),
|
||||
)
|
||||
})?;
|
||||
let codec = tonic::codec::ProstCodec::default();
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/scheduler.Scheduler/SyncNetworkTopology",
|
||||
);
|
||||
self.inner
|
||||
.client_streaming(request.into_streaming_request(), path, codec)
|
||||
.await
|
||||
}
|
||||
}
|
||||
}
|
||||
/// Generated server implementations.
|
||||
|
@ -779,6 +836,11 @@ pub mod scheduler_server {
|
|||
&self,
|
||||
request: tonic::Request<tonic::Streaming<super::SyncProbesRequest>>,
|
||||
) -> Result<tonic::Response<Self::SyncProbesStream>, tonic::Status>;
|
||||
/// SyncNetworkTopology sync network topology of the hosts.
|
||||
async fn sync_network_topology(
|
||||
&self,
|
||||
request: tonic::Request<tonic::Streaming<super::SyncNetworkTopologyRequest>>,
|
||||
) -> Result<tonic::Response<()>, tonic::Status>;
|
||||
}
|
||||
/// Scheduler RPC Service.
|
||||
#[derive(Debug)]
|
||||
|
@ -1156,6 +1218,49 @@ pub mod scheduler_server {
|
|||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
"/scheduler.Scheduler/SyncNetworkTopology" => {
|
||||
#[allow(non_camel_case_types)]
|
||||
struct SyncNetworkTopologySvc<T: Scheduler>(pub Arc<T>);
|
||||
impl<
|
||||
T: Scheduler,
|
||||
> tonic::server::ClientStreamingService<
|
||||
super::SyncNetworkTopologyRequest,
|
||||
> for SyncNetworkTopologySvc<T> {
|
||||
type Response = ();
|
||||
type Future = BoxFuture<
|
||||
tonic::Response<Self::Response>,
|
||||
tonic::Status,
|
||||
>;
|
||||
fn call(
|
||||
&mut self,
|
||||
request: tonic::Request<
|
||||
tonic::Streaming<super::SyncNetworkTopologyRequest>,
|
||||
>,
|
||||
) -> Self::Future {
|
||||
let inner = self.0.clone();
|
||||
let fut = async move {
|
||||
(*inner).sync_network_topology(request).await
|
||||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
}
|
||||
let accept_compression_encodings = self.accept_compression_encodings;
|
||||
let send_compression_encodings = self.send_compression_encodings;
|
||||
let inner = self.inner.clone();
|
||||
let fut = async move {
|
||||
let inner = inner.0;
|
||||
let method = SyncNetworkTopologySvc(inner);
|
||||
let codec = tonic::codec::ProstCodec::default();
|
||||
let mut grpc = tonic::server::Grpc::new(codec)
|
||||
.apply_compression_config(
|
||||
accept_compression_encodings,
|
||||
send_compression_encodings,
|
||||
);
|
||||
let res = grpc.client_streaming(method, req).await;
|
||||
Ok(res)
|
||||
};
|
||||
Box::pin(fut)
|
||||
}
|
||||
_ => {
|
||||
Box::pin(async move {
|
||||
Ok(
|
||||
|
|
Loading…
Reference in New Issue