Documentation ¶
Index ¶
- Variables
- func RegisterLogServiceServer(s grpc.ServiceRegistrar, srv LogServiceServer)
- type LogItem
- func (*LogItem) Descriptor() ([]byte, []int)deprecated
- func (x *LogItem) GetFields() map[string]string
- func (x *LogItem) GetId() uint64
- func (x *LogItem) GetLevel() LogItem_Level
- func (x *LogItem) GetMessage() string
- func (*LogItem) ProtoMessage()
- func (x *LogItem) ProtoReflect() protoreflect.Message
- func (x *LogItem) Reset()
- func (x *LogItem) String() string
- type LogItem_Level
- func (LogItem_Level) Descriptor() protoreflect.EnumDescriptor
- func (x LogItem_Level) Enum() *LogItem_Level
- func (LogItem_Level) EnumDescriptor() ([]byte, []int)deprecated
- func (x LogItem_Level) Number() protoreflect.EnumNumber
- func (x LogItem_Level) String() string
- func (LogItem_Level) Type() protoreflect.EnumType
- type LogServiceClient
- type LogServiceServer
- type LogService_LogsClient
- type LogService_LogsServer
- type UnimplementedLogServiceServer
- type UnsafeLogServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( LogItem_Level_name = map[int32]string{ 0: "LEVEL_INFO", 1: "LEVEL_WARNING", 2: "LEVEL_ERROR", 3: "LEVEL_FATAL", -1: "LEVEL_DEBUG", -2: "LEVEL_TRACE", } LogItem_Level_value = map[string]int32{ "LEVEL_INFO": 0, "LEVEL_WARNING": 1, "LEVEL_ERROR": 2, "LEVEL_FATAL": 3, "LEVEL_DEBUG": -1, "LEVEL_TRACE": -2, } )
Enum value maps for LogItem_Level.
var File_log_proto protoreflect.FileDescriptor
var LogService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "mdigger.log.v1.LogService", HandlerType: (*LogServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Logs", Handler: _LogService_Logs_Handler, ServerStreams: true, }, }, Metadata: "log.proto", }
LogService_ServiceDesc is the grpc.ServiceDesc for LogService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterLogServiceServer ¶
func RegisterLogServiceServer(s grpc.ServiceRegistrar, srv LogServiceServer)
Types ¶
type LogItem ¶
type LogItem struct { // идентификатор записи лога (счётчик); // заполняется автоматически при отправке Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // уровень лога Level LogItem_Level `protobuf:"varint,2,opt,name=level,proto3,enum=mdigger.log.v1.LogItem_Level" json:"level,omitempty"` // сообщение Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // дополнительная информация Fields map[string]string `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
Описание элементов лога.
func (*LogItem) Descriptor
deprecated
func (*LogItem) GetLevel ¶
func (x *LogItem) GetLevel() LogItem_Level
func (*LogItem) GetMessage ¶
func (*LogItem) ProtoMessage ¶
func (*LogItem) ProtoMessage()
func (*LogItem) ProtoReflect ¶
func (x *LogItem) ProtoReflect() protoreflect.Message
type LogItem_Level ¶
type LogItem_Level int32
Определение уровня лога
const ( // информация LogItem_LEVEL_INFO LogItem_Level = 0 //protolint:disable:this ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH // предупреждение LogItem_LEVEL_WARNING LogItem_Level = 1 // ошибка LogItem_LEVEL_ERROR LogItem_Level = 2 // фатальная ошибка LogItem_LEVEL_FATAL LogItem_Level = 3 // отладочный уровень LogItem_LEVEL_DEBUG LogItem_Level = -1 // уровень трассировки LogItem_LEVEL_TRACE LogItem_Level = -2 )
func (LogItem_Level) Descriptor ¶
func (LogItem_Level) Descriptor() protoreflect.EnumDescriptor
func (LogItem_Level) Enum ¶
func (x LogItem_Level) Enum() *LogItem_Level
func (LogItem_Level) EnumDescriptor
deprecated
func (LogItem_Level) EnumDescriptor() ([]byte, []int)
Deprecated: Use LogItem_Level.Descriptor instead.
func (LogItem_Level) Number ¶
func (x LogItem_Level) Number() protoreflect.EnumNumber
func (LogItem_Level) String ¶
func (x LogItem_Level) String() string
func (LogItem_Level) Type ¶
func (LogItem_Level) Type() protoreflect.EnumType
type LogServiceClient ¶
type LogServiceClient interface { // возвращает поток с сообщениями лога звонков Logs(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (LogService_LogsClient, error) }
LogServiceClient is the client API for LogService 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 NewLogServiceClient ¶
func NewLogServiceClient(cc grpc.ClientConnInterface) LogServiceClient
type LogServiceServer ¶
type LogServiceServer interface { // возвращает поток с сообщениями лога звонков Logs(*emptypb.Empty, LogService_LogsServer) error // contains filtered or unexported methods }
LogServiceServer is the server API for LogService service. All implementations must embed UnimplementedLogServiceServer for forward compatibility
type LogService_LogsClient ¶
type LogService_LogsClient interface { Recv() (*LogItem, error) grpc.ClientStream }
type LogService_LogsServer ¶
type LogService_LogsServer interface { Send(*LogItem) error grpc.ServerStream }
type UnimplementedLogServiceServer ¶
type UnimplementedLogServiceServer struct { }
UnimplementedLogServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedLogServiceServer) Logs ¶
func (UnimplementedLogServiceServer) Logs(*emptypb.Empty, LogService_LogsServer) error
type UnsafeLogServiceServer ¶
type UnsafeLogServiceServer interface {
// contains filtered or unexported methods
}
UnsafeLogServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LogServiceServer will result in compilation errors.