Documentation ¶
Overview ¶
Code generated by protoc-gen-micro source: service.proto
Code generated by protoc-gen-micro source: service.proto
Index ¶
- Variables
- func NewLoggerEndpoints() []*micro_api.Endpoint
- func RegisterLoggerHandler(s micro_server.Server, sh LoggerHandler, opts ...micro_server.HandlerOption) error
- func RegisterLoggerServer(s *grpc.Server, srv LoggerServer)
- type Empty
- type Field
- func (*Field) Descriptor() ([]byte, []int)deprecated
- func (x *Field) GetDoubleVal() float64
- func (x *Field) GetFloatVal() float32
- func (x *Field) GetInt32Val() int32
- func (x *Field) GetInt64Val() int64
- func (x *Field) GetKey() string
- func (m *Field) GetVal() isField_Val
- func (*Field) ProtoMessage()
- func (x *Field) ProtoReflect() protoreflect.Message
- func (x *Field) Reset()
- func (x *Field) String() string
- type Field_DoubleVal
- type Field_FloatVal
- type Field_Int32Val
- type Field_Int64Val
- type LoggerClient
- type LoggerHandler
- type LoggerServer
- type LoggerService
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetFields() []*Field
- func (x *Message) GetFormat() string
- func (x *Message) GetLevel() int32
- func (x *Message) GetMsg() string
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type UnimplementedLoggerServer
Constants ¶
This section is empty.
Variables ¶
var File_service_proto protoreflect.FileDescriptor
Functions ¶
func NewLoggerEndpoints ¶
NewLoggerEndpoints provides api endpoints metdata for Logger service
func RegisterLoggerHandler ¶
func RegisterLoggerHandler(s micro_server.Server, sh LoggerHandler, opts ...micro_server.HandlerOption) error
RegisterLoggerHandler registers server handler
func RegisterLoggerServer ¶
func RegisterLoggerServer(s *grpc.Server, srv LoggerServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Field ¶
type Field struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // Types that are assignable to Val: // *Field_DoubleVal // *Field_FloatVal // *Field_Int32Val // *Field_Int64Val Val isField_Val `protobuf_oneof:"val"` // contains filtered or unexported fields }
func (*Field) Descriptor
deprecated
func (*Field) GetDoubleVal ¶
func (*Field) GetFloatVal ¶
func (*Field) GetInt32Val ¶
func (*Field) GetInt64Val ¶
func (*Field) ProtoMessage ¶
func (*Field) ProtoMessage()
func (*Field) ProtoReflect ¶
func (x *Field) ProtoReflect() protoreflect.Message
type Field_DoubleVal ¶
type Field_DoubleVal struct {
DoubleVal float64 `protobuf:"fixed64,2,opt,name=double_val,json=doubleVal,proto3,oneof"`
}
type Field_FloatVal ¶
type Field_FloatVal struct {
FloatVal float32 `protobuf:"fixed32,3,opt,name=float_val,json=floatVal,proto3,oneof"`
}
type Field_Int32Val ¶
type Field_Int32Val struct {
Int32Val int32 `protobuf:"varint,4,opt,name=int32_val,json=int32Val,proto3,oneof"`
}
type Field_Int64Val ¶
type Field_Int64Val struct {
Int64Val int64 `protobuf:"varint,5,opt,name=int64_val,json=int64Val,proto3,oneof"` //1
}
type LoggerClient ¶
type LoggerClient interface {
Log(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Empty, 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 ¶
LoggerHandler server handler
type LoggerServer ¶
type LoggerServer interface { Log(context.Context, *Message) (*Empty, 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 {
Log(context.Context, *Message, ...micro_client.CallOption) (*Empty, error)
}
LoggerService interface
func NewLoggerService ¶
func NewLoggerService(name string, c micro_client.Client) LoggerService
NewLoggerService create new service client
type Message ¶
type Message struct { Level int32 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"` Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"` Fields []*Field `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty"` // contains filtered or unexported fields }
func (*Message) Descriptor
deprecated
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type UnimplementedLoggerServer ¶
type UnimplementedLoggerServer struct { }
UnimplementedLoggerServer must be embedded to have forward compatible implementations.