Documentation ¶
Index ¶
- Variables
- func RegisterMonitorServiceServer(s *grpc.Server, srv MonitorServiceServer)
- type Config
- type LogLevel
- type LogWriteResponse
- func (*LogWriteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LogWriteResponse) GetSuccess() bool
- func (x *LogWriteResponse) GetTimestamp() int64
- func (*LogWriteResponse) ProtoMessage()
- func (x *LogWriteResponse) ProtoReflect() protoreflect.Message
- func (x *LogWriteResponse) Reset()
- func (x *LogWriteResponse) String() string
- type MessageLog
- func (*MessageLog) Descriptor() ([]byte, []int)deprecated
- func (x *MessageLog) GetEntry() *proto1.RegistryEntry
- func (x *MessageLog) GetLevel() LogLevel
- func (x *MessageLog) GetMessage() string
- func (x *MessageLog) GetTimestamps() int64
- func (*MessageLog) ProtoMessage()
- func (x *MessageLog) ProtoReflect() protoreflect.Message
- func (x *MessageLog) Reset()
- func (x *MessageLog) String() string
- type MessageLogReadResponse
- func (*MessageLogReadResponse) Descriptor() ([]byte, []int)deprecated
- func (x *MessageLogReadResponse) GetLogs() []*MessageLog
- func (x *MessageLogReadResponse) GetServer() string
- func (*MessageLogReadResponse) ProtoMessage()
- func (x *MessageLogReadResponse) ProtoReflect() protoreflect.Message
- func (x *MessageLogReadResponse) Reset()
- func (x *MessageLogReadResponse) String() string
- type MonitorServiceClient
- type MonitorServiceServer
- type UnimplementedMonitorServiceServer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LogLevel_name = map[int32]string{ 0: "DISCARD", 1: "KEEP_WEEK", } LogLevel_value = map[string]int32{ "DISCARD": 0, "KEEP_WEEK": 1, } )
Enum value maps for LogLevel.
View Source
var File_monitor_proto protoreflect.FileDescriptor
Functions ¶
func RegisterMonitorServiceServer ¶
func RegisterMonitorServiceServer(s *grpc.Server, srv MonitorServiceServer)
Types ¶
type Config ¶
type Config struct { Logs []*MessageLog `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetLogs ¶
func (x *Config) GetLogs() []*MessageLog
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type LogLevel ¶
type LogLevel int32
func (LogLevel) Descriptor ¶
func (LogLevel) Descriptor() protoreflect.EnumDescriptor
func (LogLevel) EnumDescriptor
deprecated
func (LogLevel) Number ¶
func (x LogLevel) Number() protoreflect.EnumNumber
func (LogLevel) Type ¶
func (LogLevel) Type() protoreflect.EnumType
type LogWriteResponse ¶
type LogWriteResponse struct { // Whether the log was written Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` //The timestamp at which the log was written Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*LogWriteResponse) Descriptor
deprecated
func (*LogWriteResponse) Descriptor() ([]byte, []int)
Deprecated: Use LogWriteResponse.ProtoReflect.Descriptor instead.
func (*LogWriteResponse) GetSuccess ¶
func (x *LogWriteResponse) GetSuccess() bool
func (*LogWriteResponse) GetTimestamp ¶
func (x *LogWriteResponse) GetTimestamp() int64
func (*LogWriteResponse) ProtoMessage ¶
func (*LogWriteResponse) ProtoMessage()
func (*LogWriteResponse) ProtoReflect ¶
func (x *LogWriteResponse) ProtoReflect() protoreflect.Message
func (*LogWriteResponse) Reset ¶
func (x *LogWriteResponse) Reset()
func (*LogWriteResponse) String ¶
func (x *LogWriteResponse) String() string
type MessageLog ¶
type MessageLog struct { // The entry writing the log Entry *proto1.RegistryEntry `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"` // The message to be written to the logs Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // The timestamp of the written log Timestamps int64 `protobuf:"varint,3,opt,name=timestamps,proto3" json:"timestamps,omitempty"` // The level of this log Level LogLevel `protobuf:"varint,4,opt,name=level,proto3,enum=monitor.LogLevel" json:"level,omitempty"` // contains filtered or unexported fields }
func (*MessageLog) Descriptor
deprecated
func (*MessageLog) Descriptor() ([]byte, []int)
Deprecated: Use MessageLog.ProtoReflect.Descriptor instead.
func (*MessageLog) GetEntry ¶
func (x *MessageLog) GetEntry() *proto1.RegistryEntry
func (*MessageLog) GetLevel ¶
func (x *MessageLog) GetLevel() LogLevel
func (*MessageLog) GetMessage ¶
func (x *MessageLog) GetMessage() string
func (*MessageLog) GetTimestamps ¶
func (x *MessageLog) GetTimestamps() int64
func (*MessageLog) ProtoMessage ¶
func (*MessageLog) ProtoMessage()
func (*MessageLog) ProtoReflect ¶
func (x *MessageLog) ProtoReflect() protoreflect.Message
func (*MessageLog) Reset ¶
func (x *MessageLog) Reset()
func (*MessageLog) String ¶
func (x *MessageLog) String() string
type MessageLogReadResponse ¶
type MessageLogReadResponse struct { // The response from the logs Logs []*MessageLog `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"` Server string `protobuf:"bytes,2,opt,name=server,proto3" json:"server,omitempty"` // contains filtered or unexported fields }
func (*MessageLogReadResponse) Descriptor
deprecated
func (*MessageLogReadResponse) Descriptor() ([]byte, []int)
Deprecated: Use MessageLogReadResponse.ProtoReflect.Descriptor instead.
func (*MessageLogReadResponse) GetLogs ¶
func (x *MessageLogReadResponse) GetLogs() []*MessageLog
func (*MessageLogReadResponse) GetServer ¶
func (x *MessageLogReadResponse) GetServer() string
func (*MessageLogReadResponse) ProtoMessage ¶
func (*MessageLogReadResponse) ProtoMessage()
func (*MessageLogReadResponse) ProtoReflect ¶
func (x *MessageLogReadResponse) ProtoReflect() protoreflect.Message
func (*MessageLogReadResponse) Reset ¶
func (x *MessageLogReadResponse) Reset()
func (*MessageLogReadResponse) String ¶
func (x *MessageLogReadResponse) String() string
type MonitorServiceClient ¶
type MonitorServiceClient interface { WriteMessageLog(ctx context.Context, in *MessageLog, opts ...grpc.CallOption) (*LogWriteResponse, error) ReadMessageLogs(ctx context.Context, in *proto1.RegistryEntry, opts ...grpc.CallOption) (*MessageLogReadResponse, error) }
MonitorServiceClient is the client API for MonitorService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMonitorServiceClient ¶
func NewMonitorServiceClient(cc grpc.ClientConnInterface) MonitorServiceClient
type MonitorServiceServer ¶
type MonitorServiceServer interface { WriteMessageLog(context.Context, *MessageLog) (*LogWriteResponse, error) ReadMessageLogs(context.Context, *proto1.RegistryEntry) (*MessageLogReadResponse, error) }
MonitorServiceServer is the server API for MonitorService service.
type UnimplementedMonitorServiceServer ¶
type UnimplementedMonitorServiceServer struct { }
UnimplementedMonitorServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedMonitorServiceServer) ReadMessageLogs ¶
func (*UnimplementedMonitorServiceServer) ReadMessageLogs(context.Context, *proto1.RegistryEntry) (*MessageLogReadResponse, error)
func (*UnimplementedMonitorServiceServer) WriteMessageLog ¶
func (*UnimplementedMonitorServiceServer) WriteMessageLog(context.Context, *MessageLog) (*LogWriteResponse, error)
Click to show internal directories.
Click to hide internal directories.