Documentation ¶
Overview ¶
Package testapp has the protbuf/grpc definitions for the test application implemented in traceproftest.
Index ¶
Constants ¶
const (
TestApp_Work_FullMethodName = "/testapp.TestApp/Work"
)
Variables ¶
var File_internal_traceprof_testapp_test_app_proto protoreflect.FileDescriptor
var TestApp_ServiceDesc = grpc.ServiceDesc{ ServiceName: "testapp.TestApp", HandlerType: (*TestAppServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Work", Handler: _TestApp_Work_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "internal/traceprof/testapp/test_app.proto", }
TestApp_ServiceDesc is the grpc.ServiceDesc for TestApp service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTestAppServer ¶
func RegisterTestAppServer(s grpc.ServiceRegistrar, srv TestAppServer)
Types ¶
type TestAppClient ¶
type TestAppClient interface {
Work(ctx context.Context, in *WorkReq, opts ...grpc.CallOption) (*WorkRes, error)
}
TestAppClient is the client API for TestApp service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewTestAppClient ¶
func NewTestAppClient(cc grpc.ClientConnInterface) TestAppClient
type TestAppServer ¶
type TestAppServer interface { Work(context.Context, *WorkReq) (*WorkRes, error) // contains filtered or unexported methods }
TestAppServer is the server API for TestApp service. All implementations must embed UnimplementedTestAppServer for forward compatibility
type UnimplementedTestAppServer ¶
type UnimplementedTestAppServer struct { }
UnimplementedTestAppServer must be embedded to have forward compatible implementations.
type UnsafeTestAppServer ¶
type UnsafeTestAppServer interface {
// contains filtered or unexported methods
}
UnsafeTestAppServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TestAppServer will result in compilation errors.
type WorkReq ¶
type WorkReq struct { CpuDuration int64 `protobuf:"varint,1,opt,name=cpu_duration,json=cpuDuration,proto3" json:"cpu_duration,omitempty"` SqlDuration int64 `protobuf:"varint,2,opt,name=sql_duration,json=sqlDuration,proto3" json:"sql_duration,omitempty"` // contains filtered or unexported fields }
func (*WorkReq) Descriptor
deprecated
func (*WorkReq) GetCpuDuration ¶
func (*WorkReq) GetSqlDuration ¶
func (*WorkReq) ProtoMessage ¶
func (*WorkReq) ProtoMessage()
func (*WorkReq) ProtoReflect ¶
func (x *WorkReq) ProtoReflect() protoreflect.Message
type WorkRes ¶
type WorkRes struct { SpanId string `protobuf:"bytes,1,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"` LocalRootSpanId string `protobuf:"bytes,2,opt,name=local_root_span_id,json=localRootSpanId,proto3" json:"local_root_span_id,omitempty"` // contains filtered or unexported fields }
func (*WorkRes) Descriptor
deprecated
func (*WorkRes) GetLocalRootSpanId ¶
func (*WorkRes) ProtoMessage ¶
func (*WorkRes) ProtoMessage()
func (*WorkRes) ProtoReflect ¶
func (x *WorkRes) ProtoReflect() protoreflect.Message