diff --git a/gen/supernode/service.pb.go b/gen/supernode/service.pb.go index c70a14dc..0c0a5b3a 100644 --- a/gen/supernode/service.pb.go +++ b/gen/supernode/service.pb.go @@ -163,27 +163,29 @@ func (x *ServiceInfo) GetMethods() []string { return nil } -// Pprof message types -type GetPprofIndexRequest struct { +// Raw pprof request/response messages +type RawPprofRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Debug int32 `protobuf:"varint,1,opt,name=debug,proto3" json:"debug,omitempty"` // Debug level (0 for binary, >0 for text) } -func (x *GetPprofIndexRequest) Reset() { - *x = GetPprofIndexRequest{} +func (x *RawPprofRequest) Reset() { + *x = RawPprofRequest{} mi := &file_supernode_service_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetPprofIndexRequest) String() string { +func (x *RawPprofRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPprofIndexRequest) ProtoMessage() {} +func (*RawPprofRequest) ProtoMessage() {} -func (x *GetPprofIndexRequest) ProtoReflect() protoreflect.Message { +func (x *RawPprofRequest) ProtoReflect() protoreflect.Message { mi := &file_supernode_service_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -195,132 +197,41 @@ func (x *GetPprofIndexRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPprofIndexRequest.ProtoReflect.Descriptor instead. -func (*GetPprofIndexRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use RawPprofRequest.ProtoReflect.Descriptor instead. +func (*RawPprofRequest) Descriptor() ([]byte, []int) { return file_supernode_service_proto_rawDescGZIP(), []int{3} } -type GetPprofIndexResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Html string `protobuf:"bytes,1,opt,name=html,proto3" json:"html,omitempty"` // HTML content for the pprof index page - Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` // Whether profiling is enabled -} - -func (x *GetPprofIndexResponse) Reset() { - *x = GetPprofIndexResponse{} - mi := &file_supernode_service_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetPprofIndexResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPprofIndexResponse) ProtoMessage() {} - -func (x *GetPprofIndexResponse) ProtoReflect() protoreflect.Message { - mi := &file_supernode_service_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPprofIndexResponse.ProtoReflect.Descriptor instead. -func (*GetPprofIndexResponse) Descriptor() ([]byte, []int) { - return file_supernode_service_proto_rawDescGZIP(), []int{4} -} - -func (x *GetPprofIndexResponse) GetHtml() string { - if x != nil { - return x.Html - } - return "" -} - -func (x *GetPprofIndexResponse) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -type GetPprofProfileRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Debug int32 `protobuf:"varint,1,opt,name=debug,proto3" json:"debug,omitempty"` // Debug level (optional, default 1) -} - -func (x *GetPprofProfileRequest) Reset() { - *x = GetPprofProfileRequest{} - mi := &file_supernode_service_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GetPprofProfileRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetPprofProfileRequest) ProtoMessage() {} - -func (x *GetPprofProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_supernode_service_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetPprofProfileRequest.ProtoReflect.Descriptor instead. -func (*GetPprofProfileRequest) Descriptor() ([]byte, []int) { - return file_supernode_service_proto_rawDescGZIP(), []int{5} -} - -func (x *GetPprofProfileRequest) GetDebug() int32 { +func (x *RawPprofRequest) GetDebug() int32 { if x != nil { return x.Debug } return 0 } -type GetPprofCpuProfileRequest struct { +type RawPprofCpuRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Seconds int32 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` // Duration in seconds (optional, default 30) + Seconds int32 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` // CPU profile duration in seconds (default 30) } -func (x *GetPprofCpuProfileRequest) Reset() { - *x = GetPprofCpuProfileRequest{} - mi := &file_supernode_service_proto_msgTypes[6] +func (x *RawPprofCpuRequest) Reset() { + *x = RawPprofCpuRequest{} + mi := &file_supernode_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetPprofCpuProfileRequest) String() string { +func (x *RawPprofCpuRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPprofCpuProfileRequest) ProtoMessage() {} +func (*RawPprofCpuRequest) ProtoMessage() {} -func (x *GetPprofCpuProfileRequest) ProtoReflect() protoreflect.Message { - mi := &file_supernode_service_proto_msgTypes[6] +func (x *RawPprofCpuRequest) ProtoReflect() protoreflect.Message { + mi := &file_supernode_service_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -331,44 +242,41 @@ func (x *GetPprofCpuProfileRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPprofCpuProfileRequest.ProtoReflect.Descriptor instead. -func (*GetPprofCpuProfileRequest) Descriptor() ([]byte, []int) { - return file_supernode_service_proto_rawDescGZIP(), []int{6} +// Deprecated: Use RawPprofCpuRequest.ProtoReflect.Descriptor instead. +func (*RawPprofCpuRequest) Descriptor() ([]byte, []int) { + return file_supernode_service_proto_rawDescGZIP(), []int{4} } -func (x *GetPprofCpuProfileRequest) GetSeconds() int32 { +func (x *RawPprofCpuRequest) GetSeconds() int32 { if x != nil { return x.Seconds } return 0 } -type GetPprofProfileResponse struct { +type RawPprofResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // Profile data (binary pprof format) - ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` // Content type of the response - Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"` // Whether profiling is enabled - Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"` // Error message if profiling is disabled + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // Raw pprof data exactly as returned by runtime/pprof } -func (x *GetPprofProfileResponse) Reset() { - *x = GetPprofProfileResponse{} - mi := &file_supernode_service_proto_msgTypes[7] +func (x *RawPprofResponse) Reset() { + *x = RawPprofResponse{} + mi := &file_supernode_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *GetPprofProfileResponse) String() string { +func (x *RawPprofResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetPprofProfileResponse) ProtoMessage() {} +func (*RawPprofResponse) ProtoMessage() {} -func (x *GetPprofProfileResponse) ProtoReflect() protoreflect.Message { - mi := &file_supernode_service_proto_msgTypes[7] +func (x *RawPprofResponse) ProtoReflect() protoreflect.Message { + mi := &file_supernode_service_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -379,39 +287,18 @@ func (x *GetPprofProfileResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetPprofProfileResponse.ProtoReflect.Descriptor instead. -func (*GetPprofProfileResponse) Descriptor() ([]byte, []int) { - return file_supernode_service_proto_rawDescGZIP(), []int{7} +// Deprecated: Use RawPprofResponse.ProtoReflect.Descriptor instead. +func (*RawPprofResponse) Descriptor() ([]byte, []int) { + return file_supernode_service_proto_rawDescGZIP(), []int{5} } -func (x *GetPprofProfileResponse) GetData() []byte { +func (x *RawPprofResponse) GetData() []byte { if x != nil { return x.Data } return nil } -func (x *GetPprofProfileResponse) GetContentType() string { - if x != nil { - return x.ContentType - } - return "" -} - -func (x *GetPprofProfileResponse) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - -func (x *GetPprofProfileResponse) GetError() string { - if x != nil { - return x.Error - } - return "" -} - var File_supernode_service_proto protoreflect.FileDescriptor var file_supernode_service_proto_rawDesc = []byte{ @@ -432,108 +319,113 @@ var file_supernode_service_proto_rawDesc = []byte{ 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, - 0x22, 0x16, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, - 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x45, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x50, - 0x70, 0x72, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x74, 0x6d, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x68, 0x74, 0x6d, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, - 0x2e, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, - 0x75, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x22, - 0x35, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x43, 0x70, 0x75, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, - 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x80, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x50, 0x70, - 0x72, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, - 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, - 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x32, 0xc5, 0x09, 0x0a, 0x10, 0x53, 0x75, - 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, - 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x75, - 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x69, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x12, 0x6f, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, - 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, - 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f, 0x70, - 0x70, 0x72, 0x6f, 0x66, 0x12, 0x77, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, - 0x48, 0x65, 0x61, 0x70, 0x12, 0x21, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, - 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, - 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, - 0x75, 0x67, 0x2f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x2f, 0x68, 0x65, 0x61, 0x70, 0x12, 0x81, 0x01, - 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x47, 0x6f, 0x72, 0x6f, 0x75, 0x74, - 0x69, 0x6e, 0x65, 0x12, 0x21, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, - 0x67, 0x2f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x2f, 0x67, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, - 0x65, 0x12, 0x7b, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x41, 0x6c, 0x6c, - 0x6f, 0x63, 0x73, 0x12, 0x21, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, - 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, - 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, - 0x67, 0x2f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x73, 0x12, 0x79, - 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, - 0x21, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, - 0x70, 0x72, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f, 0x70, 0x70, - 0x72, 0x6f, 0x66, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x79, 0x0a, 0x0d, 0x47, 0x65, 0x74, - 0x50, 0x70, 0x72, 0x6f, 0x66, 0x4d, 0x75, 0x74, 0x65, 0x78, 0x12, 0x21, 0x2e, 0x73, 0x75, 0x70, - 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x50, - 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, - 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, - 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x2f, 0x6d, - 0x75, 0x74, 0x65, 0x78, 0x12, 0x87, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, - 0x66, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, - 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, - 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, - 0x50, 0x70, 0x72, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f, 0x70, 0x70, 0x72, 0x6f, - 0x66, 0x2f, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x80, - 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, - 0x6c, 0x65, 0x12, 0x24, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x43, 0x70, 0x75, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, - 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x50, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, - 0x62, 0x75, 0x67, 0x2f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, - 0x65, 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x4c, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, - 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x6e, 0x2f, - 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x22, 0x27, 0x0a, 0x0f, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x64, 0x65, 0x62, 0x75, 0x67, 0x22, 0x2e, 0x0a, 0x12, 0x52, 0x61, 0x77, + 0x50, 0x70, 0x72, 0x6f, 0x66, 0x43, 0x70, 0x75, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0x26, 0x0a, 0x10, 0x52, 0x61, 0x77, + 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x32, 0xec, 0x0b, 0x0a, 0x10, 0x53, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x58, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, + 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, + 0x12, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x69, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, + 0x12, 0x1e, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x76, 0x31, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x67, 0x0a, 0x0b, 0x47, + 0x65, 0x74, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x12, 0x1a, 0x2e, 0x73, 0x75, 0x70, + 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, + 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f, 0x72, 0x61, 0x77, 0x2f, 0x70, + 0x70, 0x72, 0x6f, 0x66, 0x12, 0x70, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x50, 0x70, + 0x72, 0x6f, 0x66, 0x48, 0x65, 0x61, 0x70, 0x12, 0x1a, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f, 0x72, 0x61, 0x77, 0x2f, 0x70, 0x70, 0x72, 0x6f, + 0x66, 0x2f, 0x68, 0x65, 0x61, 0x70, 0x12, 0x7a, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, + 0x50, 0x70, 0x72, 0x6f, 0x66, 0x47, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x65, 0x12, 0x1a, + 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, + 0x72, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x75, 0x70, + 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, + 0x21, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f, 0x72, + 0x61, 0x77, 0x2f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x2f, 0x67, 0x6f, 0x72, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x65, 0x12, 0x74, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, + 0x66, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, + 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, + 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f, 0x72, 0x61, 0x77, 0x2f, 0x70, 0x70, 0x72, 0x6f, + 0x66, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x73, 0x12, 0x72, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, + 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1a, 0x2e, 0x73, + 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, + 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f, 0x72, 0x61, 0x77, + 0x2f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x72, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x4d, 0x75, 0x74, 0x65, 0x78, + 0x12, 0x1a, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, + 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, + 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, + 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1f, 0x12, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, + 0x2f, 0x72, 0x61, 0x77, 0x2f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x2f, 0x6d, 0x75, 0x74, 0x65, 0x78, + 0x12, 0x80, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, + 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x2e, 0x73, + 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, + 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f, 0x72, 0x61, 0x77, + 0x2f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x2f, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x12, 0x79, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, + 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x2e, 0x73, 0x75, 0x70, 0x65, + 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x43, 0x70, + 0x75, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, + 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f, 0x72, 0x61, 0x77, + 0x2f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x76, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x43, 0x6d, 0x64, + 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1a, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, + 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, + 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, + 0x65, 0x62, 0x75, 0x67, 0x2f, 0x72, 0x61, 0x77, 0x2f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x2f, 0x63, + 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x74, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, + 0x50, 0x70, 0x72, 0x6f, 0x66, 0x53, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x1a, 0x2e, 0x73, 0x75, + 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, + 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x2f, 0x72, 0x61, 0x77, 0x2f, + 0x70, 0x70, 0x72, 0x6f, 0x66, 0x2f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x72, 0x0a, 0x10, + 0x47, 0x65, 0x74, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, 0x66, 0x54, 0x72, 0x61, 0x63, 0x65, + 0x12, 0x1a, 0x2e, 0x73, 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, + 0x50, 0x70, 0x72, 0x6f, 0x66, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, + 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x52, 0x61, 0x77, 0x50, 0x70, 0x72, 0x6f, + 0x66, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1f, 0x12, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, + 0x2f, 0x72, 0x61, 0x77, 0x2f, 0x70, 0x70, 0x72, 0x6f, 0x66, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, + 0x42, 0x36, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, + 0x75, 0x6d, 0x65, 0x72, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x73, 0x75, + 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x73, + 0x75, 0x70, 0x65, 0x72, 0x6e, 0x6f, 0x64, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -548,43 +440,47 @@ func file_supernode_service_proto_rawDescGZIP() []byte { return file_supernode_service_proto_rawDescData } -var file_supernode_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_supernode_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_supernode_service_proto_goTypes = []any{ - (*ListServicesRequest)(nil), // 0: supernode.ListServicesRequest - (*ListServicesResponse)(nil), // 1: supernode.ListServicesResponse - (*ServiceInfo)(nil), // 2: supernode.ServiceInfo - (*GetPprofIndexRequest)(nil), // 3: supernode.GetPprofIndexRequest - (*GetPprofIndexResponse)(nil), // 4: supernode.GetPprofIndexResponse - (*GetPprofProfileRequest)(nil), // 5: supernode.GetPprofProfileRequest - (*GetPprofCpuProfileRequest)(nil), // 6: supernode.GetPprofCpuProfileRequest - (*GetPprofProfileResponse)(nil), // 7: supernode.GetPprofProfileResponse - (*StatusRequest)(nil), // 8: supernode.StatusRequest - (*StatusResponse)(nil), // 9: supernode.StatusResponse + (*ListServicesRequest)(nil), // 0: supernode.ListServicesRequest + (*ListServicesResponse)(nil), // 1: supernode.ListServicesResponse + (*ServiceInfo)(nil), // 2: supernode.ServiceInfo + (*RawPprofRequest)(nil), // 3: supernode.RawPprofRequest + (*RawPprofCpuRequest)(nil), // 4: supernode.RawPprofCpuRequest + (*RawPprofResponse)(nil), // 5: supernode.RawPprofResponse + (*StatusRequest)(nil), // 6: supernode.StatusRequest + (*StatusResponse)(nil), // 7: supernode.StatusResponse } var file_supernode_service_proto_depIdxs = []int32{ 2, // 0: supernode.ListServicesResponse.services:type_name -> supernode.ServiceInfo - 8, // 1: supernode.SupernodeService.GetStatus:input_type -> supernode.StatusRequest + 6, // 1: supernode.SupernodeService.GetStatus:input_type -> supernode.StatusRequest 0, // 2: supernode.SupernodeService.ListServices:input_type -> supernode.ListServicesRequest - 3, // 3: supernode.SupernodeService.GetPprofIndex:input_type -> supernode.GetPprofIndexRequest - 5, // 4: supernode.SupernodeService.GetPprofHeap:input_type -> supernode.GetPprofProfileRequest - 5, // 5: supernode.SupernodeService.GetPprofGoroutine:input_type -> supernode.GetPprofProfileRequest - 5, // 6: supernode.SupernodeService.GetPprofAllocs:input_type -> supernode.GetPprofProfileRequest - 5, // 7: supernode.SupernodeService.GetPprofBlock:input_type -> supernode.GetPprofProfileRequest - 5, // 8: supernode.SupernodeService.GetPprofMutex:input_type -> supernode.GetPprofProfileRequest - 5, // 9: supernode.SupernodeService.GetPprofThreadcreate:input_type -> supernode.GetPprofProfileRequest - 6, // 10: supernode.SupernodeService.GetPprofProfile:input_type -> supernode.GetPprofCpuProfileRequest - 9, // 11: supernode.SupernodeService.GetStatus:output_type -> supernode.StatusResponse - 1, // 12: supernode.SupernodeService.ListServices:output_type -> supernode.ListServicesResponse - 4, // 13: supernode.SupernodeService.GetPprofIndex:output_type -> supernode.GetPprofIndexResponse - 7, // 14: supernode.SupernodeService.GetPprofHeap:output_type -> supernode.GetPprofProfileResponse - 7, // 15: supernode.SupernodeService.GetPprofGoroutine:output_type -> supernode.GetPprofProfileResponse - 7, // 16: supernode.SupernodeService.GetPprofAllocs:output_type -> supernode.GetPprofProfileResponse - 7, // 17: supernode.SupernodeService.GetPprofBlock:output_type -> supernode.GetPprofProfileResponse - 7, // 18: supernode.SupernodeService.GetPprofMutex:output_type -> supernode.GetPprofProfileResponse - 7, // 19: supernode.SupernodeService.GetPprofThreadcreate:output_type -> supernode.GetPprofProfileResponse - 7, // 20: supernode.SupernodeService.GetPprofProfile:output_type -> supernode.GetPprofProfileResponse - 11, // [11:21] is the sub-list for method output_type - 1, // [1:11] is the sub-list for method input_type + 3, // 3: supernode.SupernodeService.GetRawPprof:input_type -> supernode.RawPprofRequest + 3, // 4: supernode.SupernodeService.GetRawPprofHeap:input_type -> supernode.RawPprofRequest + 3, // 5: supernode.SupernodeService.GetRawPprofGoroutine:input_type -> supernode.RawPprofRequest + 3, // 6: supernode.SupernodeService.GetRawPprofAllocs:input_type -> supernode.RawPprofRequest + 3, // 7: supernode.SupernodeService.GetRawPprofBlock:input_type -> supernode.RawPprofRequest + 3, // 8: supernode.SupernodeService.GetRawPprofMutex:input_type -> supernode.RawPprofRequest + 3, // 9: supernode.SupernodeService.GetRawPprofThreadcreate:input_type -> supernode.RawPprofRequest + 4, // 10: supernode.SupernodeService.GetRawPprofProfile:input_type -> supernode.RawPprofCpuRequest + 3, // 11: supernode.SupernodeService.GetRawPprofCmdline:input_type -> supernode.RawPprofRequest + 3, // 12: supernode.SupernodeService.GetRawPprofSymbol:input_type -> supernode.RawPprofRequest + 3, // 13: supernode.SupernodeService.GetRawPprofTrace:input_type -> supernode.RawPprofRequest + 7, // 14: supernode.SupernodeService.GetStatus:output_type -> supernode.StatusResponse + 1, // 15: supernode.SupernodeService.ListServices:output_type -> supernode.ListServicesResponse + 5, // 16: supernode.SupernodeService.GetRawPprof:output_type -> supernode.RawPprofResponse + 5, // 17: supernode.SupernodeService.GetRawPprofHeap:output_type -> supernode.RawPprofResponse + 5, // 18: supernode.SupernodeService.GetRawPprofGoroutine:output_type -> supernode.RawPprofResponse + 5, // 19: supernode.SupernodeService.GetRawPprofAllocs:output_type -> supernode.RawPprofResponse + 5, // 20: supernode.SupernodeService.GetRawPprofBlock:output_type -> supernode.RawPprofResponse + 5, // 21: supernode.SupernodeService.GetRawPprofMutex:output_type -> supernode.RawPprofResponse + 5, // 22: supernode.SupernodeService.GetRawPprofThreadcreate:output_type -> supernode.RawPprofResponse + 5, // 23: supernode.SupernodeService.GetRawPprofProfile:output_type -> supernode.RawPprofResponse + 5, // 24: supernode.SupernodeService.GetRawPprofCmdline:output_type -> supernode.RawPprofResponse + 5, // 25: supernode.SupernodeService.GetRawPprofSymbol:output_type -> supernode.RawPprofResponse + 5, // 26: supernode.SupernodeService.GetRawPprofTrace:output_type -> supernode.RawPprofResponse + 14, // [14:27] is the sub-list for method output_type + 1, // [1:14] 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 @@ -602,7 +498,7 @@ func file_supernode_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_supernode_service_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/supernode/service.pb.gw.go b/gen/supernode/service.pb.gw.go index 9cdfafbc..89e6ca78 100644 --- a/gen/supernode/service.pb.gw.go +++ b/gen/supernode/service.pb.gw.go @@ -10,587 +10,737 @@ package supernode import ( "context" + "errors" "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - var ( - filter_SupernodeService_GetStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + _ codes.Code + _ io.Reader + _ status.Status + _ = errors.New + _ = runtime.String + _ = utilities.NewDoubleArray + _ = metadata.Join ) -func request_SupernodeService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StatusRequest - var metadata runtime.ServerMetadata +var filter_SupernodeService_GetStatus_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_SupernodeService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq StatusRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetStatus_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SupernodeService_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq StatusRequest - var metadata runtime.ServerMetadata - + var ( + protoReq StatusRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetStatus_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.GetStatus(ctx, &protoReq) return msg, metadata, err - } func request_SupernodeService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListServicesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListServicesRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } msg, err := client.ListServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } func local_request_SupernodeService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListServicesRequest - var metadata runtime.ServerMetadata - + var ( + protoReq ListServicesRequest + metadata runtime.ServerMetadata + ) msg, err := server.ListServices(ctx, &protoReq) return msg, metadata, err - } -func request_SupernodeService_GetPprofIndex_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofIndexRequest - var metadata runtime.ServerMetadata +var filter_SupernodeService_GetRawPprof_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} - msg, err := client.GetPprofIndex(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) +func request_SupernodeService_GetRawPprof_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprof_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.GetRawPprof(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } -func local_request_SupernodeService_GetPprofIndex_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofIndexRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetPprofIndex(ctx, &protoReq) +func local_request_SupernodeService_GetRawPprof_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprof_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetRawPprof(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_SupernodeService_GetPprofHeap_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SupernodeService_GetPprofHeap_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofProfileRequest - var metadata runtime.ServerMetadata +var filter_SupernodeService_GetRawPprofHeap_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_SupernodeService_GetRawPprofHeap_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofHeap_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofHeap_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := client.GetPprofHeap(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetRawPprofHeap(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } -func local_request_SupernodeService_GetPprofHeap_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofProfileRequest - var metadata runtime.ServerMetadata - +func local_request_SupernodeService_GetRawPprofHeap_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofHeap_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofHeap_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := server.GetPprofHeap(ctx, &protoReq) + msg, err := server.GetRawPprofHeap(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_SupernodeService_GetPprofGoroutine_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SupernodeService_GetPprofGoroutine_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofProfileRequest - var metadata runtime.ServerMetadata +var filter_SupernodeService_GetRawPprofGoroutine_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_SupernodeService_GetRawPprofGoroutine_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofGoroutine_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofGoroutine_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := client.GetPprofGoroutine(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetRawPprofGoroutine(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } -func local_request_SupernodeService_GetPprofGoroutine_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofProfileRequest - var metadata runtime.ServerMetadata - +func local_request_SupernodeService_GetRawPprofGoroutine_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofGoroutine_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofGoroutine_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := server.GetPprofGoroutine(ctx, &protoReq) + msg, err := server.GetRawPprofGoroutine(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_SupernodeService_GetPprofAllocs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SupernodeService_GetPprofAllocs_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofProfileRequest - var metadata runtime.ServerMetadata +var filter_SupernodeService_GetRawPprofAllocs_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_SupernodeService_GetRawPprofAllocs_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofAllocs_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofAllocs_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := client.GetPprofAllocs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetRawPprofAllocs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } -func local_request_SupernodeService_GetPprofAllocs_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofProfileRequest - var metadata runtime.ServerMetadata - +func local_request_SupernodeService_GetRawPprofAllocs_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofAllocs_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofAllocs_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := server.GetPprofAllocs(ctx, &protoReq) + msg, err := server.GetRawPprofAllocs(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_SupernodeService_GetPprofBlock_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SupernodeService_GetPprofBlock_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofProfileRequest - var metadata runtime.ServerMetadata +var filter_SupernodeService_GetRawPprofBlock_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_SupernodeService_GetRawPprofBlock_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofBlock_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofBlock_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := client.GetPprofBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetRawPprofBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } -func local_request_SupernodeService_GetPprofBlock_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofProfileRequest - var metadata runtime.ServerMetadata - +func local_request_SupernodeService_GetRawPprofBlock_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofBlock_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofBlock_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := server.GetPprofBlock(ctx, &protoReq) + msg, err := server.GetRawPprofBlock(ctx, &protoReq) return msg, metadata, err - } -var ( - filter_SupernodeService_GetPprofMutex_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SupernodeService_GetPprofMutex_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofProfileRequest - var metadata runtime.ServerMetadata +var filter_SupernodeService_GetRawPprofMutex_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_SupernodeService_GetRawPprofMutex_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofMutex_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofMutex_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := client.GetPprofMutex(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetRawPprofMutex(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err +} +func local_request_SupernodeService_GetRawPprofMutex_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofMutex_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetRawPprofMutex(ctx, &protoReq) + return msg, metadata, err } -func local_request_SupernodeService_GetPprofMutex_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofProfileRequest - var metadata runtime.ServerMetadata +var filter_SupernodeService_GetRawPprofThreadcreate_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_SupernodeService_GetRawPprofThreadcreate_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofMutex_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofThreadcreate_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := server.GetPprofMutex(ctx, &protoReq) + msg, err := client.GetRawPprofThreadcreate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } -var ( - filter_SupernodeService_GetPprofThreadcreate_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +func local_request_SupernodeService_GetRawPprofThreadcreate_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofThreadcreate_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetRawPprofThreadcreate(ctx, &protoReq) + return msg, metadata, err +} -func request_SupernodeService_GetPprofThreadcreate_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofProfileRequest - var metadata runtime.ServerMetadata +var filter_SupernodeService_GetRawPprofProfile_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_SupernodeService_GetRawPprofProfile_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofCpuRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofThreadcreate_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofProfile_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := client.GetPprofThreadcreate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetRawPprofProfile(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err +} +func local_request_SupernodeService_GetRawPprofProfile_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofCpuRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofProfile_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetRawPprofProfile(ctx, &protoReq) + return msg, metadata, err } -func local_request_SupernodeService_GetPprofThreadcreate_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofProfileRequest - var metadata runtime.ServerMetadata +var filter_SupernodeService_GetRawPprofCmdline_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_SupernodeService_GetRawPprofCmdline_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofThreadcreate_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofCmdline_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := server.GetPprofThreadcreate(ctx, &protoReq) + msg, err := client.GetRawPprofCmdline(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err - } -var ( - filter_SupernodeService_GetPprofProfile_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) +func local_request_SupernodeService_GetRawPprofCmdline_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofCmdline_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetRawPprofCmdline(ctx, &protoReq) + return msg, metadata, err +} -func request_SupernodeService_GetPprofProfile_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofCpuProfileRequest - var metadata runtime.ServerMetadata +var filter_SupernodeService_GetRawPprofSymbol_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_SupernodeService_GetRawPprofSymbol_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofProfile_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofSymbol_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := client.GetPprofProfile(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetRawPprofSymbol(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err +} +func local_request_SupernodeService_GetRawPprofSymbol_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofSymbol_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetRawPprofSymbol(ctx, &protoReq) + return msg, metadata, err } -func local_request_SupernodeService_GetPprofProfile_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetPprofCpuProfileRequest - var metadata runtime.ServerMetadata +var filter_SupernodeService_GetRawPprofTrace_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +func request_SupernodeService_GetRawPprofTrace_0(ctx context.Context, marshaler runtime.Marshaler, client SupernodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if req.Body != nil { + _, _ = io.Copy(io.Discard, req.Body) + } if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetPprofProfile_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofTrace_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - - msg, err := server.GetPprofProfile(ctx, &protoReq) + msg, err := client.GetRawPprofTrace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err +} +func local_request_SupernodeService_GetRawPprofTrace_0(ctx context.Context, marshaler runtime.Marshaler, server SupernodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var ( + protoReq RawPprofRequest + metadata runtime.ServerMetadata + ) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SupernodeService_GetRawPprofTrace_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.GetRawPprofTrace(ctx, &protoReq) + return msg, metadata, err } // RegisterSupernodeServiceHandlerServer registers the http handlers for service SupernodeService to "mux". // UnaryRPC :call SupernodeServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSupernodeServiceHandlerFromEndpoint instead. +// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call. func RegisterSupernodeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SupernodeServiceServer) error { - - mux.Handle("GET", pattern_SupernodeService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/supernode.SupernodeService/GetStatus", runtime.WithHTTPPathPattern("/api/v1/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SupernodeService_GetStatus_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SupernodeService_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/supernode.SupernodeService/ListServices", runtime.WithHTTPPathPattern("/api/v1/services")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SupernodeService_ListServices_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SupernodeService_ListServices_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_ListServices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofIndex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprof_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprof", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SupernodeService_GetPprofIndex_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SupernodeService_GetRawPprof_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofIndex_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_GetRawPprof_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofHeap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofHeap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofHeap", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/heap")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SupernodeService_GetPprofHeap_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SupernodeService_GetRawPprofHeap_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofHeap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_GetRawPprofHeap_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofGoroutine_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofGoroutine_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofGoroutine", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/goroutine")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SupernodeService_GetPprofGoroutine_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SupernodeService_GetRawPprofGoroutine_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofGoroutine_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_GetRawPprofGoroutine_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofAllocs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofAllocs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofAllocs", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/allocs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SupernodeService_GetPprofAllocs_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SupernodeService_GetRawPprofAllocs_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofAllocs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_GetRawPprofAllocs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofBlock", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/block")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SupernodeService_GetPprofBlock_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SupernodeService_GetRawPprofBlock_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_GetRawPprofBlock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofMutex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofMutex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofMutex", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/mutex")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SupernodeService_GetPprofMutex_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SupernodeService_GetRawPprofMutex_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SupernodeService_GetRawPprofMutex_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofThreadcreate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofThreadcreate", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/threadcreate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofMutex_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + resp, md, err := local_request_SupernodeService_GetRawPprofThreadcreate_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SupernodeService_GetRawPprofThreadcreate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofThreadcreate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofProfile", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/profile")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SupernodeService_GetPprofThreadcreate_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SupernodeService_GetRawPprofProfile_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SupernodeService_GetRawPprofProfile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofCmdline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofCmdline", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/cmdline")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofThreadcreate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + resp, md, err := local_request_SupernodeService_GetRawPprofCmdline_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SupernodeService_GetRawPprofCmdline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofSymbol_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofSymbol", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/symbol")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SupernodeService_GetPprofProfile_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SupernodeService_GetRawPprofSymbol_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SupernodeService_GetRawPprofSymbol_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofTrace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofTrace", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/trace")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofProfile_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + resp, md, err := local_request_SupernodeService_GetRawPprofTrace_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SupernodeService_GetRawPprofTrace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil @@ -599,25 +749,24 @@ func RegisterSupernodeServiceHandlerServer(ctx context.Context, mux *runtime.Ser // RegisterSupernodeServiceHandlerFromEndpoint is same as RegisterSupernodeServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterSupernodeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.NewClient(endpoint, opts...) if err != nil { return err } defer func() { if err != nil { if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } return } go func() { <-ctx.Done() if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) } }() }() - return RegisterSupernodeServiceHandler(ctx, mux, conn) } @@ -631,252 +780,260 @@ func RegisterSupernodeServiceHandler(ctx context.Context, mux *runtime.ServeMux, // to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SupernodeServiceClient". // Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SupernodeServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "SupernodeServiceClient" to call the correct interceptors. +// "SupernodeServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares. func RegisterSupernodeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SupernodeServiceClient) error { - - mux.Handle("GET", pattern_SupernodeService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/supernode.SupernodeService/GetStatus", runtime.WithHTTPPathPattern("/api/v1/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SupernodeService_GetStatus_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_SupernodeService_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/supernode.SupernodeService/ListServices", runtime.WithHTTPPathPattern("/api/v1/services")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SupernodeService_ListServices_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_SupernodeService_ListServices_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_ListServices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_ListServices_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofIndex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprof_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprof", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SupernodeService_GetPprofIndex_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_SupernodeService_GetRawPprof_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofIndex_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_GetRawPprof_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofHeap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofHeap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofHeap", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/heap")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SupernodeService_GetPprofHeap_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_SupernodeService_GetRawPprofHeap_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofHeap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_GetRawPprofHeap_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofGoroutine_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofGoroutine_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofGoroutine", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/goroutine")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SupernodeService_GetPprofGoroutine_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_SupernodeService_GetRawPprofGoroutine_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofGoroutine_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_GetRawPprofGoroutine_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofAllocs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofAllocs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofAllocs", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/allocs")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SupernodeService_GetPprofAllocs_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_SupernodeService_GetRawPprofAllocs_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofAllocs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_GetRawPprofAllocs_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofBlock", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/block")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SupernodeService_GetPprofBlock_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_SupernodeService_GetRawPprofBlock_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + forward_SupernodeService_GetRawPprofBlock_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofMutex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofMutex_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofMutex", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/mutex")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SupernodeService_GetPprofMutex_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_SupernodeService_GetRawPprofMutex_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SupernodeService_GetRawPprofMutex_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofThreadcreate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofThreadcreate", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/threadcreate")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofMutex_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + resp, md, err := request_SupernodeService_GetRawPprofThreadcreate_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SupernodeService_GetRawPprofThreadcreate_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofThreadcreate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofProfile", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/profile")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SupernodeService_GetPprofThreadcreate_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_SupernodeService_GetRawPprofProfile_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SupernodeService_GetRawPprofProfile_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofCmdline_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofCmdline", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/cmdline")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofThreadcreate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + resp, md, err := request_SupernodeService_GetRawPprofCmdline_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SupernodeService_GetRawPprofCmdline_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - - mux.Handle("GET", pattern_SupernodeService_GetPprofProfile_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofSymbol_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofSymbol", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/symbol")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SupernodeService_GetPprofProfile_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_SupernodeService_GetRawPprofSymbol_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SupernodeService_GetRawPprofSymbol_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle(http.MethodGet, pattern_SupernodeService_GetRawPprofTrace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/supernode.SupernodeService/GetRawPprofTrace", runtime.WithHTTPPathPattern("/api/v1/debug/raw/pprof/trace")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - - forward_SupernodeService_GetPprofProfile_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - + resp, md, err := request_SupernodeService_GetRawPprofTrace_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + forward_SupernodeService_GetRawPprofTrace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - return nil } var ( - pattern_SupernodeService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "status"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SupernodeService_ListServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "services"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SupernodeService_GetPprofIndex_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "debug", "pprof"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SupernodeService_GetPprofHeap_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "debug", "pprof", "heap"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SupernodeService_GetPprofGoroutine_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "debug", "pprof", "goroutine"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SupernodeService_GetPprofAllocs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "debug", "pprof", "allocs"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SupernodeService_GetPprofBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "debug", "pprof", "block"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SupernodeService_GetPprofMutex_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "debug", "pprof", "mutex"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SupernodeService_GetPprofThreadcreate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "debug", "pprof", "threadcreate"}, "", runtime.AssumeColonVerbOpt(true))) - - pattern_SupernodeService_GetPprofProfile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "debug", "pprof", "profile"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_SupernodeService_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "status"}, "")) + pattern_SupernodeService_ListServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "services"}, "")) + pattern_SupernodeService_GetRawPprof_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"api", "v1", "debug", "raw", "pprof"}, "")) + pattern_SupernodeService_GetRawPprofHeap_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"api", "v1", "debug", "raw", "pprof", "heap"}, "")) + pattern_SupernodeService_GetRawPprofGoroutine_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"api", "v1", "debug", "raw", "pprof", "goroutine"}, "")) + pattern_SupernodeService_GetRawPprofAllocs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"api", "v1", "debug", "raw", "pprof", "allocs"}, "")) + pattern_SupernodeService_GetRawPprofBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"api", "v1", "debug", "raw", "pprof", "block"}, "")) + pattern_SupernodeService_GetRawPprofMutex_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"api", "v1", "debug", "raw", "pprof", "mutex"}, "")) + pattern_SupernodeService_GetRawPprofThreadcreate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"api", "v1", "debug", "raw", "pprof", "threadcreate"}, "")) + pattern_SupernodeService_GetRawPprofProfile_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"api", "v1", "debug", "raw", "pprof", "profile"}, "")) + pattern_SupernodeService_GetRawPprofCmdline_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"api", "v1", "debug", "raw", "pprof", "cmdline"}, "")) + pattern_SupernodeService_GetRawPprofSymbol_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"api", "v1", "debug", "raw", "pprof", "symbol"}, "")) + pattern_SupernodeService_GetRawPprofTrace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"api", "v1", "debug", "raw", "pprof", "trace"}, "")) ) var ( - forward_SupernodeService_GetStatus_0 = runtime.ForwardResponseMessage - - forward_SupernodeService_ListServices_0 = runtime.ForwardResponseMessage - - forward_SupernodeService_GetPprofIndex_0 = runtime.ForwardResponseMessage - - forward_SupernodeService_GetPprofHeap_0 = runtime.ForwardResponseMessage - - forward_SupernodeService_GetPprofGoroutine_0 = runtime.ForwardResponseMessage - - forward_SupernodeService_GetPprofAllocs_0 = runtime.ForwardResponseMessage - - forward_SupernodeService_GetPprofBlock_0 = runtime.ForwardResponseMessage - - forward_SupernodeService_GetPprofMutex_0 = runtime.ForwardResponseMessage - - forward_SupernodeService_GetPprofThreadcreate_0 = runtime.ForwardResponseMessage - - forward_SupernodeService_GetPprofProfile_0 = runtime.ForwardResponseMessage + forward_SupernodeService_GetStatus_0 = runtime.ForwardResponseMessage + forward_SupernodeService_ListServices_0 = runtime.ForwardResponseMessage + forward_SupernodeService_GetRawPprof_0 = runtime.ForwardResponseMessage + forward_SupernodeService_GetRawPprofHeap_0 = runtime.ForwardResponseMessage + forward_SupernodeService_GetRawPprofGoroutine_0 = runtime.ForwardResponseMessage + forward_SupernodeService_GetRawPprofAllocs_0 = runtime.ForwardResponseMessage + forward_SupernodeService_GetRawPprofBlock_0 = runtime.ForwardResponseMessage + forward_SupernodeService_GetRawPprofMutex_0 = runtime.ForwardResponseMessage + forward_SupernodeService_GetRawPprofThreadcreate_0 = runtime.ForwardResponseMessage + forward_SupernodeService_GetRawPprofProfile_0 = runtime.ForwardResponseMessage + forward_SupernodeService_GetRawPprofCmdline_0 = runtime.ForwardResponseMessage + forward_SupernodeService_GetRawPprofSymbol_0 = runtime.ForwardResponseMessage + forward_SupernodeService_GetRawPprofTrace_0 = runtime.ForwardResponseMessage ) diff --git a/gen/supernode/service.swagger.json b/gen/supernode/service.swagger.json index 6e04d0b9..c3944e9d 100644 --- a/gen/supernode/service.swagger.json +++ b/gen/supernode/service.swagger.json @@ -16,15 +16,15 @@ "application/json" ], "paths": { - "/api/v1/debug/pprof": { + "/api/v1/debug/raw/pprof": { "get": { - "summary": "Profiling endpoints", - "operationId": "SupernodeService_GetPprofIndex", + "summary": "Raw pprof endpoints - return standard pprof output directly", + "operationId": "SupernodeService_GetRawPprof", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/supernodeGetPprofIndexResponse" + "$ref": "#/definitions/supernodeRawPprofResponse" } }, "default": { @@ -34,19 +34,29 @@ } } }, + "parameters": [ + { + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], "tags": [ "SupernodeService" ] } }, - "/api/v1/debug/pprof/allocs": { + "/api/v1/debug/raw/pprof/allocs": { "get": { - "operationId": "SupernodeService_GetPprofAllocs", + "operationId": "SupernodeService_GetRawPprofAllocs", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/supernodeGetPprofProfileResponse" + "$ref": "#/definitions/supernodeRawPprofResponse" } }, "default": { @@ -59,7 +69,7 @@ "parameters": [ { "name": "debug", - "description": "Debug level (optional, default 1)", + "description": "Debug level (0 for binary, \u003e0 for text)", "in": "query", "required": false, "type": "integer", @@ -71,14 +81,14 @@ ] } }, - "/api/v1/debug/pprof/block": { + "/api/v1/debug/raw/pprof/block": { "get": { - "operationId": "SupernodeService_GetPprofBlock", + "operationId": "SupernodeService_GetRawPprofBlock", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/supernodeGetPprofProfileResponse" + "$ref": "#/definitions/supernodeRawPprofResponse" } }, "default": { @@ -91,7 +101,7 @@ "parameters": [ { "name": "debug", - "description": "Debug level (optional, default 1)", + "description": "Debug level (0 for binary, \u003e0 for text)", "in": "query", "required": false, "type": "integer", @@ -103,14 +113,14 @@ ] } }, - "/api/v1/debug/pprof/goroutine": { + "/api/v1/debug/raw/pprof/cmdline": { "get": { - "operationId": "SupernodeService_GetPprofGoroutine", + "operationId": "SupernodeService_GetRawPprofCmdline", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/supernodeGetPprofProfileResponse" + "$ref": "#/definitions/supernodeRawPprofResponse" } }, "default": { @@ -123,7 +133,7 @@ "parameters": [ { "name": "debug", - "description": "Debug level (optional, default 1)", + "description": "Debug level (0 for binary, \u003e0 for text)", "in": "query", "required": false, "type": "integer", @@ -135,14 +145,14 @@ ] } }, - "/api/v1/debug/pprof/heap": { + "/api/v1/debug/raw/pprof/goroutine": { "get": { - "operationId": "SupernodeService_GetPprofHeap", + "operationId": "SupernodeService_GetRawPprofGoroutine", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/supernodeGetPprofProfileResponse" + "$ref": "#/definitions/supernodeRawPprofResponse" } }, "default": { @@ -155,7 +165,7 @@ "parameters": [ { "name": "debug", - "description": "Debug level (optional, default 1)", + "description": "Debug level (0 for binary, \u003e0 for text)", "in": "query", "required": false, "type": "integer", @@ -167,14 +177,14 @@ ] } }, - "/api/v1/debug/pprof/mutex": { + "/api/v1/debug/raw/pprof/heap": { "get": { - "operationId": "SupernodeService_GetPprofMutex", + "operationId": "SupernodeService_GetRawPprofHeap", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/supernodeGetPprofProfileResponse" + "$ref": "#/definitions/supernodeRawPprofResponse" } }, "default": { @@ -187,7 +197,7 @@ "parameters": [ { "name": "debug", - "description": "Debug level (optional, default 1)", + "description": "Debug level (0 for binary, \u003e0 for text)", "in": "query", "required": false, "type": "integer", @@ -199,14 +209,46 @@ ] } }, - "/api/v1/debug/pprof/profile": { + "/api/v1/debug/raw/pprof/mutex": { "get": { - "operationId": "SupernodeService_GetPprofProfile", + "operationId": "SupernodeService_GetRawPprofMutex", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/supernodeGetPprofProfileResponse" + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/debug/raw/pprof/profile": { + "get": { + "operationId": "SupernodeService_GetRawPprofProfile", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" } }, "default": { @@ -219,7 +261,7 @@ "parameters": [ { "name": "seconds", - "description": "Duration in seconds (optional, default 30)", + "description": "CPU profile duration in seconds (default 30)", "in": "query", "required": false, "type": "integer", @@ -231,14 +273,14 @@ ] } }, - "/api/v1/debug/pprof/threadcreate": { + "/api/v1/debug/raw/pprof/symbol": { "get": { - "operationId": "SupernodeService_GetPprofThreadcreate", + "operationId": "SupernodeService_GetRawPprofSymbol", "responses": { "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/supernodeGetPprofProfileResponse" + "$ref": "#/definitions/supernodeRawPprofResponse" } }, "default": { @@ -251,7 +293,71 @@ "parameters": [ { "name": "debug", - "description": "Debug level (optional, default 1)", + "description": "Debug level (0 for binary, \u003e0 for text)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/debug/raw/pprof/threadcreate": { + "get": { + "operationId": "SupernodeService_GetRawPprofThreadcreate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/debug/raw/pprof/trace": { + "get": { + "operationId": "SupernodeService_GetRawPprofTrace", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", "in": "query", "required": false, "type": "integer", @@ -666,41 +772,6 @@ } } }, - "supernodeGetPprofIndexResponse": { - "type": "object", - "properties": { - "html": { - "type": "string", - "title": "HTML content for the pprof index page" - }, - "enabled": { - "type": "boolean", - "title": "Whether profiling is enabled" - } - } - }, - "supernodeGetPprofProfileResponse": { - "type": "object", - "properties": { - "data": { - "type": "string", - "format": "byte", - "title": "Profile data (binary pprof format)" - }, - "contentType": { - "type": "string", - "title": "Content type of the response" - }, - "enabled": { - "type": "boolean", - "title": "Whether profiling is enabled" - }, - "error": { - "type": "string", - "title": "Error message if profiling is disabled" - } - } - }, "supernodeListServicesResponse": { "type": "object", "properties": { @@ -717,6 +788,16 @@ } } }, + "supernodeRawPprofResponse": { + "type": "object", + "properties": { + "data": { + "type": "string", + "format": "byte", + "title": "Raw pprof data exactly as returned by runtime/pprof" + } + } + }, "supernodeServiceInfo": { "type": "object", "properties": { diff --git a/gen/supernode/service_grpc.pb.go b/gen/supernode/service_grpc.pb.go index 98db9323..42857bf2 100644 --- a/gen/supernode/service_grpc.pb.go +++ b/gen/supernode/service_grpc.pb.go @@ -19,16 +19,19 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - SupernodeService_GetStatus_FullMethodName = "/supernode.SupernodeService/GetStatus" - SupernodeService_ListServices_FullMethodName = "/supernode.SupernodeService/ListServices" - SupernodeService_GetPprofIndex_FullMethodName = "/supernode.SupernodeService/GetPprofIndex" - SupernodeService_GetPprofHeap_FullMethodName = "/supernode.SupernodeService/GetPprofHeap" - SupernodeService_GetPprofGoroutine_FullMethodName = "/supernode.SupernodeService/GetPprofGoroutine" - SupernodeService_GetPprofAllocs_FullMethodName = "/supernode.SupernodeService/GetPprofAllocs" - SupernodeService_GetPprofBlock_FullMethodName = "/supernode.SupernodeService/GetPprofBlock" - SupernodeService_GetPprofMutex_FullMethodName = "/supernode.SupernodeService/GetPprofMutex" - SupernodeService_GetPprofThreadcreate_FullMethodName = "/supernode.SupernodeService/GetPprofThreadcreate" - SupernodeService_GetPprofProfile_FullMethodName = "/supernode.SupernodeService/GetPprofProfile" + SupernodeService_GetStatus_FullMethodName = "/supernode.SupernodeService/GetStatus" + SupernodeService_ListServices_FullMethodName = "/supernode.SupernodeService/ListServices" + SupernodeService_GetRawPprof_FullMethodName = "/supernode.SupernodeService/GetRawPprof" + SupernodeService_GetRawPprofHeap_FullMethodName = "/supernode.SupernodeService/GetRawPprofHeap" + SupernodeService_GetRawPprofGoroutine_FullMethodName = "/supernode.SupernodeService/GetRawPprofGoroutine" + SupernodeService_GetRawPprofAllocs_FullMethodName = "/supernode.SupernodeService/GetRawPprofAllocs" + SupernodeService_GetRawPprofBlock_FullMethodName = "/supernode.SupernodeService/GetRawPprofBlock" + SupernodeService_GetRawPprofMutex_FullMethodName = "/supernode.SupernodeService/GetRawPprofMutex" + SupernodeService_GetRawPprofThreadcreate_FullMethodName = "/supernode.SupernodeService/GetRawPprofThreadcreate" + SupernodeService_GetRawPprofProfile_FullMethodName = "/supernode.SupernodeService/GetRawPprofProfile" + SupernodeService_GetRawPprofCmdline_FullMethodName = "/supernode.SupernodeService/GetRawPprofCmdline" + SupernodeService_GetRawPprofSymbol_FullMethodName = "/supernode.SupernodeService/GetRawPprofSymbol" + SupernodeService_GetRawPprofTrace_FullMethodName = "/supernode.SupernodeService/GetRawPprofTrace" ) // SupernodeServiceClient is the client API for SupernodeService service. @@ -39,15 +42,18 @@ const ( type SupernodeServiceClient interface { GetStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) - // Profiling endpoints - GetPprofIndex(ctx context.Context, in *GetPprofIndexRequest, opts ...grpc.CallOption) (*GetPprofIndexResponse, error) - GetPprofHeap(ctx context.Context, in *GetPprofProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) - GetPprofGoroutine(ctx context.Context, in *GetPprofProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) - GetPprofAllocs(ctx context.Context, in *GetPprofProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) - GetPprofBlock(ctx context.Context, in *GetPprofProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) - GetPprofMutex(ctx context.Context, in *GetPprofProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) - GetPprofThreadcreate(ctx context.Context, in *GetPprofProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) - GetPprofProfile(ctx context.Context, in *GetPprofCpuProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) + // Raw pprof endpoints - return standard pprof output directly + GetRawPprof(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) + GetRawPprofHeap(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) + GetRawPprofGoroutine(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) + GetRawPprofAllocs(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) + GetRawPprofBlock(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) + GetRawPprofMutex(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) + GetRawPprofThreadcreate(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) + GetRawPprofProfile(ctx context.Context, in *RawPprofCpuRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) + GetRawPprofCmdline(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) + GetRawPprofSymbol(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) + GetRawPprofTrace(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) } type supernodeServiceClient struct { @@ -78,80 +84,110 @@ func (c *supernodeServiceClient) ListServices(ctx context.Context, in *ListServi return out, nil } -func (c *supernodeServiceClient) GetPprofIndex(ctx context.Context, in *GetPprofIndexRequest, opts ...grpc.CallOption) (*GetPprofIndexResponse, error) { +func (c *supernodeServiceClient) GetRawPprof(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPprofIndexResponse) - err := c.cc.Invoke(ctx, SupernodeService_GetPprofIndex_FullMethodName, in, out, cOpts...) + out := new(RawPprofResponse) + err := c.cc.Invoke(ctx, SupernodeService_GetRawPprof_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *supernodeServiceClient) GetPprofHeap(ctx context.Context, in *GetPprofProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) { +func (c *supernodeServiceClient) GetRawPprofHeap(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPprofProfileResponse) - err := c.cc.Invoke(ctx, SupernodeService_GetPprofHeap_FullMethodName, in, out, cOpts...) + out := new(RawPprofResponse) + err := c.cc.Invoke(ctx, SupernodeService_GetRawPprofHeap_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *supernodeServiceClient) GetPprofGoroutine(ctx context.Context, in *GetPprofProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) { +func (c *supernodeServiceClient) GetRawPprofGoroutine(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPprofProfileResponse) - err := c.cc.Invoke(ctx, SupernodeService_GetPprofGoroutine_FullMethodName, in, out, cOpts...) + out := new(RawPprofResponse) + err := c.cc.Invoke(ctx, SupernodeService_GetRawPprofGoroutine_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *supernodeServiceClient) GetPprofAllocs(ctx context.Context, in *GetPprofProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) { +func (c *supernodeServiceClient) GetRawPprofAllocs(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPprofProfileResponse) - err := c.cc.Invoke(ctx, SupernodeService_GetPprofAllocs_FullMethodName, in, out, cOpts...) + out := new(RawPprofResponse) + err := c.cc.Invoke(ctx, SupernodeService_GetRawPprofAllocs_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *supernodeServiceClient) GetPprofBlock(ctx context.Context, in *GetPprofProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) { +func (c *supernodeServiceClient) GetRawPprofBlock(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPprofProfileResponse) - err := c.cc.Invoke(ctx, SupernodeService_GetPprofBlock_FullMethodName, in, out, cOpts...) + out := new(RawPprofResponse) + err := c.cc.Invoke(ctx, SupernodeService_GetRawPprofBlock_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *supernodeServiceClient) GetPprofMutex(ctx context.Context, in *GetPprofProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) { +func (c *supernodeServiceClient) GetRawPprofMutex(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPprofProfileResponse) - err := c.cc.Invoke(ctx, SupernodeService_GetPprofMutex_FullMethodName, in, out, cOpts...) + out := new(RawPprofResponse) + err := c.cc.Invoke(ctx, SupernodeService_GetRawPprofMutex_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *supernodeServiceClient) GetPprofThreadcreate(ctx context.Context, in *GetPprofProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) { +func (c *supernodeServiceClient) GetRawPprofThreadcreate(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPprofProfileResponse) - err := c.cc.Invoke(ctx, SupernodeService_GetPprofThreadcreate_FullMethodName, in, out, cOpts...) + out := new(RawPprofResponse) + err := c.cc.Invoke(ctx, SupernodeService_GetRawPprofThreadcreate_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } -func (c *supernodeServiceClient) GetPprofProfile(ctx context.Context, in *GetPprofCpuProfileRequest, opts ...grpc.CallOption) (*GetPprofProfileResponse, error) { +func (c *supernodeServiceClient) GetRawPprofProfile(ctx context.Context, in *RawPprofCpuRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - out := new(GetPprofProfileResponse) - err := c.cc.Invoke(ctx, SupernodeService_GetPprofProfile_FullMethodName, in, out, cOpts...) + out := new(RawPprofResponse) + err := c.cc.Invoke(ctx, SupernodeService_GetRawPprofProfile_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *supernodeServiceClient) GetRawPprofCmdline(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RawPprofResponse) + err := c.cc.Invoke(ctx, SupernodeService_GetRawPprofCmdline_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *supernodeServiceClient) GetRawPprofSymbol(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RawPprofResponse) + err := c.cc.Invoke(ctx, SupernodeService_GetRawPprofSymbol_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *supernodeServiceClient) GetRawPprofTrace(ctx context.Context, in *RawPprofRequest, opts ...grpc.CallOption) (*RawPprofResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(RawPprofResponse) + err := c.cc.Invoke(ctx, SupernodeService_GetRawPprofTrace_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } @@ -166,15 +202,18 @@ func (c *supernodeServiceClient) GetPprofProfile(ctx context.Context, in *GetPpr type SupernodeServiceServer interface { GetStatus(context.Context, *StatusRequest) (*StatusResponse, error) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) - // Profiling endpoints - GetPprofIndex(context.Context, *GetPprofIndexRequest) (*GetPprofIndexResponse, error) - GetPprofHeap(context.Context, *GetPprofProfileRequest) (*GetPprofProfileResponse, error) - GetPprofGoroutine(context.Context, *GetPprofProfileRequest) (*GetPprofProfileResponse, error) - GetPprofAllocs(context.Context, *GetPprofProfileRequest) (*GetPprofProfileResponse, error) - GetPprofBlock(context.Context, *GetPprofProfileRequest) (*GetPprofProfileResponse, error) - GetPprofMutex(context.Context, *GetPprofProfileRequest) (*GetPprofProfileResponse, error) - GetPprofThreadcreate(context.Context, *GetPprofProfileRequest) (*GetPprofProfileResponse, error) - GetPprofProfile(context.Context, *GetPprofCpuProfileRequest) (*GetPprofProfileResponse, error) + // Raw pprof endpoints - return standard pprof output directly + GetRawPprof(context.Context, *RawPprofRequest) (*RawPprofResponse, error) + GetRawPprofHeap(context.Context, *RawPprofRequest) (*RawPprofResponse, error) + GetRawPprofGoroutine(context.Context, *RawPprofRequest) (*RawPprofResponse, error) + GetRawPprofAllocs(context.Context, *RawPprofRequest) (*RawPprofResponse, error) + GetRawPprofBlock(context.Context, *RawPprofRequest) (*RawPprofResponse, error) + GetRawPprofMutex(context.Context, *RawPprofRequest) (*RawPprofResponse, error) + GetRawPprofThreadcreate(context.Context, *RawPprofRequest) (*RawPprofResponse, error) + GetRawPprofProfile(context.Context, *RawPprofCpuRequest) (*RawPprofResponse, error) + GetRawPprofCmdline(context.Context, *RawPprofRequest) (*RawPprofResponse, error) + GetRawPprofSymbol(context.Context, *RawPprofRequest) (*RawPprofResponse, error) + GetRawPprofTrace(context.Context, *RawPprofRequest) (*RawPprofResponse, error) mustEmbedUnimplementedSupernodeServiceServer() } @@ -191,29 +230,38 @@ func (UnimplementedSupernodeServiceServer) GetStatus(context.Context, *StatusReq func (UnimplementedSupernodeServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented") } -func (UnimplementedSupernodeServiceServer) GetPprofIndex(context.Context, *GetPprofIndexRequest) (*GetPprofIndexResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPprofIndex not implemented") +func (UnimplementedSupernodeServiceServer) GetRawPprof(context.Context, *RawPprofRequest) (*RawPprofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawPprof not implemented") +} +func (UnimplementedSupernodeServiceServer) GetRawPprofHeap(context.Context, *RawPprofRequest) (*RawPprofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawPprofHeap not implemented") +} +func (UnimplementedSupernodeServiceServer) GetRawPprofGoroutine(context.Context, *RawPprofRequest) (*RawPprofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawPprofGoroutine not implemented") } -func (UnimplementedSupernodeServiceServer) GetPprofHeap(context.Context, *GetPprofProfileRequest) (*GetPprofProfileResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPprofHeap not implemented") +func (UnimplementedSupernodeServiceServer) GetRawPprofAllocs(context.Context, *RawPprofRequest) (*RawPprofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawPprofAllocs not implemented") } -func (UnimplementedSupernodeServiceServer) GetPprofGoroutine(context.Context, *GetPprofProfileRequest) (*GetPprofProfileResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPprofGoroutine not implemented") +func (UnimplementedSupernodeServiceServer) GetRawPprofBlock(context.Context, *RawPprofRequest) (*RawPprofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawPprofBlock not implemented") } -func (UnimplementedSupernodeServiceServer) GetPprofAllocs(context.Context, *GetPprofProfileRequest) (*GetPprofProfileResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPprofAllocs not implemented") +func (UnimplementedSupernodeServiceServer) GetRawPprofMutex(context.Context, *RawPprofRequest) (*RawPprofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawPprofMutex not implemented") } -func (UnimplementedSupernodeServiceServer) GetPprofBlock(context.Context, *GetPprofProfileRequest) (*GetPprofProfileResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPprofBlock not implemented") +func (UnimplementedSupernodeServiceServer) GetRawPprofThreadcreate(context.Context, *RawPprofRequest) (*RawPprofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawPprofThreadcreate not implemented") } -func (UnimplementedSupernodeServiceServer) GetPprofMutex(context.Context, *GetPprofProfileRequest) (*GetPprofProfileResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPprofMutex not implemented") +func (UnimplementedSupernodeServiceServer) GetRawPprofProfile(context.Context, *RawPprofCpuRequest) (*RawPprofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawPprofProfile not implemented") } -func (UnimplementedSupernodeServiceServer) GetPprofThreadcreate(context.Context, *GetPprofProfileRequest) (*GetPprofProfileResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPprofThreadcreate not implemented") +func (UnimplementedSupernodeServiceServer) GetRawPprofCmdline(context.Context, *RawPprofRequest) (*RawPprofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawPprofCmdline not implemented") } -func (UnimplementedSupernodeServiceServer) GetPprofProfile(context.Context, *GetPprofCpuProfileRequest) (*GetPprofProfileResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetPprofProfile not implemented") +func (UnimplementedSupernodeServiceServer) GetRawPprofSymbol(context.Context, *RawPprofRequest) (*RawPprofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawPprofSymbol not implemented") +} +func (UnimplementedSupernodeServiceServer) GetRawPprofTrace(context.Context, *RawPprofRequest) (*RawPprofResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetRawPprofTrace not implemented") } func (UnimplementedSupernodeServiceServer) mustEmbedUnimplementedSupernodeServiceServer() {} func (UnimplementedSupernodeServiceServer) testEmbeddedByValue() {} @@ -272,146 +320,200 @@ func _SupernodeService_ListServices_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } -func _SupernodeService_GetPprofIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPprofIndexRequest) +func _SupernodeService_GetRawPprof_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RawPprofRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SupernodeServiceServer).GetPprofIndex(ctx, in) + return srv.(SupernodeServiceServer).GetRawPprof(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SupernodeService_GetPprofIndex_FullMethodName, + FullMethod: SupernodeService_GetRawPprof_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SupernodeServiceServer).GetPprofIndex(ctx, req.(*GetPprofIndexRequest)) + return srv.(SupernodeServiceServer).GetRawPprof(ctx, req.(*RawPprofRequest)) } return interceptor(ctx, in, info, handler) } -func _SupernodeService_GetPprofHeap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPprofProfileRequest) +func _SupernodeService_GetRawPprofHeap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RawPprofRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SupernodeServiceServer).GetPprofHeap(ctx, in) + return srv.(SupernodeServiceServer).GetRawPprofHeap(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SupernodeService_GetPprofHeap_FullMethodName, + FullMethod: SupernodeService_GetRawPprofHeap_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SupernodeServiceServer).GetPprofHeap(ctx, req.(*GetPprofProfileRequest)) + return srv.(SupernodeServiceServer).GetRawPprofHeap(ctx, req.(*RawPprofRequest)) } return interceptor(ctx, in, info, handler) } -func _SupernodeService_GetPprofGoroutine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPprofProfileRequest) +func _SupernodeService_GetRawPprofGoroutine_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RawPprofRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SupernodeServiceServer).GetPprofGoroutine(ctx, in) + return srv.(SupernodeServiceServer).GetRawPprofGoroutine(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SupernodeService_GetPprofGoroutine_FullMethodName, + FullMethod: SupernodeService_GetRawPprofGoroutine_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SupernodeServiceServer).GetPprofGoroutine(ctx, req.(*GetPprofProfileRequest)) + return srv.(SupernodeServiceServer).GetRawPprofGoroutine(ctx, req.(*RawPprofRequest)) } return interceptor(ctx, in, info, handler) } -func _SupernodeService_GetPprofAllocs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPprofProfileRequest) +func _SupernodeService_GetRawPprofAllocs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RawPprofRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SupernodeServiceServer).GetPprofAllocs(ctx, in) + return srv.(SupernodeServiceServer).GetRawPprofAllocs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SupernodeService_GetPprofAllocs_FullMethodName, + FullMethod: SupernodeService_GetRawPprofAllocs_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SupernodeServiceServer).GetPprofAllocs(ctx, req.(*GetPprofProfileRequest)) + return srv.(SupernodeServiceServer).GetRawPprofAllocs(ctx, req.(*RawPprofRequest)) } return interceptor(ctx, in, info, handler) } -func _SupernodeService_GetPprofBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPprofProfileRequest) +func _SupernodeService_GetRawPprofBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RawPprofRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SupernodeServiceServer).GetPprofBlock(ctx, in) + return srv.(SupernodeServiceServer).GetRawPprofBlock(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SupernodeService_GetPprofBlock_FullMethodName, + FullMethod: SupernodeService_GetRawPprofBlock_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SupernodeServiceServer).GetPprofBlock(ctx, req.(*GetPprofProfileRequest)) + return srv.(SupernodeServiceServer).GetRawPprofBlock(ctx, req.(*RawPprofRequest)) } return interceptor(ctx, in, info, handler) } -func _SupernodeService_GetPprofMutex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPprofProfileRequest) +func _SupernodeService_GetRawPprofMutex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RawPprofRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SupernodeServiceServer).GetPprofMutex(ctx, in) + return srv.(SupernodeServiceServer).GetRawPprofMutex(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SupernodeService_GetPprofMutex_FullMethodName, + FullMethod: SupernodeService_GetRawPprofMutex_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SupernodeServiceServer).GetPprofMutex(ctx, req.(*GetPprofProfileRequest)) + return srv.(SupernodeServiceServer).GetRawPprofMutex(ctx, req.(*RawPprofRequest)) } return interceptor(ctx, in, info, handler) } -func _SupernodeService_GetPprofThreadcreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPprofProfileRequest) +func _SupernodeService_GetRawPprofThreadcreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RawPprofRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SupernodeServiceServer).GetPprofThreadcreate(ctx, in) + return srv.(SupernodeServiceServer).GetRawPprofThreadcreate(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SupernodeService_GetPprofThreadcreate_FullMethodName, + FullMethod: SupernodeService_GetRawPprofThreadcreate_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SupernodeServiceServer).GetPprofThreadcreate(ctx, req.(*GetPprofProfileRequest)) + return srv.(SupernodeServiceServer).GetRawPprofThreadcreate(ctx, req.(*RawPprofRequest)) } return interceptor(ctx, in, info, handler) } -func _SupernodeService_GetPprofProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetPprofCpuProfileRequest) +func _SupernodeService_GetRawPprofProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RawPprofCpuRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(SupernodeServiceServer).GetPprofProfile(ctx, in) + return srv.(SupernodeServiceServer).GetRawPprofProfile(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: SupernodeService_GetPprofProfile_FullMethodName, + FullMethod: SupernodeService_GetRawPprofProfile_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SupernodeServiceServer).GetPprofProfile(ctx, req.(*GetPprofCpuProfileRequest)) + return srv.(SupernodeServiceServer).GetRawPprofProfile(ctx, req.(*RawPprofCpuRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SupernodeService_GetRawPprofCmdline_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RawPprofRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SupernodeServiceServer).GetRawPprofCmdline(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SupernodeService_GetRawPprofCmdline_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SupernodeServiceServer).GetRawPprofCmdline(ctx, req.(*RawPprofRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SupernodeService_GetRawPprofSymbol_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RawPprofRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SupernodeServiceServer).GetRawPprofSymbol(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SupernodeService_GetRawPprofSymbol_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SupernodeServiceServer).GetRawPprofSymbol(ctx, req.(*RawPprofRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SupernodeService_GetRawPprofTrace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RawPprofRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SupernodeServiceServer).GetRawPprofTrace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SupernodeService_GetRawPprofTrace_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SupernodeServiceServer).GetRawPprofTrace(ctx, req.(*RawPprofRequest)) } return interceptor(ctx, in, info, handler) } @@ -432,36 +534,48 @@ var SupernodeService_ServiceDesc = grpc.ServiceDesc{ Handler: _SupernodeService_ListServices_Handler, }, { - MethodName: "GetPprofIndex", - Handler: _SupernodeService_GetPprofIndex_Handler, + MethodName: "GetRawPprof", + Handler: _SupernodeService_GetRawPprof_Handler, + }, + { + MethodName: "GetRawPprofHeap", + Handler: _SupernodeService_GetRawPprofHeap_Handler, + }, + { + MethodName: "GetRawPprofGoroutine", + Handler: _SupernodeService_GetRawPprofGoroutine_Handler, + }, + { + MethodName: "GetRawPprofAllocs", + Handler: _SupernodeService_GetRawPprofAllocs_Handler, }, { - MethodName: "GetPprofHeap", - Handler: _SupernodeService_GetPprofHeap_Handler, + MethodName: "GetRawPprofBlock", + Handler: _SupernodeService_GetRawPprofBlock_Handler, }, { - MethodName: "GetPprofGoroutine", - Handler: _SupernodeService_GetPprofGoroutine_Handler, + MethodName: "GetRawPprofMutex", + Handler: _SupernodeService_GetRawPprofMutex_Handler, }, { - MethodName: "GetPprofAllocs", - Handler: _SupernodeService_GetPprofAllocs_Handler, + MethodName: "GetRawPprofThreadcreate", + Handler: _SupernodeService_GetRawPprofThreadcreate_Handler, }, { - MethodName: "GetPprofBlock", - Handler: _SupernodeService_GetPprofBlock_Handler, + MethodName: "GetRawPprofProfile", + Handler: _SupernodeService_GetRawPprofProfile_Handler, }, { - MethodName: "GetPprofMutex", - Handler: _SupernodeService_GetPprofMutex_Handler, + MethodName: "GetRawPprofCmdline", + Handler: _SupernodeService_GetRawPprofCmdline_Handler, }, { - MethodName: "GetPprofThreadcreate", - Handler: _SupernodeService_GetPprofThreadcreate_Handler, + MethodName: "GetRawPprofSymbol", + Handler: _SupernodeService_GetRawPprofSymbol_Handler, }, { - MethodName: "GetPprofProfile", - Handler: _SupernodeService_GetPprofProfile_Handler, + MethodName: "GetRawPprofTrace", + Handler: _SupernodeService_GetRawPprofTrace_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/go.mod b/go.mod index a581736e..1bbdf7bb 100644 --- a/go.mod +++ b/go.mod @@ -25,6 +25,7 @@ require ( github.com/golang/protobuf v1.5.4 github.com/google/uuid v1.6.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 github.com/jmoiron/sqlx v1.4.0 github.com/json-iterator/go v1.1.12 github.com/klauspost/compress v1.18.0 diff --git a/go.sum b/go.sum index 839f29a2..ed0db1f6 100644 --- a/go.sum +++ b/go.sum @@ -415,6 +415,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= diff --git a/profile_cascade.sh b/profile_cascade.sh index 7fe0af5e..9b6fe71a 100755 --- a/profile_cascade.sh +++ b/profile_cascade.sh @@ -4,7 +4,7 @@ # Samples heap every 30 seconds during cascade downloads # Configuration - modify these as needed -PROFILE_URL="http://localhost:6062/debug/pprof/heap" +PROFILE_URL="http://localhost:8002/api/v1/debug/raw/pprof/heap" INTERVAL=30 TIMESTAMP=$(date +%Y%m%d_%H%M%S) PROFILE_DIR="profiles_${TIMESTAMP}" diff --git a/proto/supernode/service.proto b/proto/supernode/service.proto index 05d071d4..d51de355 100644 --- a/proto/supernode/service.proto +++ b/proto/supernode/service.proto @@ -19,52 +19,70 @@ service SupernodeService { }; } - // Profiling endpoints - rpc GetPprofIndex(GetPprofIndexRequest) returns (GetPprofIndexResponse) { + // Raw pprof endpoints - return standard pprof output directly + rpc GetRawPprof(RawPprofRequest) returns (RawPprofResponse) { option (google.api.http) = { - get: "/api/v1/debug/pprof" + get: "/api/v1/debug/raw/pprof" }; } - rpc GetPprofHeap(GetPprofProfileRequest) returns (GetPprofProfileResponse) { + rpc GetRawPprofHeap(RawPprofRequest) returns (RawPprofResponse) { option (google.api.http) = { - get: "/api/v1/debug/pprof/heap" + get: "/api/v1/debug/raw/pprof/heap" }; } - rpc GetPprofGoroutine(GetPprofProfileRequest) returns (GetPprofProfileResponse) { + rpc GetRawPprofGoroutine(RawPprofRequest) returns (RawPprofResponse) { option (google.api.http) = { - get: "/api/v1/debug/pprof/goroutine" + get: "/api/v1/debug/raw/pprof/goroutine" }; } - rpc GetPprofAllocs(GetPprofProfileRequest) returns (GetPprofProfileResponse) { + rpc GetRawPprofAllocs(RawPprofRequest) returns (RawPprofResponse) { option (google.api.http) = { - get: "/api/v1/debug/pprof/allocs" + get: "/api/v1/debug/raw/pprof/allocs" }; } - rpc GetPprofBlock(GetPprofProfileRequest) returns (GetPprofProfileResponse) { + rpc GetRawPprofBlock(RawPprofRequest) returns (RawPprofResponse) { option (google.api.http) = { - get: "/api/v1/debug/pprof/block" + get: "/api/v1/debug/raw/pprof/block" }; } - rpc GetPprofMutex(GetPprofProfileRequest) returns (GetPprofProfileResponse) { + rpc GetRawPprofMutex(RawPprofRequest) returns (RawPprofResponse) { option (google.api.http) = { - get: "/api/v1/debug/pprof/mutex" + get: "/api/v1/debug/raw/pprof/mutex" }; } - rpc GetPprofThreadcreate(GetPprofProfileRequest) returns (GetPprofProfileResponse) { + rpc GetRawPprofThreadcreate(RawPprofRequest) returns (RawPprofResponse) { option (google.api.http) = { - get: "/api/v1/debug/pprof/threadcreate" + get: "/api/v1/debug/raw/pprof/threadcreate" }; } - rpc GetPprofProfile(GetPprofCpuProfileRequest) returns (GetPprofProfileResponse) { + rpc GetRawPprofProfile(RawPprofCpuRequest) returns (RawPprofResponse) { option (google.api.http) = { - get: "/api/v1/debug/pprof/profile" + get: "/api/v1/debug/raw/pprof/profile" + }; + } + + rpc GetRawPprofCmdline(RawPprofRequest) returns (RawPprofResponse) { + option (google.api.http) = { + get: "/api/v1/debug/raw/pprof/cmdline" + }; + } + + rpc GetRawPprofSymbol(RawPprofRequest) returns (RawPprofResponse) { + option (google.api.http) = { + get: "/api/v1/debug/raw/pprof/symbol" + }; + } + + rpc GetRawPprofTrace(RawPprofRequest) returns (RawPprofResponse) { + option (google.api.http) = { + get: "/api/v1/debug/raw/pprof/trace" }; } } @@ -81,26 +99,16 @@ message ServiceInfo { repeated string methods = 2; } -// Pprof message types -message GetPprofIndexRequest {} - -message GetPprofIndexResponse { - string html = 1; // HTML content for the pprof index page - bool enabled = 2; // Whether profiling is enabled -} - -message GetPprofProfileRequest { - int32 debug = 1; // Debug level (optional, default 1) +// Raw pprof request/response messages +message RawPprofRequest { + int32 debug = 1; // Debug level (0 for binary, >0 for text) } -message GetPprofCpuProfileRequest { - int32 seconds = 1; // Duration in seconds (optional, default 30) +message RawPprofCpuRequest { + int32 seconds = 1; // CPU profile duration in seconds (default 30) } -message GetPprofProfileResponse { - bytes data = 1; // Profile data (binary pprof format) - string content_type = 2; // Content type of the response - bool enabled = 3; // Whether profiling is enabled - string error = 4; // Error message if profiling is disabled +message RawPprofResponse { + bytes data = 1; // Raw pprof data exactly as returned by runtime/pprof } diff --git a/supernode/transport/gateway/server.go b/supernode/transport/gateway/server.go index e306539a..5c4df034 100644 --- a/supernode/transport/gateway/server.go +++ b/supernode/transport/gateway/server.go @@ -11,7 +11,8 @@ import ( "strings" "time" - "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "google.golang.org/protobuf/encoding/protojson" pb "github.com/LumeraProtocol/supernode/v2/gen/supernode" "github.com/LumeraProtocol/supernode/v2/pkg/logtrace" @@ -77,8 +78,10 @@ func (s *Server) Run(ctx context.Context) error { // Create gRPC-Gateway mux with custom JSON marshaler options mux := runtime.NewServeMux( runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.JSONPb{ - EmitDefaults: true, // This ensures zero values are included - OrigName: true, // Use original proto field names + MarshalOptions: protojson.MarshalOptions{ + EmitUnpopulated: true, // This ensures zero values are included + UseProtoNames: true, // Use original proto field names + }, }), ) @@ -91,6 +94,23 @@ func (s *Server) Run(ctx context.Context) error { // Create HTTP mux for custom endpoints httpMux := http.NewServeMux() + // Register raw pprof endpoints BEFORE the gRPC gateway to intercept them + // These must be registered before the /api/ handler to take precedence + if s.pprofEnabled { + // Raw pprof endpoints that return actual pprof data (not JSON) + httpMux.HandleFunc("/api/v1/debug/raw/pprof/", s.rawPprofHandler) + httpMux.HandleFunc("/api/v1/debug/raw/pprof/heap", s.rawPprofHandler) + httpMux.HandleFunc("/api/v1/debug/raw/pprof/goroutine", s.rawPprofHandler) + httpMux.HandleFunc("/api/v1/debug/raw/pprof/allocs", s.rawPprofHandler) + httpMux.HandleFunc("/api/v1/debug/raw/pprof/block", s.rawPprofHandler) + httpMux.HandleFunc("/api/v1/debug/raw/pprof/mutex", s.rawPprofHandler) + httpMux.HandleFunc("/api/v1/debug/raw/pprof/threadcreate", s.rawPprofHandler) + httpMux.HandleFunc("/api/v1/debug/raw/pprof/profile", s.rawPprofHandler) + httpMux.HandleFunc("/api/v1/debug/raw/pprof/cmdline", s.rawPprofHandler) + httpMux.HandleFunc("/api/v1/debug/raw/pprof/symbol", s.rawPprofHandler) + httpMux.HandleFunc("/api/v1/debug/raw/pprof/trace", s.rawPprofHandler) + } + // Register gRPC-Gateway endpoints httpMux.Handle("/api/", mux) @@ -191,3 +211,26 @@ func (s *Server) pprofHandler(w http.ResponseWriter, r *http.Request) { http.NotFound(w, r) } } + +// rawPprofHandler handles the raw pprof endpoints that return actual pprof data +func (s *Server) rawPprofHandler(w http.ResponseWriter, r *http.Request) { + // Check if pprof is enabled + if !s.pprofEnabled { + http.Error(w, "Profiling is not enabled", http.StatusForbidden) + return + } + + // Map the /api/v1/debug/raw/pprof/* path to /debug/pprof/* + originalPath := r.URL.Path + r.URL.Path = strings.Replace(originalPath, "/api/v1/debug/raw/pprof", "/debug/pprof", 1) + + // Get the default pprof handler and serve + if handler, pattern := http.DefaultServeMux.Handler(r); pattern != "" { + handler.ServeHTTP(w, r) + } else { + http.NotFound(w, r) + } + + // Restore the original path + r.URL.Path = originalPath +} diff --git a/supernode/transport/gateway/swagger.json b/supernode/transport/gateway/swagger.json index 0a40a447..c3944e9d 100644 --- a/supernode/transport/gateway/swagger.json +++ b/supernode/transport/gateway/swagger.json @@ -1,79 +1,857 @@ { - "openapi": "3.0.0", + "swagger": "2.0", "info": { - "title": "Supernode API", - "version": "1.0.0", - "description": "Supernode status and metrics API" + "title": "supernode/service.proto", + "version": "version not set" }, + "tags": [ + { + "name": "SupernodeService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], "paths": { - "/api/v1/status": { + "/api/v1/debug/raw/pprof": { "get": { - "summary": "Get supernode status", - "description": "Returns system, network, and optional P2P metrics", + "summary": "Raw pprof endpoints - return standard pprof output directly", + "operationId": "SupernodeService_GetRawPprof", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, "parameters": [ { - "name": "include_p2p_metrics", + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", "in": "query", - "schema": { "type": "boolean" }, "required": false, - "description": "Optional: include detailed P2P metrics in the response\nMaps to query param via grpc-gateway: /api/v1/status?include_p2p_metrics=true" + "type": "integer", + "format": "int32" } ], + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/debug/raw/pprof/allocs": { + "get": { + "operationId": "SupernodeService_GetRawPprofAllocs", "responses": { "200": { - "description": "Status response", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/StatusResponse" } - } + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" } } - } + }, + "parameters": [ + { + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/debug/raw/pprof/block": { + "get": { + "operationId": "SupernodeService_GetRawPprofBlock", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/debug/raw/pprof/cmdline": { + "get": { + "operationId": "SupernodeService_GetRawPprofCmdline", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/debug/raw/pprof/goroutine": { + "get": { + "operationId": "SupernodeService_GetRawPprofGoroutine", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/debug/raw/pprof/heap": { + "get": { + "operationId": "SupernodeService_GetRawPprofHeap", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/debug/raw/pprof/mutex": { + "get": { + "operationId": "SupernodeService_GetRawPprofMutex", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/debug/raw/pprof/profile": { + "get": { + "operationId": "SupernodeService_GetRawPprofProfile", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "seconds", + "description": "CPU profile duration in seconds (default 30)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/debug/raw/pprof/symbol": { + "get": { + "operationId": "SupernodeService_GetRawPprofSymbol", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/debug/raw/pprof/threadcreate": { + "get": { + "operationId": "SupernodeService_GetRawPprofThreadcreate", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/debug/raw/pprof/trace": { + "get": { + "operationId": "SupernodeService_GetRawPprofTrace", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeRawPprofResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "debug", + "description": "Debug level (0 for binary, \u003e0 for text)", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "SupernodeService" + ] } }, "/api/v1/services": { "get": { - "summary": "List services", - "description": "Returns available gRPC services and their methods/streams", + "operationId": "SupernodeService_ListServices", "responses": { "200": { - "description": "Services response", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/ListServicesResponse" } - } + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeListServicesResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" } } - } + }, + "tags": [ + "SupernodeService" + ] + } + }, + "/api/v1/status": { + "get": { + "operationId": "SupernodeService_GetStatus", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/supernodeStatusResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "includeP2pMetrics", + "description": "Optional: include detailed P2P metrics in the response\nMaps to query param via grpc-gateway: /api/v1/status?include_p2p_metrics=true", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "SupernodeService" + ] } } }, - "components": { - "schemas": { - "StatusResponse": { - "type": "object", - "properties": { - "version": { "type": "string" }, - "uptimeSeconds": { "type": "integer" } + "definitions": { + "DhtMetricsBatchRetrievePoint": { + "type": "object", + "properties": { + "timeUnix": { + "type": "string", + "format": "int64", + "title": "event time (unix seconds)" + }, + "keys": { + "type": "integer", + "format": "int32", + "title": "keys requested" + }, + "required": { + "type": "integer", + "format": "int32", + "title": "required count" + }, + "foundLocal": { + "type": "integer", + "format": "int32", + "title": "found locally" + }, + "foundNetwork": { + "type": "integer", + "format": "int32", + "title": "found on network" + }, + "durationMs": { + "type": "string", + "format": "int64", + "title": "duration in milliseconds" + } + } + }, + "DhtMetricsStoreSuccessPoint": { + "type": "object", + "properties": { + "timeUnix": { + "type": "string", + "format": "int64", + "title": "event time (unix seconds)" + }, + "requests": { + "type": "integer", + "format": "int32", + "title": "total node RPCs attempted" + }, + "successful": { + "type": "integer", + "format": "int32", + "title": "successful node RPCs" + }, + "successRate": { + "type": "number", + "format": "double", + "title": "percentage (0-100)" + } + } + }, + "P2PMetricsBanEntry": { + "type": "object", + "properties": { + "id": { + "type": "string", + "title": "printable ID" + }, + "ip": { + "type": "string", + "title": "last seen IP" + }, + "port": { + "type": "integer", + "format": "int64", + "title": "last seen port" + }, + "count": { + "type": "integer", + "format": "int32", + "title": "failure count" + }, + "createdAtUnix": { + "type": "string", + "format": "int64", + "title": "first ban time (unix seconds)" + }, + "ageSeconds": { + "type": "string", + "format": "int64", + "title": "age in seconds" + } + }, + "title": "Ban list entry" + }, + "P2PMetricsDatabaseStats": { + "type": "object", + "properties": { + "p2pDbSizeMb": { + "type": "number", + "format": "double" + }, + "p2pDbRecordsCount": { + "type": "string", + "format": "int64" + } + }, + "title": "DB stats" + }, + "P2PMetricsDhtMetrics": { + "type": "object", + "properties": { + "storeSuccessRecent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/DhtMetricsStoreSuccessPoint" + } + }, + "batchRetrieveRecent": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/DhtMetricsBatchRetrievePoint" + } + }, + "hotPathBannedSkips": { + "type": "string", + "format": "int64", + "title": "counter" + }, + "hotPathBanIncrements": { + "type": "string", + "format": "int64", + "title": "counter" + } + }, + "title": "Rolling DHT metrics snapshot" + }, + "P2PMetricsDiskStatus": { + "type": "object", + "properties": { + "allMb": { + "type": "number", + "format": "double" + }, + "usedMb": { + "type": "number", + "format": "double" + }, + "freeMb": { + "type": "number", + "format": "double" } }, - "ListServicesResponse": { - "type": "object", - "properties": { - "services": { - "type": "array", - "items": { "$ref": "#/components/schemas/ServiceInfo" } + "title": "Disk status" + }, + "P2PMetricsHandleCounters": { + "type": "object", + "properties": { + "total": { + "type": "string", + "format": "int64" + }, + "success": { + "type": "string", + "format": "int64" + }, + "failure": { + "type": "string", + "format": "int64" + }, + "timeout": { + "type": "string", + "format": "int64" + } + }, + "title": "Per-handler counters from network layer" + }, + "ResourcesCPU": { + "type": "object", + "properties": { + "usagePercent": { + "type": "number", + "format": "double", + "title": "CPU usage percentage (0-100)" + }, + "cores": { + "type": "integer", + "format": "int32", + "title": "Number of CPU cores" + } + } + }, + "ResourcesMemory": { + "type": "object", + "properties": { + "totalGb": { + "type": "number", + "format": "double", + "title": "Total memory in GB" + }, + "usedGb": { + "type": "number", + "format": "double", + "title": "Used memory in GB" + }, + "availableGb": { + "type": "number", + "format": "double", + "title": "Available memory in GB" + }, + "usagePercent": { + "type": "number", + "format": "double", + "title": "Memory usage percentage (0-100)" + } + } + }, + "ResourcesStorage": { + "type": "object", + "properties": { + "path": { + "type": "string", + "title": "Storage path being monitored" + }, + "totalBytes": { + "type": "string", + "format": "uint64" + }, + "usedBytes": { + "type": "string", + "format": "uint64" + }, + "availableBytes": { + "type": "string", + "format": "uint64" + }, + "usagePercent": { + "type": "number", + "format": "double", + "title": "Storage usage percentage (0-100)" + } + } + }, + "StatusResponseNetwork": { + "type": "object", + "properties": { + "peersCount": { + "type": "integer", + "format": "int32", + "title": "Number of connected peers in P2P network" + }, + "peerAddresses": { + "type": "array", + "items": { + "type": "string" }, - "count": { "type": "integer" } + "title": "List of connected peer addresses (optional, may be empty for privacy)" + } + }, + "title": "Network information" + }, + "StatusResponseP2PMetrics": { + "type": "object", + "properties": { + "dhtMetrics": { + "$ref": "#/definitions/P2PMetricsDhtMetrics" + }, + "networkHandleMetrics": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/P2PMetricsHandleCounters" + } + }, + "connPoolMetrics": { + "type": "object", + "additionalProperties": { + "type": "string", + "format": "int64" + } + }, + "banList": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/P2PMetricsBanEntry" + } + }, + "database": { + "$ref": "#/definitions/P2PMetricsDatabaseStats" + }, + "disk": { + "$ref": "#/definitions/P2PMetricsDiskStatus" } }, - "ServiceInfo": { - "type": "object", - "properties": { - "name": { "type": "string" }, - "methods": { "type": "array", "items": { "type": "string" } } + "title": "P2P metrics and diagnostics (additive field)" + }, + "StatusResponseResources": { + "type": "object", + "properties": { + "cpu": { + "$ref": "#/definitions/ResourcesCPU" + }, + "memory": { + "$ref": "#/definitions/ResourcesMemory" + }, + "storageVolumes": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ResourcesStorage" + } + }, + "hardwareSummary": { + "type": "string", + "title": "Formatted hardware summary (e.g., \"8 cores / 32GB RAM\")" + } + }, + "title": "System resource information" + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } } } + }, + "supernodeListServicesResponse": { + "type": "object", + "properties": { + "services": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/supernodeServiceInfo" + } + }, + "count": { + "type": "integer", + "format": "int32" + } + } + }, + "supernodeRawPprofResponse": { + "type": "object", + "properties": { + "data": { + "type": "string", + "format": "byte", + "title": "Raw pprof data exactly as returned by runtime/pprof" + } + } + }, + "supernodeServiceInfo": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "methods": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "supernodeStatusResponse": { + "type": "object", + "properties": { + "version": { + "type": "string", + "title": "Supernode version" + }, + "uptimeSeconds": { + "type": "string", + "format": "uint64", + "title": "Uptime in seconds" + }, + "resources": { + "$ref": "#/definitions/StatusResponseResources" + }, + "registeredServices": { + "type": "array", + "items": { + "type": "string" + }, + "title": "All registered/available services" + }, + "network": { + "$ref": "#/definitions/StatusResponseNetwork", + "title": "P2P network information" + }, + "rank": { + "type": "integer", + "format": "int32", + "title": "Rank in the top supernodes list (0 if not in top list)" + }, + "ipAddress": { + "type": "string", + "title": "Supernode IP address with port (e.g., \"192.168.1.1:4445\")" + }, + "p2pMetrics": { + "$ref": "#/definitions/StatusResponseP2PMetrics" + } + }, + "title": "The StatusResponse represents system status with clear organization" } } } diff --git a/supernode/transport/grpc/status/handler.go b/supernode/transport/grpc/status/handler.go index 4e120279..e543e7b1 100644 --- a/supernode/transport/grpc/status/handler.go +++ b/supernode/transport/grpc/status/handler.go @@ -12,11 +12,17 @@ import ( type SupernodeServer struct { pb.UnimplementedSupernodeServiceServer statusService *statussvc.SupernodeStatusService + gatewayPort int } // NewSupernodeServer creates a new SupernodeServer func NewSupernodeServer(statusService *statussvc.SupernodeStatusService) *SupernodeServer { - return &SupernodeServer{statusService: statusService} + return &SupernodeServer{statusService: statusService, gatewayPort: 8002} +} + +// SetGatewayPort sets the gateway port for internal proxy requests +func (s *SupernodeServer) SetGatewayPort(port int) { + s.gatewayPort = port } // GetStatus implements SupernodeService.GetStatus diff --git a/supernode/transport/grpc/status/pprof_handlers.go b/supernode/transport/grpc/status/pprof_handlers.go index 4557e5f6..3c8defed 100644 --- a/supernode/transport/grpc/status/pprof_handlers.go +++ b/supernode/transport/grpc/status/pprof_handlers.go @@ -1,14 +1,12 @@ package server import ( - "bytes" "context" "fmt" + "io" + "net/http" "os" - "runtime" - "runtime/pprof" "strings" - "time" pb "github.com/LumeraProtocol/supernode/v2/gen/supernode" ) @@ -26,198 +24,230 @@ func (s *SupernodeServer) isPprofEnabled() bool { return os.Getenv("ENABLE_PPROF") == "true" } -// GetPprofIndex returns the pprof index page -func (s *SupernodeServer) GetPprofIndex(ctx context.Context, req *pb.GetPprofIndexRequest) (*pb.GetPprofIndexResponse, error) { - if !s.isPprofEnabled() { - return &pb.GetPprofIndexResponse{ - Html: "", - Enabled: false, - }, nil - } - - // Generate a simple index page with links to available profiles - html := ` - - -Supernode Profiling - - - -

Supernode Profiling

-

Available profiles:

- - -` - - return &pb.GetPprofIndexResponse{ - Html: html, - Enabled: true, - }, nil + +// GetRawPprof returns the pprof index +func (s *SupernodeServer) GetRawPprof(ctx context.Context, req *pb.RawPprofRequest) (*pb.RawPprofResponse, error) { + if !s.isPprofEnabled() { + return &pb.RawPprofResponse{Data: []byte("Profiling disabled")}, nil + } + + data, err := s.pprofProxy("/", "") + if err != nil { + return &pb.RawPprofResponse{Data: []byte(fmt.Sprintf("Error: %v", err))}, nil + } + + return &pb.RawPprofResponse{Data: data}, nil } -// GetPprofHeap returns the heap profile -func (s *SupernodeServer) GetPprofHeap(ctx context.Context, req *pb.GetPprofProfileRequest) (*pb.GetPprofProfileResponse, error) { - return s.getPprofProfile("heap", req.GetDebug()) +// GetRawPprofHeap returns raw heap profile +func (s *SupernodeServer) GetRawPprofHeap(ctx context.Context, req *pb.RawPprofRequest) (*pb.RawPprofResponse, error) { + if !s.isPprofEnabled() { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + queryParams := "" + if req.GetDebug() > 0 { + queryParams = fmt.Sprintf("debug=%d", req.GetDebug()) + } + + data, err := s.pprofProxy("/heap", queryParams) + if err != nil { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + return &pb.RawPprofResponse{Data: data}, nil } -// GetPprofGoroutine returns the goroutine profile -func (s *SupernodeServer) GetPprofGoroutine(ctx context.Context, req *pb.GetPprofProfileRequest) (*pb.GetPprofProfileResponse, error) { - return s.getPprofProfile("goroutine", req.GetDebug()) +// GetRawPprofGoroutine returns raw goroutine profile +func (s *SupernodeServer) GetRawPprofGoroutine(ctx context.Context, req *pb.RawPprofRequest) (*pb.RawPprofResponse, error) { + if !s.isPprofEnabled() { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + queryParams := "" + if req.GetDebug() > 0 { + queryParams = fmt.Sprintf("debug=%d", req.GetDebug()) + } + + data, err := s.pprofProxy("/goroutine", queryParams) + if err != nil { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + return &pb.RawPprofResponse{Data: data}, nil } -// GetPprofAllocs returns the allocations profile -func (s *SupernodeServer) GetPprofAllocs(ctx context.Context, req *pb.GetPprofProfileRequest) (*pb.GetPprofProfileResponse, error) { - return s.getPprofProfile("allocs", req.GetDebug()) +// GetRawPprofAllocs returns raw allocations profile +func (s *SupernodeServer) GetRawPprofAllocs(ctx context.Context, req *pb.RawPprofRequest) (*pb.RawPprofResponse, error) { + if !s.isPprofEnabled() { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + queryParams := "" + if req.GetDebug() > 0 { + queryParams = fmt.Sprintf("debug=%d", req.GetDebug()) + } + + data, err := s.pprofProxy("/allocs", queryParams) + if err != nil { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + return &pb.RawPprofResponse{Data: data}, nil } -// GetPprofBlock returns the block profile -func (s *SupernodeServer) GetPprofBlock(ctx context.Context, req *pb.GetPprofProfileRequest) (*pb.GetPprofProfileResponse, error) { - return s.getPprofProfile("block", req.GetDebug()) +// GetRawPprofBlock returns raw block profile +func (s *SupernodeServer) GetRawPprofBlock(ctx context.Context, req *pb.RawPprofRequest) (*pb.RawPprofResponse, error) { + if !s.isPprofEnabled() { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + queryParams := "" + if req.GetDebug() > 0 { + queryParams = fmt.Sprintf("debug=%d", req.GetDebug()) + } + + data, err := s.pprofProxy("/block", queryParams) + if err != nil { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + return &pb.RawPprofResponse{Data: data}, nil } -// GetPprofMutex returns the mutex profile -func (s *SupernodeServer) GetPprofMutex(ctx context.Context, req *pb.GetPprofProfileRequest) (*pb.GetPprofProfileResponse, error) { - return s.getPprofProfile("mutex", req.GetDebug()) +// GetRawPprofMutex returns raw mutex profile +func (s *SupernodeServer) GetRawPprofMutex(ctx context.Context, req *pb.RawPprofRequest) (*pb.RawPprofResponse, error) { + if !s.isPprofEnabled() { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + queryParams := "" + if req.GetDebug() > 0 { + queryParams = fmt.Sprintf("debug=%d", req.GetDebug()) + } + + data, err := s.pprofProxy("/mutex", queryParams) + if err != nil { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + return &pb.RawPprofResponse{Data: data}, nil } -// GetPprofThreadcreate returns the threadcreate profile -func (s *SupernodeServer) GetPprofThreadcreate(ctx context.Context, req *pb.GetPprofProfileRequest) (*pb.GetPprofProfileResponse, error) { - return s.getPprofProfile("threadcreate", req.GetDebug()) +// GetRawPprofThreadcreate returns raw threadcreate profile +func (s *SupernodeServer) GetRawPprofThreadcreate(ctx context.Context, req *pb.RawPprofRequest) (*pb.RawPprofResponse, error) { + if !s.isPprofEnabled() { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + queryParams := "" + if req.GetDebug() > 0 { + queryParams = fmt.Sprintf("debug=%d", req.GetDebug()) + } + + data, err := s.pprofProxy("/threadcreate", queryParams) + if err != nil { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + return &pb.RawPprofResponse{Data: data}, nil } -// GetPprofProfile returns the CPU profile -func (s *SupernodeServer) GetPprofProfile(ctx context.Context, req *pb.GetPprofCpuProfileRequest) (*pb.GetPprofProfileResponse, error) { +// GetRawPprofProfile returns raw CPU profile +func (s *SupernodeServer) GetRawPprofProfile(ctx context.Context, req *pb.RawPprofCpuRequest) (*pb.RawPprofResponse, error) { if !s.isPprofEnabled() { - return &pb.GetPprofProfileResponse{ - Enabled: false, - Error: "Profiling is disabled. Enable on testnet or set ENABLE_PPROF=true", - }, nil + return &pb.RawPprofResponse{Data: []byte{}}, nil } seconds := req.GetSeconds() if seconds <= 0 { - seconds = 30 // Default to 30 seconds + seconds = 30 } if seconds > 300 { - seconds = 300 // Cap at 5 minutes + seconds = 300 + } + + queryParams := fmt.Sprintf("seconds=%d", seconds) + data, err := s.pprofProxy("/profile", queryParams) + if err != nil { + return &pb.RawPprofResponse{Data: []byte{}}, nil } - var buf bytes.Buffer - if err := pprof.StartCPUProfile(&buf); err != nil { - return &pb.GetPprofProfileResponse{ - Enabled: true, - Error: fmt.Sprintf("Failed to start CPU profile: %v", err), - }, nil + return &pb.RawPprofResponse{Data: data}, nil +} + +// GetRawPprofCmdline returns the command line +func (s *SupernodeServer) GetRawPprofCmdline(ctx context.Context, req *pb.RawPprofRequest) (*pb.RawPprofResponse, error) { + if !s.isPprofEnabled() { + return &pb.RawPprofResponse{Data: []byte{}}, nil } - // Profile for the specified duration - time.Sleep(time.Duration(seconds) * time.Second) - pprof.StopCPUProfile() + data, err := s.pprofProxy("/cmdline", "") + if err != nil { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } - return &pb.GetPprofProfileResponse{ - Data: buf.Bytes(), - ContentType: "application/octet-stream", - Enabled: true, - }, nil + return &pb.RawPprofResponse{Data: data}, nil } -// getPprofProfile is a helper function to get various runtime profiles -func (s *SupernodeServer) getPprofProfile(profileType string, debug int32) (*pb.GetPprofProfileResponse, error) { +// GetRawPprofSymbol returns symbol information +func (s *SupernodeServer) GetRawPprofSymbol(ctx context.Context, req *pb.RawPprofRequest) (*pb.RawPprofResponse, error) { if !s.isPprofEnabled() { - return &pb.GetPprofProfileResponse{ - Enabled: false, - Error: "Profiling is disabled. Enable on testnet or set ENABLE_PPROF=true", - }, nil - } - - var buf bytes.Buffer - var contentType string - - // Get the appropriate profile - var p *pprof.Profile - switch profileType { - case "heap": - runtime.GC() // Force GC before heap profile - p = pprof.Lookup("heap") - contentType = "application/octet-stream" - case "goroutine": - p = pprof.Lookup("goroutine") - contentType = "application/octet-stream" - case "allocs": - p = pprof.Lookup("allocs") - contentType = "application/octet-stream" - case "block": - p = pprof.Lookup("block") - contentType = "application/octet-stream" - case "mutex": - p = pprof.Lookup("mutex") - contentType = "application/octet-stream" - case "threadcreate": - p = pprof.Lookup("threadcreate") - contentType = "application/octet-stream" - default: - return &pb.GetPprofProfileResponse{ - Enabled: true, - Error: fmt.Sprintf("Unknown profile type: %s", profileType), - }, nil - } - - if p == nil { - return &pb.GetPprofProfileResponse{ - Enabled: true, - Error: fmt.Sprintf("Profile %s not found", profileType), - }, nil - } - - // Write the profile to buffer - // If debug > 0, write in text format for human reading - if debug > 0 { - if err := p.WriteTo(&buf, int(debug)); err != nil { - return &pb.GetPprofProfileResponse{ - Enabled: true, - Error: fmt.Sprintf("Failed to write profile: %v", err), - }, nil - } - contentType = "text/plain" - } else { - // Write in binary pprof format - if err := p.WriteTo(&buf, 0); err != nil { - return &pb.GetPprofProfileResponse{ - Enabled: true, - Error: fmt.Sprintf("Failed to write profile: %v", err), - }, nil - } + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + data, err := s.pprofProxy("/symbol", "") + if err != nil { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + return &pb.RawPprofResponse{Data: data}, nil +} + +// GetRawPprofTrace returns execution trace +func (s *SupernodeServer) GetRawPprofTrace(ctx context.Context, req *pb.RawPprofRequest) (*pb.RawPprofResponse, error) { + if !s.isPprofEnabled() { + return &pb.RawPprofResponse{Data: []byte{}}, nil + } + + // Trace typically takes a seconds parameter + queryParams := "seconds=1" + data, err := s.pprofProxy("/trace", queryParams) + if err != nil { + return &pb.RawPprofResponse{Data: []byte{}}, nil } - return &pb.GetPprofProfileResponse{ - Data: buf.Bytes(), - ContentType: contentType, - Enabled: true, - }, nil + return &pb.RawPprofResponse{Data: data}, nil } \ No newline at end of file