testapp

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2023 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package testapp has the protbuf/grpc definitions for the test application implemented in traceproftest.

Index

Constants

This section is empty.

Variables

View Source
var File_internal_traceprof_testapp_test_app_proto protoreflect.FileDescriptor
View Source
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.

func (UnimplementedTestAppServer) Work

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) Descriptor() ([]byte, []int)

Deprecated: Use WorkReq.ProtoReflect.Descriptor instead.

func (*WorkReq) GetCpuDuration

func (x *WorkReq) GetCpuDuration() int64

func (*WorkReq) GetSqlDuration

func (x *WorkReq) GetSqlDuration() int64

func (*WorkReq) ProtoMessage

func (*WorkReq) ProtoMessage()

func (*WorkReq) ProtoReflect

func (x *WorkReq) ProtoReflect() protoreflect.Message

func (*WorkReq) Reset

func (x *WorkReq) Reset()

func (*WorkReq) String

func (x *WorkReq) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use WorkRes.ProtoReflect.Descriptor instead.

func (*WorkRes) GetLocalRootSpanId

func (x *WorkRes) GetLocalRootSpanId() string

func (*WorkRes) GetSpanId

func (x *WorkRes) GetSpanId() string

func (*WorkRes) ProtoMessage

func (*WorkRes) ProtoMessage()

func (*WorkRes) ProtoReflect

func (x *WorkRes) ProtoReflect() protoreflect.Message

func (*WorkRes) Reset

func (x *WorkRes) Reset()

func (*WorkRes) String

func (x *WorkRes) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL