debug

package
v0.0.50 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package debug is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	Pattern_DebugService_PProf_0_For_Gin         = pattern_DebugService_PProf_0
	Pattern_DebugService_PProf_1_For_GrpcGateway = pattern_DebugService_PProf_1
	Pattern_DebugService_PProf_2_For_YApi        = pattern_DebugService_PProf_2
	Pattern_DebugService_ExpVar_0                = pattern_DebugService_ExpVar_0
)

export some private fields

View Source
var DebugService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sole.api.v1.debug.DebugService",
	HandlerType: (*DebugServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PProf",
			Handler:    _DebugService_PProf_Handler,
		},
		{
			MethodName: "ExpVar",
			Handler:    _DebugService_ExpVar_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "debug.proto",
}

DebugService_ServiceDesc is the grpc.ServiceDesc for DebugService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_debug_proto protoreflect.FileDescriptor

Functions

func RegisterDebugServiceHandler

func RegisterDebugServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterDebugServiceHandler registers the http handlers for service DebugService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterDebugServiceHandlerClient

func RegisterDebugServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DebugServiceClient) error

RegisterDebugServiceHandlerClient registers the http handlers for service DebugService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DebugServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DebugServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "DebugServiceClient" to call the correct interceptors.

func RegisterDebugServiceHandlerFromEndpoint

func RegisterDebugServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterDebugServiceHandlerFromEndpoint is same as RegisterDebugServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterDebugServiceHandlerServer

func RegisterDebugServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DebugServiceServer) error

RegisterDebugServiceHandlerServer registers the http handlers for service DebugService to "mux". UnaryRPC :call DebugServiceServer 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 RegisterDebugServiceHandlerFromEndpoint instead.

func RegisterDebugServiceServer

func RegisterDebugServiceServer(s grpc.ServiceRegistrar, srv DebugServiceServer)

Types

type DebugServiceClient

type DebugServiceClient interface {
	// golang 性能监控
	PProf(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*httpbody.HttpBody, error)
	// golang 变量监控
	ExpVar(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*httpbody.HttpBody, error)
}

DebugServiceClient is the client API for DebugService 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.

type DebugServiceServer

type DebugServiceServer interface {
	// golang 性能监控
	PProf(context.Context, *emptypb.Empty) (*httpbody.HttpBody, error)
	// golang 变量监控
	ExpVar(context.Context, *emptypb.Empty) (*httpbody.HttpBody, error)
	// contains filtered or unexported methods
}

DebugServiceServer is the server API for DebugService service. All implementations must embed UnimplementedDebugServiceServer for forward compatibility

type UnimplementedDebugServiceServer

type UnimplementedDebugServiceServer struct {
}

UnimplementedDebugServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDebugServiceServer) ExpVar

func (UnimplementedDebugServiceServer) PProf

type UnsafeDebugServiceServer

type UnsafeDebugServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDebugServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DebugServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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