Profile.pb.go 18.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: profile/Profile.proto

package v2

import (
	context "context"
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	math "math"
何延龙 已提交
14 15
	v21 "github.com/SkyAPM/SkyAPM-php-sdk/reporter/network/common/v2"
	v2 "github.com/SkyAPM/SkyAPM-php-sdk/reporter/network/language/agent/v2"
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package

type ProfileTaskCommandQuery struct {
	// current sniffer information
	ServiceId  int32 `protobuf:"varint,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"`
	InstanceId int32 `protobuf:"varint,2,opt,name=instanceId,proto3" json:"instanceId,omitempty"`
	// last command timestamp
	LastCommandTime      int64    `protobuf:"varint,3,opt,name=lastCommandTime,proto3" json:"lastCommandTime,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *ProfileTaskCommandQuery) Reset()         { *m = ProfileTaskCommandQuery{} }
func (m *ProfileTaskCommandQuery) String() string { return proto.CompactTextString(m) }
func (*ProfileTaskCommandQuery) ProtoMessage()    {}
func (*ProfileTaskCommandQuery) Descriptor() ([]byte, []int) {
	return fileDescriptor_ed871c17f6550fe9, []int{0}
}

func (m *ProfileTaskCommandQuery) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ProfileTaskCommandQuery.Unmarshal(m, b)
}
func (m *ProfileTaskCommandQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ProfileTaskCommandQuery.Marshal(b, m, deterministic)
}
func (m *ProfileTaskCommandQuery) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ProfileTaskCommandQuery.Merge(m, src)
}
func (m *ProfileTaskCommandQuery) XXX_Size() int {
	return xxx_messageInfo_ProfileTaskCommandQuery.Size(m)
}
func (m *ProfileTaskCommandQuery) XXX_DiscardUnknown() {
	xxx_messageInfo_ProfileTaskCommandQuery.DiscardUnknown(m)
}

var xxx_messageInfo_ProfileTaskCommandQuery proto.InternalMessageInfo

func (m *ProfileTaskCommandQuery) GetServiceId() int32 {
	if m != nil {
		return m.ServiceId
	}
	return 0
}

func (m *ProfileTaskCommandQuery) GetInstanceId() int32 {
	if m != nil {
		return m.InstanceId
	}
	return 0
}

func (m *ProfileTaskCommandQuery) GetLastCommandTime() int64 {
	if m != nil {
		return m.LastCommandTime
	}
	return 0
}

// dumped thread snapshot
type ThreadSnapshot struct {
	// profile task id
	TaskId string `protobuf:"bytes,1,opt,name=taskId,proto3" json:"taskId,omitempty"`
	// dumped segment id
何延龙 已提交
91
	TraceSegmentId *v2.UniqueIdV2 `protobuf:"bytes,2,opt,name=traceSegmentId,proto3" json:"traceSegmentId,omitempty"`
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
	// dump timestamp
	Time int64 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"`
	// snapshot dump sequence, start with zero
	Sequence int32 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"`
	// snapshot stack
	Stack                *ThreadStack `protobuf:"bytes,5,opt,name=stack,proto3" json:"stack,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (m *ThreadSnapshot) Reset()         { *m = ThreadSnapshot{} }
func (m *ThreadSnapshot) String() string { return proto.CompactTextString(m) }
func (*ThreadSnapshot) ProtoMessage()    {}
func (*ThreadSnapshot) Descriptor() ([]byte, []int) {
	return fileDescriptor_ed871c17f6550fe9, []int{1}
}

func (m *ThreadSnapshot) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ThreadSnapshot.Unmarshal(m, b)
}
func (m *ThreadSnapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ThreadSnapshot.Marshal(b, m, deterministic)
}
func (m *ThreadSnapshot) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ThreadSnapshot.Merge(m, src)
}
func (m *ThreadSnapshot) XXX_Size() int {
	return xxx_messageInfo_ThreadSnapshot.Size(m)
}
func (m *ThreadSnapshot) XXX_DiscardUnknown() {
	xxx_messageInfo_ThreadSnapshot.DiscardUnknown(m)
}

var xxx_messageInfo_ThreadSnapshot proto.InternalMessageInfo

func (m *ThreadSnapshot) GetTaskId() string {
	if m != nil {
		return m.TaskId
	}
	return ""
}

何延龙 已提交
135
func (m *ThreadSnapshot) GetTraceSegmentId() *v2.UniqueIdV2 {
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
	if m != nil {
		return m.TraceSegmentId
	}
	return nil
}

func (m *ThreadSnapshot) GetTime() int64 {
	if m != nil {
		return m.Time
	}
	return 0
}

func (m *ThreadSnapshot) GetSequence() int32 {
	if m != nil {
		return m.Sequence
	}
	return 0
}

func (m *ThreadSnapshot) GetStack() *ThreadStack {
	if m != nil {
		return m.Stack
	}
	return nil
}

type ThreadStack struct {
	// stack code signature list
	CodeSignatures       []string `protobuf:"bytes,1,rep,name=codeSignatures,proto3" json:"codeSignatures,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *ThreadStack) Reset()         { *m = ThreadStack{} }
func (m *ThreadStack) String() string { return proto.CompactTextString(m) }
func (*ThreadStack) ProtoMessage()    {}
func (*ThreadStack) Descriptor() ([]byte, []int) {
	return fileDescriptor_ed871c17f6550fe9, []int{2}
}

func (m *ThreadStack) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ThreadStack.Unmarshal(m, b)
}
func (m *ThreadStack) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ThreadStack.Marshal(b, m, deterministic)
}
func (m *ThreadStack) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ThreadStack.Merge(m, src)
}
func (m *ThreadStack) XXX_Size() int {
	return xxx_messageInfo_ThreadStack.Size(m)
}
func (m *ThreadStack) XXX_DiscardUnknown() {
	xxx_messageInfo_ThreadStack.DiscardUnknown(m)
}

var xxx_messageInfo_ThreadStack proto.InternalMessageInfo

func (m *ThreadStack) GetCodeSignatures() []string {
	if m != nil {
		return m.CodeSignatures
	}
	return nil
}

// profile task finished report
type ProfileTaskFinishReport struct {
	// current sniffer information
	ServiceId  int32 `protobuf:"varint,1,opt,name=serviceId,proto3" json:"serviceId,omitempty"`
	InstanceId int32 `protobuf:"varint,2,opt,name=instanceId,proto3" json:"instanceId,omitempty"`
	// profile task
	TaskId               string   `protobuf:"bytes,3,opt,name=taskId,proto3" json:"taskId,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (m *ProfileTaskFinishReport) Reset()         { *m = ProfileTaskFinishReport{} }
func (m *ProfileTaskFinishReport) String() string { return proto.CompactTextString(m) }
func (*ProfileTaskFinishReport) ProtoMessage()    {}
func (*ProfileTaskFinishReport) Descriptor() ([]byte, []int) {
	return fileDescriptor_ed871c17f6550fe9, []int{3}
}

func (m *ProfileTaskFinishReport) XXX_Unmarshal(b []byte) error {
	return xxx_messageInfo_ProfileTaskFinishReport.Unmarshal(m, b)
}
func (m *ProfileTaskFinishReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	return xxx_messageInfo_ProfileTaskFinishReport.Marshal(b, m, deterministic)
}
func (m *ProfileTaskFinishReport) XXX_Merge(src proto.Message) {
	xxx_messageInfo_ProfileTaskFinishReport.Merge(m, src)
}
func (m *ProfileTaskFinishReport) XXX_Size() int {
	return xxx_messageInfo_ProfileTaskFinishReport.Size(m)
}
func (m *ProfileTaskFinishReport) XXX_DiscardUnknown() {
	xxx_messageInfo_ProfileTaskFinishReport.DiscardUnknown(m)
}

var xxx_messageInfo_ProfileTaskFinishReport proto.InternalMessageInfo

func (m *ProfileTaskFinishReport) GetServiceId() int32 {
	if m != nil {
		return m.ServiceId
	}
	return 0
}

func (m *ProfileTaskFinishReport) GetInstanceId() int32 {
	if m != nil {
		return m.InstanceId
	}
	return 0
}

func (m *ProfileTaskFinishReport) GetTaskId() string {
	if m != nil {
		return m.TaskId
	}
	return ""
}

func init() {
	proto.RegisterType((*ProfileTaskCommandQuery)(nil), "skywalking.network.protocol.agent.profile.ProfileTaskCommandQuery")
	proto.RegisterType((*ThreadSnapshot)(nil), "skywalking.network.protocol.agent.profile.ThreadSnapshot")
	proto.RegisterType((*ThreadStack)(nil), "skywalking.network.protocol.agent.profile.ThreadStack")
	proto.RegisterType((*ProfileTaskFinishReport)(nil), "skywalking.network.protocol.agent.profile.ProfileTaskFinishReport")
}

func init() { proto.RegisterFile("profile/Profile.proto", fileDescriptor_ed871c17f6550fe9) }

var fileDescriptor_ed871c17f6550fe9 = []byte{
何延龙 已提交
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
	// 473 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xd1, 0x8a, 0xd4, 0x30,
	0x14, 0xb5, 0x33, 0x3b, 0x8b, 0x73, 0x07, 0x66, 0x25, 0xe2, 0x5a, 0x8b, 0xc8, 0xd0, 0x87, 0xa5,
	0x3e, 0xd8, 0x42, 0x17, 0x05, 0x5f, 0x57, 0x10, 0x16, 0x44, 0xc6, 0xce, 0xb8, 0x82, 0xe0, 0x43,
	0x4c, 0xaf, 0x9d, 0xd0, 0x36, 0xe9, 0x26, 0xe9, 0x2e, 0x83, 0x4f, 0xfe, 0x8e, 0x5f, 0xe1, 0x7f,
	0xf8, 0x33, 0x62, 0x9b, 0x99, 0xd6, 0x8a, 0xe0, 0xea, 0x53, 0x9a, 0x73, 0x4f, 0xce, 0x49, 0xce,
	0xbd, 0x14, 0xee, 0x55, 0x4a, 0x7e, 0xe2, 0x05, 0x46, 0xcb, 0x76, 0x0d, 0x2b, 0x25, 0x8d, 0x24,
	0x8f, 0x75, 0xbe, 0xbd, 0xa6, 0x45, 0xce, 0x45, 0x16, 0x0a, 0x34, 0xd7, 0x52, 0xe5, 0x6d, 0x85,
	0xc9, 0x22, 0xa4, 0x19, 0x0a, 0x13, 0xda, 0x83, 0xde, 0x5d, 0x26, 0xcb, 0x52, 0x8a, 0xa8, 0x5d,
	0x5a, 0x96, 0xf7, 0xc0, 0x82, 0x46, 0x51, 0x86, 0x4f, 0xfa, 0x25, 0xff, 0x8b, 0x03, 0xf7, 0xad,
	0xd9, 0x9a, 0xea, 0xfc, 0x85, 0x2c, 0x4b, 0x2a, 0xd2, 0x37, 0x35, 0xaa, 0x2d, 0x79, 0x08, 0x53,
	0x8d, 0xea, 0x8a, 0x33, 0x3c, 0x4f, 0x5d, 0x67, 0xe1, 0x04, 0x93, 0xa4, 0x03, 0xc8, 0x23, 0x00,
	0x2e, 0xb4, 0xa1, 0xa2, 0x29, 0x8f, 0x9a, 0x72, 0x0f, 0x21, 0x01, 0x1c, 0x15, 0x54, 0x1b, 0xab,
	0xb8, 0xe6, 0x25, 0xba, 0xe3, 0x85, 0x13, 0x8c, 0x93, 0x21, 0xec, 0x7f, 0x77, 0x60, 0xbe, 0xde,
	0x28, 0xa4, 0xe9, 0x4a, 0xd0, 0x4a, 0x6f, 0xa4, 0x21, 0xc7, 0x70, 0x68, 0xa8, 0xce, 0xad, 0xef,
	0x34, 0xb1, 0x3b, 0x72, 0x0a, 0xf3, 0xe6, 0x11, 0x2b, 0xcc, 0x4a, 0x14, 0xc6, 0x1a, 0xcf, 0xe2,
	0x59, 0xf8, 0x56, 0xf0, 0xcb, 0x1a, 0xcf, 0xd3, 0x8b, 0x38, 0x19, 0x50, 0x08, 0x81, 0x03, 0xd3,
	0xd9, 0x37, 0xdf, 0xc4, 0x83, 0xdb, 0x1a, 0x2f, 0x6b, 0x14, 0x0c, 0xdd, 0x83, 0xe6, 0xee, 0xfb,
	0x3d, 0x79, 0x05, 0x13, 0x6d, 0x28, 0xcb, 0xdd, 0x49, 0xa3, 0xfd, 0x2c, 0xfc, 0xeb, 0xf8, 0x43,
	0xfb, 0x8c, 0x9f, 0xa7, 0x93, 0x56, 0xc4, 0x7f, 0x0a, 0xb3, 0x1e, 0x4a, 0x4e, 0x60, 0xce, 0x64,
	0x8a, 0x2b, 0x9e, 0x09, 0x6a, 0x6a, 0x85, 0xda, 0x75, 0x16, 0xe3, 0x60, 0x9a, 0x0c, 0x50, 0x5f,
	0xfe, 0xd2, 0x97, 0x97, 0x5c, 0x70, 0xbd, 0x49, 0xb0, 0x92, 0xca, 0xfc, 0x67, 0x5f, 0xba, 0x68,
	0xc7, 0xfd, 0x68, 0xe3, 0x6f, 0x23, 0x98, 0xf5, 0x1c, 0x49, 0x0e, 0xc7, 0x19, 0x9a, 0xdf, 0x67,
	0x43, 0x93, 0xb3, 0x1b, 0x04, 0xf2, 0x87, 0xd9, 0xf2, 0x66, 0xe1, 0x4e, 0xee, 0x22, 0xf6, 0x6f,
	0x91, 0x0f, 0x70, 0xc4, 0x64, 0x51, 0x20, 0x33, 0xfb, 0x11, 0x78, 0x7e, 0xf3, 0xd8, 0xed, 0xd1,
	0x81, 0x78, 0xe0, 0x10, 0x84, 0x3b, 0xaa, 0xc9, 0xae, 0xcb, 0xf2, 0x5f, 0x5f, 0xd1, 0xef, 0xc4,
	0xc0, 0xe8, 0xec, 0x33, 0xc4, 0x52, 0x65, 0x21, 0xad, 0x28, 0xdb, 0x60, 0x5f, 0x9e, 0x56, 0xe5,
	0xde, 0xa2, 0xa0, 0x22, 0xab, 0x69, 0x86, 0x3b, 0xf1, 0xa5, 0xf3, 0xfe, 0xa4, 0xa3, 0x46, 0x96,
	0x16, 0xed, 0x68, 0xd1, 0xee, 0x97, 0x70, 0x15, 0x7f, 0x1d, 0x79, 0xab, 0x7c, 0xfb, 0xce, 0x6a,
	0xbe, 0x6e, 0x89, 0x4b, 0x7b, 0xe3, 0x8f, 0x87, 0xcd, 0xdd, 0x4f, 0x7f, 0x04, 0x00, 0x00, 0xff,
	0xff, 0xa6, 0x9a, 0xa1, 0x84, 0x44, 0x04, 0x00, 0x00,
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// ProfileTaskClient is the client API for ProfileTask service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ProfileTaskClient interface {
	// query all sniffer need to execute profile task commands
何延龙 已提交
317
	GetProfileTaskCommands(ctx context.Context, in *ProfileTaskCommandQuery, opts ...grpc.CallOption) (*v21.CommandsV2, error)
318 319 320
	// collect dumped thread snapshot
	CollectSnapshot(ctx context.Context, opts ...grpc.CallOption) (ProfileTask_CollectSnapshotClient, error)
	// report profiling task finished
何延龙 已提交
321
	ReportTaskFinish(ctx context.Context, in *ProfileTaskFinishReport, opts ...grpc.CallOption) (*v21.CommandsV2, error)
322 323 324 325 326 327 328 329 330 331
}

type profileTaskClient struct {
	cc *grpc.ClientConn
}

func NewProfileTaskClient(cc *grpc.ClientConn) ProfileTaskClient {
	return &profileTaskClient{cc}
}

何延龙 已提交
332 333
func (c *profileTaskClient) GetProfileTaskCommands(ctx context.Context, in *ProfileTaskCommandQuery, opts ...grpc.CallOption) (*v21.CommandsV2, error) {
	out := new(v21.CommandsV2)
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351
	err := c.cc.Invoke(ctx, "/skywalking.network.protocol.agent.profile.ProfileTask/getProfileTaskCommands", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *profileTaskClient) CollectSnapshot(ctx context.Context, opts ...grpc.CallOption) (ProfileTask_CollectSnapshotClient, error) {
	stream, err := c.cc.NewStream(ctx, &_ProfileTask_serviceDesc.Streams[0], "/skywalking.network.protocol.agent.profile.ProfileTask/collectSnapshot", opts...)
	if err != nil {
		return nil, err
	}
	x := &profileTaskCollectSnapshotClient{stream}
	return x, nil
}

type ProfileTask_CollectSnapshotClient interface {
	Send(*ThreadSnapshot) error
何延龙 已提交
352
	CloseAndRecv() (*v21.CommandsV2, error)
353 354 355 356 357 358 359 360 361 362 363
	grpc.ClientStream
}

type profileTaskCollectSnapshotClient struct {
	grpc.ClientStream
}

func (x *profileTaskCollectSnapshotClient) Send(m *ThreadSnapshot) error {
	return x.ClientStream.SendMsg(m)
}

何延龙 已提交
364
func (x *profileTaskCollectSnapshotClient) CloseAndRecv() (*v21.CommandsV2, error) {
365 366 367
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
何延龙 已提交
368
	m := new(v21.CommandsV2)
369 370 371 372 373 374
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

何延龙 已提交
375 376
func (c *profileTaskClient) ReportTaskFinish(ctx context.Context, in *ProfileTaskFinishReport, opts ...grpc.CallOption) (*v21.CommandsV2, error) {
	out := new(v21.CommandsV2)
377 378 379 380 381 382 383 384 385 386
	err := c.cc.Invoke(ctx, "/skywalking.network.protocol.agent.profile.ProfileTask/reportTaskFinish", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ProfileTaskServer is the server API for ProfileTask service.
type ProfileTaskServer interface {
	// query all sniffer need to execute profile task commands
何延龙 已提交
387
	GetProfileTaskCommands(context.Context, *ProfileTaskCommandQuery) (*v21.CommandsV2, error)
388 389 390
	// collect dumped thread snapshot
	CollectSnapshot(ProfileTask_CollectSnapshotServer) error
	// report profiling task finished
何延龙 已提交
391
	ReportTaskFinish(context.Context, *ProfileTaskFinishReport) (*v21.CommandsV2, error)
392 393 394 395 396 397
}

// UnimplementedProfileTaskServer can be embedded to have forward compatible implementations.
type UnimplementedProfileTaskServer struct {
}

何延龙 已提交
398
func (*UnimplementedProfileTaskServer) GetProfileTaskCommands(ctx context.Context, req *ProfileTaskCommandQuery) (*v21.CommandsV2, error) {
399 400 401 402 403
	return nil, status.Errorf(codes.Unimplemented, "method GetProfileTaskCommands not implemented")
}
func (*UnimplementedProfileTaskServer) CollectSnapshot(srv ProfileTask_CollectSnapshotServer) error {
	return status.Errorf(codes.Unimplemented, "method CollectSnapshot not implemented")
}
何延龙 已提交
404
func (*UnimplementedProfileTaskServer) ReportTaskFinish(ctx context.Context, req *ProfileTaskFinishReport) (*v21.CommandsV2, error) {
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434
	return nil, status.Errorf(codes.Unimplemented, "method ReportTaskFinish not implemented")
}

func RegisterProfileTaskServer(s *grpc.Server, srv ProfileTaskServer) {
	s.RegisterService(&_ProfileTask_serviceDesc, srv)
}

func _ProfileTask_GetProfileTaskCommands_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ProfileTaskCommandQuery)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProfileTaskServer).GetProfileTaskCommands(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/skywalking.network.protocol.agent.profile.ProfileTask/GetProfileTaskCommands",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProfileTaskServer).GetProfileTaskCommands(ctx, req.(*ProfileTaskCommandQuery))
	}
	return interceptor(ctx, in, info, handler)
}

func _ProfileTask_CollectSnapshot_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(ProfileTaskServer).CollectSnapshot(&profileTaskCollectSnapshotServer{stream})
}

type ProfileTask_CollectSnapshotServer interface {
何延龙 已提交
435
	SendAndClose(*v21.CommandsV2) error
436 437 438 439 440 441 442 443
	Recv() (*ThreadSnapshot, error)
	grpc.ServerStream
}

type profileTaskCollectSnapshotServer struct {
	grpc.ServerStream
}

何延龙 已提交
444
func (x *profileTaskCollectSnapshotServer) SendAndClose(m *v21.CommandsV2) error {
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495
	return x.ServerStream.SendMsg(m)
}

func (x *profileTaskCollectSnapshotServer) Recv() (*ThreadSnapshot, error) {
	m := new(ThreadSnapshot)
	if err := x.ServerStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func _ProfileTask_ReportTaskFinish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ProfileTaskFinishReport)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ProfileTaskServer).ReportTaskFinish(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/skywalking.network.protocol.agent.profile.ProfileTask/ReportTaskFinish",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ProfileTaskServer).ReportTaskFinish(ctx, req.(*ProfileTaskFinishReport))
	}
	return interceptor(ctx, in, info, handler)
}

var _ProfileTask_serviceDesc = grpc.ServiceDesc{
	ServiceName: "skywalking.network.protocol.agent.profile.ProfileTask",
	HandlerType: (*ProfileTaskServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "getProfileTaskCommands",
			Handler:    _ProfileTask_GetProfileTaskCommands_Handler,
		},
		{
			MethodName: "reportTaskFinish",
			Handler:    _ProfileTask_ReportTaskFinish_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "collectSnapshot",
			Handler:       _ProfileTask_CollectSnapshot_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "profile/Profile.proto",
}