[dev] upd Alive model

This commit is contained in:
loveckiy.ivan
2025-11-12 11:50:34 +03:00
parent 2af5e5f466
commit 8785c49d0a
3 changed files with 213 additions and 54 deletions

View File

@@ -25,9 +25,8 @@ type ExecIn struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
Params string `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"`
Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
Params string `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"`
}
func (x *ExecIn) Reset() {
@@ -62,13 +61,6 @@ func (*ExecIn) Descriptor() ([]byte, []int) {
return file_plugin_proto_rawDescGZIP(), []int{0}
}
func (x *ExecIn) GetService() string {
if x != nil {
return x.Service
}
return ""
}
func (x *ExecIn) GetMethod() string {
if x != nil {
return x.Method
@@ -223,34 +215,128 @@ func (x *ListOut) GetList() map[string]string {
return nil
}
type AliveIn struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *AliveIn) Reset() {
*x = AliveIn{}
if protoimpl.UnsafeEnabled {
mi := &file_plugin_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AliveIn) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AliveIn) ProtoMessage() {}
func (x *AliveIn) ProtoReflect() protoreflect.Message {
mi := &file_plugin_proto_msgTypes[4]
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 AliveIn.ProtoReflect.Descriptor instead.
func (*AliveIn) Descriptor() ([]byte, []int) {
return file_plugin_proto_rawDescGZIP(), []int{4}
}
type AliveOut struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
List map[string]string `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *AliveOut) Reset() {
*x = AliveOut{}
if protoimpl.UnsafeEnabled {
mi := &file_plugin_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AliveOut) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AliveOut) ProtoMessage() {}
func (x *AliveOut) ProtoReflect() protoreflect.Message {
mi := &file_plugin_proto_msgTypes[5]
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 AliveOut.ProtoReflect.Descriptor instead.
func (*AliveOut) Descriptor() ([]byte, []int) {
return file_plugin_proto_rawDescGZIP(), []int{5}
}
func (x *AliveOut) GetList() map[string]string {
if x != nil {
return x.List
}
return nil
}
var File_plugin_proto protoreflect.FileDescriptor
var file_plugin_proto_rawDesc = []byte{
0x0a, 0x0c, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x22, 0x52, 0x0a, 0x06, 0x45, 0x78, 0x65, 0x63, 0x49, 0x6e,
0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68,
0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x31, 0x0a, 0x07, 0x45, 0x78,
0x65, 0x63, 0x4f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x08, 0x0a,
0x06, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x22, 0x71, 0x0a, 0x07, 0x4c, 0x69, 0x73, 0x74, 0x4f,
0x75, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x19, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x75,
0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6c, 0x69, 0x73,
0x74, 0x1a, 0x37, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0x5a, 0x0a, 0x06, 0x50, 0x6c,
0x75, 0x67, 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12, 0x0e, 0x2e, 0x70,
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x1a, 0x0f, 0x2e, 0x70,
0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x4f, 0x75, 0x74, 0x12, 0x27, 0x0a,
0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x49, 0x6e, 0x1a, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x4f, 0x75, 0x74, 0x42, 0x03, 0x5a, 0x01, 0x2e, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x22, 0x38, 0x0a, 0x06, 0x45, 0x78, 0x65, 0x63, 0x49, 0x6e,
0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61,
0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73,
0x22, 0x31, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x4f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72,
0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x02, 0x69, 0x64, 0x22, 0x08, 0x0a, 0x06, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x22, 0x71, 0x0a,
0x07, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x4f, 0x75, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x1a, 0x37, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0x09, 0x0a, 0x07, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x22, 0x73, 0x0a, 0x08, 0x41,
0x6c, 0x69, 0x76, 0x65, 0x4f, 0x75, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x41,
0x6c, 0x69, 0x76, 0x65, 0x4f, 0x75, 0x74, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72,
0x79, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x1a, 0x37, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x32, 0x86, 0x01, 0x0a, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x2a, 0x0a, 0x05, 0x41,
0x6c, 0x69, 0x76, 0x65, 0x12, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x41, 0x6c,
0x69, 0x76, 0x65, 0x49, 0x6e, 0x1a, 0x10, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x41,
0x6c, 0x69, 0x76, 0x65, 0x4f, 0x75, 0x74, 0x12, 0x27, 0x0a, 0x04, 0x45, 0x78, 0x65, 0x63, 0x12,
0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x49, 0x6e, 0x1a,
0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x4f, 0x75, 0x74,
0x12, 0x27, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0e, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x1a, 0x0f, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69,
0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x75, 0x74, 0x42, 0x03, 0x5a, 0x01, 0x2e, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -265,25 +351,31 @@ func file_plugin_proto_rawDescGZIP() []byte {
return file_plugin_proto_rawDescData
}
var file_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_plugin_proto_goTypes = []interface{}{
(*ExecIn)(nil), // 0: plugin.ExecIn
(*ExecOut)(nil), // 1: plugin.ExecOut
(*ListIn)(nil), // 2: plugin.ListIn
(*ListOut)(nil), // 3: plugin.ListOut
nil, // 4: plugin.ListOut.ListEntry
(*ExecIn)(nil), // 0: plugin.ExecIn
(*ExecOut)(nil), // 1: plugin.ExecOut
(*ListIn)(nil), // 2: plugin.ListIn
(*ListOut)(nil), // 3: plugin.ListOut
(*AliveIn)(nil), // 4: plugin.AliveIn
(*AliveOut)(nil), // 5: plugin.AliveOut
nil, // 6: plugin.ListOut.ListEntry
nil, // 7: plugin.AliveOut.ListEntry
}
var file_plugin_proto_depIdxs = []int32{
4, // 0: plugin.ListOut.list:type_name -> plugin.ListOut.ListEntry
0, // 1: plugin.Plugin.Exec:input_type -> plugin.ExecIn
2, // 2: plugin.Plugin.List:input_type -> plugin.ListIn
1, // 3: plugin.Plugin.Exec:output_type -> plugin.ExecOut
3, // 4: plugin.Plugin.List:output_type -> plugin.ListOut
3, // [3:5] is the sub-list for method output_type
1, // [1:3] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
6, // 0: plugin.ListOut.list:type_name -> plugin.ListOut.ListEntry
7, // 1: plugin.AliveOut.list:type_name -> plugin.AliveOut.ListEntry
4, // 2: plugin.Plugin.Alive:input_type -> plugin.AliveIn
0, // 3: plugin.Plugin.Exec:input_type -> plugin.ExecIn
2, // 4: plugin.Plugin.List:input_type -> plugin.ListIn
5, // 5: plugin.Plugin.Alive:output_type -> plugin.AliveOut
1, // 6: plugin.Plugin.Exec:output_type -> plugin.ExecOut
3, // 7: plugin.Plugin.List:output_type -> plugin.ListOut
5, // [5:8] is the sub-list for method output_type
2, // [2:5] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_plugin_proto_init() }
@@ -340,6 +432,30 @@ func file_plugin_proto_init() {
return nil
}
}
file_plugin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AliveIn); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_plugin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AliveOut); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -347,7 +463,7 @@ func file_plugin_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_plugin_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},