Documentation ¶
Index ¶
- Constants
- Variables
- func NewLoggerEndpoints() []*api.Endpoint
- func RegisterLoggerHandler(s server.Server, hdlr LoggerHandler, opts ...server.HandlerOption) error
- func RegisterLoggerServer(s grpc.ServiceRegistrar, srv LoggerServer)
- type LoggerClient
- type LoggerHandler
- type LoggerServer
- type LoggerService
- type UnimplementedLoggerServer
- type UnsafeLoggerServer
- type WriteRequest
- func (*WriteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WriteRequest) GetData() []byte
- func (x *WriteRequest) GetServiceName() string
- func (*WriteRequest) ProtoMessage()
- func (x *WriteRequest) ProtoReflect() protoreflect.Message
- func (x *WriteRequest) Reset()
- func (x *WriteRequest) String() string
- type WriteResponse
Constants ¶
const (
Logger_Write_FullMethodName = "/Logger/Write"
)
Variables ¶
var File_logger_logger_proto protoreflect.FileDescriptor
var Logger_ServiceDesc = grpc.ServiceDesc{ ServiceName: "Logger", HandlerType: (*LoggerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Write", Handler: _Logger_Write_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "logger/logger.proto", }
Logger_ServiceDesc is the grpc.ServiceDesc for Logger service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func NewLoggerEndpoints ¶
func RegisterLoggerHandler ¶
func RegisterLoggerHandler(s server.Server, hdlr LoggerHandler, opts ...server.HandlerOption) error
func RegisterLoggerServer ¶
func RegisterLoggerServer(s grpc.ServiceRegistrar, srv LoggerServer)
Types ¶
type LoggerClient ¶
type LoggerClient interface {
Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error)
}
LoggerClient is the client API for Logger 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 NewLoggerClient ¶
func NewLoggerClient(cc grpc.ClientConnInterface) LoggerClient
type LoggerHandler ¶
type LoggerHandler interface {
Write(context.Context, *WriteRequest, *WriteResponse) error
}
type LoggerServer ¶
type LoggerServer interface { Write(context.Context, *WriteRequest) (*WriteResponse, error) // contains filtered or unexported methods }
LoggerServer is the server API for Logger service. All implementations must embed UnimplementedLoggerServer for forward compatibility
type LoggerService ¶
type LoggerService interface {
Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error)
}
func NewLoggerService ¶
func NewLoggerService(name string, c client.Client) LoggerService
type UnimplementedLoggerServer ¶
type UnimplementedLoggerServer struct { }
UnimplementedLoggerServer must be embedded to have forward compatible implementations.
func (UnimplementedLoggerServer) Write ¶
func (UnimplementedLoggerServer) Write(context.Context, *WriteRequest) (*WriteResponse, error)
type UnsafeLoggerServer ¶
type UnsafeLoggerServer interface {
// contains filtered or unexported methods
}
UnsafeLoggerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LoggerServer will result in compilation errors.
type WriteRequest ¶
type WriteRequest struct { ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*WriteRequest) Descriptor
deprecated
func (*WriteRequest) Descriptor() ([]byte, []int)
Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.
func (*WriteRequest) GetData ¶
func (x *WriteRequest) GetData() []byte
func (*WriteRequest) GetServiceName ¶
func (x *WriteRequest) GetServiceName() string
func (*WriteRequest) ProtoMessage ¶
func (*WriteRequest) ProtoMessage()
func (*WriteRequest) ProtoReflect ¶
func (x *WriteRequest) ProtoReflect() protoreflect.Message
func (*WriteRequest) Reset ¶
func (x *WriteRequest) Reset()
func (*WriteRequest) String ¶
func (x *WriteRequest) String() string
type WriteResponse ¶
type WriteResponse struct { N int32 `protobuf:"varint,1,opt,name=n,proto3" json:"n,omitempty"` // contains filtered or unexported fields }
func (*WriteResponse) Descriptor
deprecated
func (*WriteResponse) Descriptor() ([]byte, []int)
Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead.
func (*WriteResponse) GetN ¶
func (x *WriteResponse) GetN() int32
func (*WriteResponse) ProtoMessage ¶
func (*WriteResponse) ProtoMessage()
func (*WriteResponse) ProtoReflect ¶
func (x *WriteResponse) ProtoReflect() protoreflect.Message
func (*WriteResponse) Reset ¶
func (x *WriteResponse) Reset()
func (*WriteResponse) String ¶
func (x *WriteResponse) String() string