proto

package module
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_log_proto protoreflect.FileDescriptor
View Source
var Log_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Log",
	HandlerType: (*LogServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Info",
			Handler:    _Log_Info_Handler,
		},
		{
			MethodName: "Warn",
			Handler:    _Log_Warn_Handler,
		},
		{
			MethodName: "Error",
			Handler:    _Log_Error_Handler,
		},
		{
			MethodName: "Fatal",
			Handler:    _Log_Fatal_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/log.proto",
}

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

Functions

func RegisterLogServer

func RegisterLogServer(s grpc.ServiceRegistrar, srv LogServer)

Types

type LogClient

type LogClient interface {
	Info(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*Reply, error)
	Warn(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*Reply, error)
	Error(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*Reply, error)
	Fatal(ctx context.Context, in *LogRequest, opts ...grpc.CallOption) (*Reply, error)
}

LogClient is the client API for Log 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 NewLogClient

func NewLogClient(cc grpc.ClientConnInterface) LogClient

type LogRequest

type LogRequest struct {
	Appid string `protobuf:"bytes,1,opt,name=appid,proto3" json:"appid,omitempty"`
	// string stacktrace = 3;
	Logger  string `protobuf:"bytes,4,opt,name=logger,proto3" json:"logger,omitempty"`
	Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	// string exception = 6;
	RequestId     string `protobuf:"bytes,7,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
	EsIndexPrefix string `protobuf:"bytes,8,opt,name=es_index_prefix,json=esIndexPrefix,proto3" json:"es_index_prefix,omitempty"`
	// contains filtered or unexported fields
}

func (*LogRequest) Descriptor deprecated

func (*LogRequest) Descriptor() ([]byte, []int)

Deprecated: Use LogRequest.ProtoReflect.Descriptor instead.

func (*LogRequest) GetAppid

func (x *LogRequest) GetAppid() string

func (*LogRequest) GetEsIndexPrefix

func (x *LogRequest) GetEsIndexPrefix() string

func (*LogRequest) GetLogger

func (x *LogRequest) GetLogger() string

func (*LogRequest) GetMessage

func (x *LogRequest) GetMessage() string

func (*LogRequest) GetRequestId

func (x *LogRequest) GetRequestId() string

func (*LogRequest) ProtoMessage

func (*LogRequest) ProtoMessage()

func (*LogRequest) ProtoReflect

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

func (*LogRequest) Reset

func (x *LogRequest) Reset()

func (*LogRequest) String

func (x *LogRequest) String() string

type LogServer

type LogServer interface {
	Info(context.Context, *LogRequest) (*Reply, error)
	Warn(context.Context, *LogRequest) (*Reply, error)
	Error(context.Context, *LogRequest) (*Reply, error)
	Fatal(context.Context, *LogRequest) (*Reply, error)
}

LogServer is the server API for Log service. All implementations should embed UnimplementedLogServer for forward compatibility

type Reply

type Reply struct {
	Code int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Reply) Descriptor deprecated

func (*Reply) Descriptor() ([]byte, []int)

Deprecated: Use Reply.ProtoReflect.Descriptor instead.

func (*Reply) GetCode

func (x *Reply) GetCode() int32

func (*Reply) GetData

func (x *Reply) GetData() string

func (*Reply) GetMsg

func (x *Reply) GetMsg() string

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

func (*Reply) ProtoReflect

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

func (*Reply) Reset

func (x *Reply) Reset()

func (*Reply) String

func (x *Reply) String() string

type UnimplementedLogServer

type UnimplementedLogServer struct {
}

UnimplementedLogServer should be embedded to have forward compatible implementations.

func (UnimplementedLogServer) Error

func (UnimplementedLogServer) Fatal

func (UnimplementedLogServer) Info

func (UnimplementedLogServer) Warn

type UnsafeLogServer

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

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

Jump to

Keyboard shortcuts

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