github.com/google/fleetspeak@v0.1.15-0.20240426164851-4f31f62c1aea/fleetspeak/src/server/proto/fleetspeak_server/resource.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // versions: 3 // protoc-gen-go v1.28.0 4 // protoc v4.23.4 5 // source: fleetspeak/src/server/proto/fleetspeak_server/resource.proto 6 7 package fleetspeak_server 8 9 import ( 10 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 12 timestamppb "google.golang.org/protobuf/types/known/timestamppb" 13 reflect "reflect" 14 sync "sync" 15 ) 16 17 const ( 18 // Verify that this generated code is sufficiently up-to-date. 19 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 20 // Verify that runtime/protoimpl is sufficiently up-to-date. 21 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 22 ) 23 24 // Represents client resource-usage data in the data-store. 25 // Next id: 15 26 type ClientResourceUsageRecord struct { 27 state protoimpl.MessageState 28 sizeCache protoimpl.SizeCache 29 unknownFields protoimpl.UnknownFields 30 31 // Name of the client service that resource usage is charged/attributed to 32 // e.g 'system' for the system Fleetspeak service, or the name of a daemon 33 // service as specified in its config. 34 Scope string `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"` 35 Pid int64 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"` 36 ProcessStartTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=process_start_time,json=processStartTime,proto3" json:"process_start_time,omitempty"` 37 // When the resource-usage metrics were measured on the client. 38 ClientTimestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=client_timestamp,json=clientTimestamp,proto3" json:"client_timestamp,omitempty"` 39 // When the resource usage record was written to the data-store. 40 ServerTimestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=server_timestamp,json=serverTimestamp,proto3" json:"server_timestamp,omitempty"` 41 // If true, indicates that the process has terminated, and that this is 42 // the final resource-usage record for that process. 43 ProcessTerminated bool `protobuf:"varint,12,opt,name=process_terminated,json=processTerminated,proto3" json:"process_terminated,omitempty"` 44 // CPU-usage is in millis per second. 45 MeanUserCpuRate float32 `protobuf:"fixed32,6,opt,name=mean_user_cpu_rate,json=meanUserCpuRate,proto3" json:"mean_user_cpu_rate,omitempty"` 46 MaxUserCpuRate float32 `protobuf:"fixed32,7,opt,name=max_user_cpu_rate,json=maxUserCpuRate,proto3" json:"max_user_cpu_rate,omitempty"` 47 MeanSystemCpuRate float32 `protobuf:"fixed32,8,opt,name=mean_system_cpu_rate,json=meanSystemCpuRate,proto3" json:"mean_system_cpu_rate,omitempty"` 48 MaxSystemCpuRate float32 `protobuf:"fixed32,9,opt,name=max_system_cpu_rate,json=maxSystemCpuRate,proto3" json:"max_system_cpu_rate,omitempty"` 49 MeanResidentMemoryMib int32 `protobuf:"varint,10,opt,name=mean_resident_memory_mib,json=meanResidentMemoryMib,proto3" json:"mean_resident_memory_mib,omitempty"` 50 MaxResidentMemoryMib int32 `protobuf:"varint,11,opt,name=max_resident_memory_mib,json=maxResidentMemoryMib,proto3" json:"max_resident_memory_mib,omitempty"` 51 MeanNumFds int32 `protobuf:"varint,13,opt,name=mean_num_fds,json=meanNumFds,proto3" json:"mean_num_fds,omitempty"` 52 MaxNumFds int32 `protobuf:"varint,14,opt,name=max_num_fds,json=maxNumFds,proto3" json:"max_num_fds,omitempty"` 53 } 54 55 func (x *ClientResourceUsageRecord) Reset() { 56 *x = ClientResourceUsageRecord{} 57 if protoimpl.UnsafeEnabled { 58 mi := &file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_msgTypes[0] 59 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 60 ms.StoreMessageInfo(mi) 61 } 62 } 63 64 func (x *ClientResourceUsageRecord) String() string { 65 return protoimpl.X.MessageStringOf(x) 66 } 67 68 func (*ClientResourceUsageRecord) ProtoMessage() {} 69 70 func (x *ClientResourceUsageRecord) ProtoReflect() protoreflect.Message { 71 mi := &file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_msgTypes[0] 72 if protoimpl.UnsafeEnabled && x != nil { 73 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 74 if ms.LoadMessageInfo() == nil { 75 ms.StoreMessageInfo(mi) 76 } 77 return ms 78 } 79 return mi.MessageOf(x) 80 } 81 82 // Deprecated: Use ClientResourceUsageRecord.ProtoReflect.Descriptor instead. 83 func (*ClientResourceUsageRecord) Descriptor() ([]byte, []int) { 84 return file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_rawDescGZIP(), []int{0} 85 } 86 87 func (x *ClientResourceUsageRecord) GetScope() string { 88 if x != nil { 89 return x.Scope 90 } 91 return "" 92 } 93 94 func (x *ClientResourceUsageRecord) GetPid() int64 { 95 if x != nil { 96 return x.Pid 97 } 98 return 0 99 } 100 101 func (x *ClientResourceUsageRecord) GetProcessStartTime() *timestamppb.Timestamp { 102 if x != nil { 103 return x.ProcessStartTime 104 } 105 return nil 106 } 107 108 func (x *ClientResourceUsageRecord) GetClientTimestamp() *timestamppb.Timestamp { 109 if x != nil { 110 return x.ClientTimestamp 111 } 112 return nil 113 } 114 115 func (x *ClientResourceUsageRecord) GetServerTimestamp() *timestamppb.Timestamp { 116 if x != nil { 117 return x.ServerTimestamp 118 } 119 return nil 120 } 121 122 func (x *ClientResourceUsageRecord) GetProcessTerminated() bool { 123 if x != nil { 124 return x.ProcessTerminated 125 } 126 return false 127 } 128 129 func (x *ClientResourceUsageRecord) GetMeanUserCpuRate() float32 { 130 if x != nil { 131 return x.MeanUserCpuRate 132 } 133 return 0 134 } 135 136 func (x *ClientResourceUsageRecord) GetMaxUserCpuRate() float32 { 137 if x != nil { 138 return x.MaxUserCpuRate 139 } 140 return 0 141 } 142 143 func (x *ClientResourceUsageRecord) GetMeanSystemCpuRate() float32 { 144 if x != nil { 145 return x.MeanSystemCpuRate 146 } 147 return 0 148 } 149 150 func (x *ClientResourceUsageRecord) GetMaxSystemCpuRate() float32 { 151 if x != nil { 152 return x.MaxSystemCpuRate 153 } 154 return 0 155 } 156 157 func (x *ClientResourceUsageRecord) GetMeanResidentMemoryMib() int32 { 158 if x != nil { 159 return x.MeanResidentMemoryMib 160 } 161 return 0 162 } 163 164 func (x *ClientResourceUsageRecord) GetMaxResidentMemoryMib() int32 { 165 if x != nil { 166 return x.MaxResidentMemoryMib 167 } 168 return 0 169 } 170 171 func (x *ClientResourceUsageRecord) GetMeanNumFds() int32 { 172 if x != nil { 173 return x.MeanNumFds 174 } 175 return 0 176 } 177 178 func (x *ClientResourceUsageRecord) GetMaxNumFds() int32 { 179 if x != nil { 180 return x.MaxNumFds 181 } 182 return 0 183 } 184 185 var File_fleetspeak_src_server_proto_fleetspeak_server_resource_proto protoreflect.FileDescriptor 186 187 var file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_rawDesc = []byte{ 188 0x0a, 0x3c, 0x66, 0x6c, 0x65, 0x65, 0x74, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x2f, 0x73, 0x72, 0x63, 189 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x66, 0x6c, 190 0x65, 0x65, 0x74, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 191 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 192 0x66, 0x6c, 0x65, 0x65, 0x74, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 193 0x72, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 194 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 195 0x74, 0x6f, 0x22, 0xb4, 0x05, 0x0a, 0x19, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 196 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 197 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 198 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 199 0x01, 0x28, 0x03, 0x52, 0x03, 0x70, 0x69, 0x64, 0x12, 0x48, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x63, 200 0x65, 0x73, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 201 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 202 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 203 0x52, 0x10, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 204 0x6d, 0x65, 0x12, 0x45, 0x0a, 0x10, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 205 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 206 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 207 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 208 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x45, 0x0a, 0x10, 0x73, 0x65, 0x72, 209 0x76, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 210 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 211 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 212 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 213 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x65, 0x72, 0x6d, 214 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x70, 0x72, 215 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x12, 216 0x2b, 0x0a, 0x12, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x70, 0x75, 217 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x6d, 0x65, 0x61, 218 0x6e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x70, 0x75, 0x52, 0x61, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x11, 219 0x6d, 0x61, 0x78, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x72, 0x61, 0x74, 220 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x55, 0x73, 0x65, 0x72, 221 0x43, 0x70, 0x75, 0x52, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x0a, 0x14, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 222 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 223 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x6d, 0x65, 0x61, 0x6e, 0x53, 0x79, 0x73, 0x74, 0x65, 224 0x6d, 0x43, 0x70, 0x75, 0x52, 0x61, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 225 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 226 0x09, 0x20, 0x01, 0x28, 0x02, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 227 0x43, 0x70, 0x75, 0x52, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 228 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 229 0x6d, 0x69, 0x62, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x15, 0x6d, 0x65, 0x61, 0x6e, 0x52, 230 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4d, 0x69, 0x62, 231 0x12, 0x35, 0x0a, 0x17, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, 232 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x6d, 0x69, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 233 0x05, 0x52, 0x14, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x73, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x4d, 0x65, 234 0x6d, 0x6f, 0x72, 0x79, 0x4d, 0x69, 0x62, 0x12, 0x20, 0x0a, 0x0c, 0x6d, 0x65, 0x61, 0x6e, 0x5f, 235 0x6e, 0x75, 0x6d, 0x5f, 0x66, 0x64, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 236 0x65, 0x61, 0x6e, 0x4e, 0x75, 0x6d, 0x46, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 237 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x66, 0x64, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 238 0x6d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x46, 0x64, 0x73, 0x42, 0x4c, 0x5a, 0x4a, 0x67, 0x69, 0x74, 239 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x66, 240 0x6c, 0x65, 0x65, 0x74, 0x73, 0x70, 0x65, 0x61, 0x6b, 0x2f, 0x66, 0x6c, 0x65, 0x65, 0x74, 0x73, 241 0x70, 0x65, 0x61, 0x6b, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 242 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x66, 0x6c, 0x65, 0x65, 0x74, 0x73, 0x70, 0x65, 0x61, 0x6b, 243 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 244 } 245 246 var ( 247 file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_rawDescOnce sync.Once 248 file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_rawDescData = file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_rawDesc 249 ) 250 251 func file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_rawDescGZIP() []byte { 252 file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_rawDescOnce.Do(func() { 253 file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_rawDescData) 254 }) 255 return file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_rawDescData 256 } 257 258 var file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 259 var file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_goTypes = []interface{}{ 260 (*ClientResourceUsageRecord)(nil), // 0: fleetspeak.server.ClientResourceUsageRecord 261 (*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp 262 } 263 var file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_depIdxs = []int32{ 264 1, // 0: fleetspeak.server.ClientResourceUsageRecord.process_start_time:type_name -> google.protobuf.Timestamp 265 1, // 1: fleetspeak.server.ClientResourceUsageRecord.client_timestamp:type_name -> google.protobuf.Timestamp 266 1, // 2: fleetspeak.server.ClientResourceUsageRecord.server_timestamp:type_name -> google.protobuf.Timestamp 267 3, // [3:3] is the sub-list for method output_type 268 3, // [3:3] is the sub-list for method input_type 269 3, // [3:3] is the sub-list for extension type_name 270 3, // [3:3] is the sub-list for extension extendee 271 0, // [0:3] is the sub-list for field type_name 272 } 273 274 func init() { file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_init() } 275 func file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_init() { 276 if File_fleetspeak_src_server_proto_fleetspeak_server_resource_proto != nil { 277 return 278 } 279 if !protoimpl.UnsafeEnabled { 280 file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 281 switch v := v.(*ClientResourceUsageRecord); i { 282 case 0: 283 return &v.state 284 case 1: 285 return &v.sizeCache 286 case 2: 287 return &v.unknownFields 288 default: 289 return nil 290 } 291 } 292 } 293 type x struct{} 294 out := protoimpl.TypeBuilder{ 295 File: protoimpl.DescBuilder{ 296 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 297 RawDescriptor: file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_rawDesc, 298 NumEnums: 0, 299 NumMessages: 1, 300 NumExtensions: 0, 301 NumServices: 0, 302 }, 303 GoTypes: file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_goTypes, 304 DependencyIndexes: file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_depIdxs, 305 MessageInfos: file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_msgTypes, 306 }.Build() 307 File_fleetspeak_src_server_proto_fleetspeak_server_resource_proto = out.File 308 file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_rawDesc = nil 309 file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_goTypes = nil 310 file_fleetspeak_src_server_proto_fleetspeak_server_resource_proto_depIdxs = nil 311 }