monitor

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Level_name = map[int32]string{
		0: "WARN",
		1: "ERROR",
		2: "FATAL",
		3: "PANIC",
	}
	Level_value = map[string]int32{
		"WARN":  0,
		"ERROR": 1,
		"FATAL": 2,
		"PANIC": 3,
	}
)

Enum value maps for Level.

View Source
var File_monitor_proto protoreflect.FileDescriptor

Functions

func RegisterMonitorServer

func RegisterMonitorServer(s *grpc.Server, srv MonitorServer)

Types

type BlockUpdate

type BlockUpdate struct {
	Height       uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	Hash         []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
	Timestamp    int64  `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	TxAmount     uint32 `protobuf:"varint,4,opt,name=txAmount,proto3" json:"txAmount,omitempty"`
	BlockTimeSec uint32 `protobuf:"varint,5,opt,name=blockTimeSec,proto3" json:"blockTimeSec,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockUpdate) Descriptor deprecated

func (*BlockUpdate) Descriptor() ([]byte, []int)

Deprecated: Use BlockUpdate.ProtoReflect.Descriptor instead.

func (*BlockUpdate) GetBlockTimeSec

func (x *BlockUpdate) GetBlockTimeSec() uint32

func (*BlockUpdate) GetHash

func (x *BlockUpdate) GetHash() []byte

func (*BlockUpdate) GetHeight

func (x *BlockUpdate) GetHeight() uint64

func (*BlockUpdate) GetTimestamp

func (x *BlockUpdate) GetTimestamp() int64

func (*BlockUpdate) GetTxAmount

func (x *BlockUpdate) GetTxAmount() uint32

func (*BlockUpdate) ProtoMessage

func (*BlockUpdate) ProtoMessage()

func (*BlockUpdate) ProtoReflect added in v0.2.0

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

func (*BlockUpdate) Reset

func (x *BlockUpdate) Reset()

func (*BlockUpdate) String

func (x *BlockUpdate) String() string

type EmptyRequest

type EmptyRequest struct {
	// contains filtered or unexported fields
}

func (*EmptyRequest) Descriptor deprecated

func (*EmptyRequest) Descriptor() ([]byte, []int)

Deprecated: Use EmptyRequest.ProtoReflect.Descriptor instead.

func (*EmptyRequest) ProtoMessage

func (*EmptyRequest) ProtoMessage()

func (*EmptyRequest) ProtoReflect added in v0.2.0

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

func (*EmptyRequest) Reset

func (x *EmptyRequest) Reset()

func (*EmptyRequest) String

func (x *EmptyRequest) String() string

type EmptyResponse

type EmptyResponse struct {
	// contains filtered or unexported fields
}

func (*EmptyResponse) Descriptor deprecated

func (*EmptyResponse) Descriptor() ([]byte, []int)

Deprecated: Use EmptyResponse.ProtoReflect.Descriptor instead.

func (*EmptyResponse) ProtoMessage

func (*EmptyResponse) ProtoMessage()

func (*EmptyResponse) ProtoReflect added in v0.2.0

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

func (*EmptyResponse) Reset

func (x *EmptyResponse) Reset()

func (*EmptyResponse) String

func (x *EmptyResponse) String() string

type ErrorAlert

type ErrorAlert struct {
	Level           Level    `protobuf:"varint,1,opt,name=level,proto3,enum=monitor.Level" json:"level,omitempty"`
	Msg             string   `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	TimestampMillis string   `protobuf:"bytes,3,opt,name=timestampMillis,proto3" json:"timestampMillis,omitempty"` //Jan _2 15:04:05.000
	File            string   `protobuf:"bytes,4,opt,name=file,proto3" json:"file,omitempty"`
	Line            uint32   `protobuf:"varint,5,opt,name=line,proto3" json:"line,omitempty"`
	Function        string   `protobuf:"bytes,6,opt,name=function,proto3" json:"function,omitempty"`
	Fields          []*Field `protobuf:"bytes,7,rep,name=fields,proto3" json:"fields,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrorAlert) Descriptor deprecated

func (*ErrorAlert) Descriptor() ([]byte, []int)

Deprecated: Use ErrorAlert.ProtoReflect.Descriptor instead.

func (*ErrorAlert) GetFields

func (x *ErrorAlert) GetFields() []*Field

func (*ErrorAlert) GetFile

func (x *ErrorAlert) GetFile() string

func (*ErrorAlert) GetFunction

func (x *ErrorAlert) GetFunction() string

func (*ErrorAlert) GetLevel

func (x *ErrorAlert) GetLevel() Level

func (*ErrorAlert) GetLine

func (x *ErrorAlert) GetLine() uint32

func (*ErrorAlert) GetMsg

func (x *ErrorAlert) GetMsg() string

func (*ErrorAlert) GetTimestampMillis

func (x *ErrorAlert) GetTimestampMillis() string

func (*ErrorAlert) ProtoMessage

func (*ErrorAlert) ProtoMessage()

func (*ErrorAlert) ProtoReflect added in v0.2.0

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

func (*ErrorAlert) Reset

func (x *ErrorAlert) Reset()

func (*ErrorAlert) String

func (x *ErrorAlert) String() string

type Field

type Field struct {
	Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Field) Descriptor deprecated

func (*Field) Descriptor() ([]byte, []int)

Deprecated: Use Field.ProtoReflect.Descriptor instead.

func (*Field) GetField

func (x *Field) GetField() string

func (*Field) GetValue

func (x *Field) GetValue() string

func (*Field) ProtoMessage

func (*Field) ProtoMessage()

func (*Field) ProtoReflect added in v0.2.0

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

func (*Field) Reset

func (x *Field) Reset()

func (*Field) String

func (x *Field) String() string

type Level

type Level int32
const (
	Level_WARN  Level = 0
	Level_ERROR Level = 1
	Level_FATAL Level = 2
	Level_PANIC Level = 3
)

func (Level) Descriptor added in v0.2.0

func (Level) Descriptor() protoreflect.EnumDescriptor

func (Level) Enum added in v0.2.0

func (x Level) Enum() *Level

func (Level) EnumDescriptor deprecated

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

Deprecated: Use Level.Descriptor instead.

func (Level) Number added in v0.2.0

func (x Level) Number() protoreflect.EnumNumber

func (Level) String

func (x Level) String() string

func (Level) Type added in v0.2.0

func (Level) Type() protoreflect.EnumType

type MonitorClient

type MonitorClient interface {
	Hello(ctx context.Context, in *SemverRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
	Bye(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*EmptyResponse, error)
	NotifyBlock(ctx context.Context, in *BlockUpdate, opts ...grpc.CallOption) (*EmptyResponse, error)
	NotifySlowdown(ctx context.Context, in *SlowdownAlert, opts ...grpc.CallOption) (*EmptyResponse, error)
	NotifyError(ctx context.Context, in *ErrorAlert, opts ...grpc.CallOption) (*EmptyResponse, error)
}

MonitorClient is the client API for Monitor service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMonitorClient

func NewMonitorClient(cc grpc.ClientConnInterface) MonitorClient

type MonitorMock added in v0.2.0

type MonitorMock struct{}

func (*MonitorMock) Bye added in v0.2.0

func (*MonitorMock) Hello added in v0.2.0

func (m *MonitorMock) Hello(ctx context.Context, req *SemverRequest) (*EmptyResponse, error)

func (*MonitorMock) NotifyBlock added in v0.2.0

func (m *MonitorMock) NotifyBlock(ctx context.Context, req *BlockUpdate) (*EmptyResponse, error)

func (*MonitorMock) NotifyError added in v0.2.0

func (m *MonitorMock) NotifyError(ctx context.Context, req *ErrorAlert) (*EmptyResponse, error)

func (*MonitorMock) NotifySlowdown added in v0.2.0

func (m *MonitorMock) NotifySlowdown(ctx context.Context, req *SlowdownAlert) (*EmptyResponse, error)

type MonitorServer

MonitorServer is the server API for Monitor service.

type SemverRequest

type SemverRequest struct {
	Major uint32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"`
	Minor uint32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"`
	Patch uint32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"`
	// contains filtered or unexported fields
}

func (*SemverRequest) Descriptor deprecated

func (*SemverRequest) Descriptor() ([]byte, []int)

Deprecated: Use SemverRequest.ProtoReflect.Descriptor instead.

func (*SemverRequest) GetMajor

func (x *SemverRequest) GetMajor() uint32

func (*SemverRequest) GetMinor

func (x *SemverRequest) GetMinor() uint32

func (*SemverRequest) GetPatch

func (x *SemverRequest) GetPatch() uint32

func (*SemverRequest) ProtoMessage

func (*SemverRequest) ProtoMessage()

func (*SemverRequest) ProtoReflect added in v0.2.0

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

func (*SemverRequest) Reset

func (x *SemverRequest) Reset()

func (*SemverRequest) String

func (x *SemverRequest) String() string

type SlowdownAlert

type SlowdownAlert struct {
	TimeSinceLastBlockSec uint32 `protobuf:"varint,1,opt,name=timeSinceLastBlockSec,proto3" json:"timeSinceLastBlockSec,omitempty"`
	LastKnownHeight       uint64 `protobuf:"varint,2,opt,name=lastKnownHeight,proto3" json:"lastKnownHeight,omitempty"`
	LastKnownHash         []byte `protobuf:"bytes,3,opt,name=lastKnownHash,proto3" json:"lastKnownHash,omitempty"`
	// contains filtered or unexported fields
}

func (*SlowdownAlert) Descriptor deprecated

func (*SlowdownAlert) Descriptor() ([]byte, []int)

Deprecated: Use SlowdownAlert.ProtoReflect.Descriptor instead.

func (*SlowdownAlert) GetLastKnownHash

func (x *SlowdownAlert) GetLastKnownHash() []byte

func (*SlowdownAlert) GetLastKnownHeight

func (x *SlowdownAlert) GetLastKnownHeight() uint64

func (*SlowdownAlert) GetTimeSinceLastBlockSec

func (x *SlowdownAlert) GetTimeSinceLastBlockSec() uint32

func (*SlowdownAlert) ProtoMessage

func (*SlowdownAlert) ProtoMessage()

func (*SlowdownAlert) ProtoReflect added in v0.2.0

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

func (*SlowdownAlert) Reset

func (x *SlowdownAlert) Reset()

func (*SlowdownAlert) String

func (x *SlowdownAlert) String() string

type UnimplementedMonitorServer

type UnimplementedMonitorServer struct {
}

UnimplementedMonitorServer can be embedded to have forward compatible implementations.

func (*UnimplementedMonitorServer) Bye

func (*UnimplementedMonitorServer) Hello

func (*UnimplementedMonitorServer) NotifyBlock

func (*UnimplementedMonitorServer) NotifyError

func (*UnimplementedMonitorServer) NotifySlowdown

Jump to

Keyboard shortcuts

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