monitor

package
v0.0.0-...-c10877c Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetLogs

func (x *Config) GetLogs() []*MessageLog

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type LogLevel

type LogLevel int32
const (
	LogLevel_DISCARD   LogLevel = 0
	LogLevel_KEEP_WEEK LogLevel = 1
)

func (LogLevel) Descriptor

func (LogLevel) Descriptor() protoreflect.EnumDescriptor

func (LogLevel) Enum

func (x LogLevel) Enum() *LogLevel

func (LogLevel) EnumDescriptor deprecated

func (LogLevel) EnumDescriptor() ([]byte, []int)

Deprecated: Use LogLevel.Descriptor instead.

func (LogLevel) Number

func (x LogLevel) Number() protoreflect.EnumNumber

func (LogLevel) String

func (x LogLevel) String() string

func (LogLevel) Type

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.

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) WriteMessageLog

Jump to

Keyboard shortcuts

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