Documentation ¶
Index ¶
- Variables
- func RegisterMonitorServer(s *grpc.Server, srv MonitorServer)
- type BlockUpdate
- func (*BlockUpdate) Descriptor() ([]byte, []int)
- func (m *BlockUpdate) GetBlockTimeSec() uint32
- func (m *BlockUpdate) GetHash() []byte
- func (m *BlockUpdate) GetHeight() uint64
- func (m *BlockUpdate) GetTimestamp() int64
- func (m *BlockUpdate) GetTxAmount() uint32
- func (*BlockUpdate) ProtoMessage()
- func (m *BlockUpdate) Reset()
- func (m *BlockUpdate) String() string
- func (m *BlockUpdate) XXX_DiscardUnknown()
- func (m *BlockUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BlockUpdate) XXX_Merge(src proto.Message)
- func (m *BlockUpdate) XXX_Size() int
- func (m *BlockUpdate) XXX_Unmarshal(b []byte) error
- type EmptyRequest
- func (*EmptyRequest) Descriptor() ([]byte, []int)
- func (*EmptyRequest) ProtoMessage()
- func (m *EmptyRequest) Reset()
- func (m *EmptyRequest) String() string
- func (m *EmptyRequest) XXX_DiscardUnknown()
- func (m *EmptyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EmptyRequest) XXX_Merge(src proto.Message)
- func (m *EmptyRequest) XXX_Size() int
- func (m *EmptyRequest) XXX_Unmarshal(b []byte) error
- type EmptyResponse
- func (*EmptyResponse) Descriptor() ([]byte, []int)
- func (*EmptyResponse) ProtoMessage()
- func (m *EmptyResponse) Reset()
- func (m *EmptyResponse) String() string
- func (m *EmptyResponse) XXX_DiscardUnknown()
- func (m *EmptyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EmptyResponse) XXX_Merge(src proto.Message)
- func (m *EmptyResponse) XXX_Size() int
- func (m *EmptyResponse) XXX_Unmarshal(b []byte) error
- type ErrorAlert
- func (*ErrorAlert) Descriptor() ([]byte, []int)
- func (m *ErrorAlert) GetFields() []*Field
- func (m *ErrorAlert) GetFile() string
- func (m *ErrorAlert) GetFunction() string
- func (m *ErrorAlert) GetLevel() Level
- func (m *ErrorAlert) GetLine() uint32
- func (m *ErrorAlert) GetMsg() string
- func (m *ErrorAlert) GetTimestampMillis() string
- func (*ErrorAlert) ProtoMessage()
- func (m *ErrorAlert) Reset()
- func (m *ErrorAlert) String() string
- func (m *ErrorAlert) XXX_DiscardUnknown()
- func (m *ErrorAlert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ErrorAlert) XXX_Merge(src proto.Message)
- func (m *ErrorAlert) XXX_Size() int
- func (m *ErrorAlert) XXX_Unmarshal(b []byte) error
- type Field
- func (*Field) Descriptor() ([]byte, []int)
- func (m *Field) GetField() string
- func (m *Field) GetValue() string
- func (*Field) ProtoMessage()
- func (m *Field) Reset()
- func (m *Field) String() string
- func (m *Field) XXX_DiscardUnknown()
- func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Field) XXX_Merge(src proto.Message)
- func (m *Field) XXX_Size() int
- func (m *Field) XXX_Unmarshal(b []byte) error
- type Level
- type MonitorClient
- type MonitorMock
- func (m *MonitorMock) Bye(ctx context.Context, req *EmptyRequest) (*EmptyResponse, error)
- func (m *MonitorMock) Hello(ctx context.Context, req *SemverRequest) (*EmptyResponse, error)
- func (m *MonitorMock) NotifyBlock(ctx context.Context, req *BlockUpdate) (*EmptyResponse, error)
- func (m *MonitorMock) NotifyError(ctx context.Context, req *ErrorAlert) (*EmptyResponse, error)
- func (m *MonitorMock) NotifySlowdown(ctx context.Context, req *SlowdownAlert) (*EmptyResponse, error)
- type MonitorServer
- type SemverRequest
- func (*SemverRequest) Descriptor() ([]byte, []int)
- func (m *SemverRequest) GetMajor() uint32
- func (m *SemverRequest) GetMinor() uint32
- func (m *SemverRequest) GetPatch() uint32
- func (*SemverRequest) ProtoMessage()
- func (m *SemverRequest) Reset()
- func (m *SemverRequest) String() string
- func (m *SemverRequest) XXX_DiscardUnknown()
- func (m *SemverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SemverRequest) XXX_Merge(src proto.Message)
- func (m *SemverRequest) XXX_Size() int
- func (m *SemverRequest) XXX_Unmarshal(b []byte) error
- type SlowdownAlert
- func (*SlowdownAlert) Descriptor() ([]byte, []int)
- func (m *SlowdownAlert) GetLastKnownHash() []byte
- func (m *SlowdownAlert) GetLastKnownHeight() uint64
- func (m *SlowdownAlert) GetTimeSinceLastBlockSec() uint32
- func (*SlowdownAlert) ProtoMessage()
- func (m *SlowdownAlert) Reset()
- func (m *SlowdownAlert) String() string
- func (m *SlowdownAlert) XXX_DiscardUnknown()
- func (m *SlowdownAlert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SlowdownAlert) XXX_Merge(src proto.Message)
- func (m *SlowdownAlert) XXX_Size() int
- func (m *SlowdownAlert) XXX_Unmarshal(b []byte) error
- type UnimplementedMonitorServer
- func (*UnimplementedMonitorServer) Bye(ctx context.Context, req *EmptyRequest) (*EmptyResponse, error)
- func (*UnimplementedMonitorServer) Hello(ctx context.Context, req *SemverRequest) (*EmptyResponse, error)
- func (*UnimplementedMonitorServer) NotifyBlock(ctx context.Context, req *BlockUpdate) (*EmptyResponse, error)
- func (*UnimplementedMonitorServer) NotifyError(ctx context.Context, req *ErrorAlert) (*EmptyResponse, error)
- func (*UnimplementedMonitorServer) NotifySlowdown(ctx context.Context, req *SlowdownAlert) (*EmptyResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Level_name = map[int32]string{
0: "WARN",
1: "ERROR",
2: "FATAL",
3: "PANIC",
}
View Source
var Level_value = map[string]int32{
"WARN": 0,
"ERROR": 1,
"FATAL": 2,
"PANIC": 3,
}
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*BlockUpdate) Descriptor ¶
func (*BlockUpdate) Descriptor() ([]byte, []int)
func (*BlockUpdate) GetBlockTimeSec ¶
func (m *BlockUpdate) GetBlockTimeSec() uint32
func (*BlockUpdate) GetHash ¶
func (m *BlockUpdate) GetHash() []byte
func (*BlockUpdate) GetHeight ¶
func (m *BlockUpdate) GetHeight() uint64
func (*BlockUpdate) GetTimestamp ¶
func (m *BlockUpdate) GetTimestamp() int64
func (*BlockUpdate) GetTxAmount ¶
func (m *BlockUpdate) GetTxAmount() uint32
func (*BlockUpdate) ProtoMessage ¶
func (*BlockUpdate) ProtoMessage()
func (*BlockUpdate) Reset ¶
func (m *BlockUpdate) Reset()
func (*BlockUpdate) String ¶
func (m *BlockUpdate) String() string
func (*BlockUpdate) XXX_DiscardUnknown ¶
func (m *BlockUpdate) XXX_DiscardUnknown()
func (*BlockUpdate) XXX_Marshal ¶
func (m *BlockUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BlockUpdate) XXX_Merge ¶
func (m *BlockUpdate) XXX_Merge(src proto.Message)
func (*BlockUpdate) XXX_Size ¶
func (m *BlockUpdate) XXX_Size() int
func (*BlockUpdate) XXX_Unmarshal ¶
func (m *BlockUpdate) XXX_Unmarshal(b []byte) error
type EmptyRequest ¶
type EmptyRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*EmptyRequest) Descriptor ¶
func (*EmptyRequest) Descriptor() ([]byte, []int)
func (*EmptyRequest) ProtoMessage ¶
func (*EmptyRequest) ProtoMessage()
func (*EmptyRequest) Reset ¶
func (m *EmptyRequest) Reset()
func (*EmptyRequest) String ¶
func (m *EmptyRequest) String() string
func (*EmptyRequest) XXX_DiscardUnknown ¶
func (m *EmptyRequest) XXX_DiscardUnknown()
func (*EmptyRequest) XXX_Marshal ¶
func (m *EmptyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EmptyRequest) XXX_Merge ¶
func (m *EmptyRequest) XXX_Merge(src proto.Message)
func (*EmptyRequest) XXX_Size ¶
func (m *EmptyRequest) XXX_Size() int
func (*EmptyRequest) XXX_Unmarshal ¶
func (m *EmptyRequest) XXX_Unmarshal(b []byte) error
type EmptyResponse ¶
type EmptyResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*EmptyResponse) Descriptor ¶
func (*EmptyResponse) Descriptor() ([]byte, []int)
func (*EmptyResponse) ProtoMessage ¶
func (*EmptyResponse) ProtoMessage()
func (*EmptyResponse) Reset ¶
func (m *EmptyResponse) Reset()
func (*EmptyResponse) String ¶
func (m *EmptyResponse) String() string
func (*EmptyResponse) XXX_DiscardUnknown ¶
func (m *EmptyResponse) XXX_DiscardUnknown()
func (*EmptyResponse) XXX_Marshal ¶
func (m *EmptyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EmptyResponse) XXX_Merge ¶
func (m *EmptyResponse) XXX_Merge(src proto.Message)
func (*EmptyResponse) XXX_Size ¶
func (m *EmptyResponse) XXX_Size() int
func (*EmptyResponse) XXX_Unmarshal ¶
func (m *EmptyResponse) XXX_Unmarshal(b []byte) error
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"` 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ErrorAlert) Descriptor ¶
func (*ErrorAlert) Descriptor() ([]byte, []int)
func (*ErrorAlert) GetFields ¶
func (m *ErrorAlert) GetFields() []*Field
func (*ErrorAlert) GetFile ¶
func (m *ErrorAlert) GetFile() string
func (*ErrorAlert) GetFunction ¶
func (m *ErrorAlert) GetFunction() string
func (*ErrorAlert) GetLevel ¶
func (m *ErrorAlert) GetLevel() Level
func (*ErrorAlert) GetLine ¶
func (m *ErrorAlert) GetLine() uint32
func (*ErrorAlert) GetMsg ¶
func (m *ErrorAlert) GetMsg() string
func (*ErrorAlert) GetTimestampMillis ¶
func (m *ErrorAlert) GetTimestampMillis() string
func (*ErrorAlert) ProtoMessage ¶
func (*ErrorAlert) ProtoMessage()
func (*ErrorAlert) Reset ¶
func (m *ErrorAlert) Reset()
func (*ErrorAlert) String ¶
func (m *ErrorAlert) String() string
func (*ErrorAlert) XXX_DiscardUnknown ¶
func (m *ErrorAlert) XXX_DiscardUnknown()
func (*ErrorAlert) XXX_Marshal ¶
func (m *ErrorAlert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ErrorAlert) XXX_Merge ¶
func (m *ErrorAlert) XXX_Merge(src proto.Message)
func (*ErrorAlert) XXX_Size ¶
func (m *ErrorAlert) XXX_Size() int
func (*ErrorAlert) XXX_Unmarshal ¶
func (m *ErrorAlert) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Field) Descriptor ¶
func (*Field) ProtoMessage ¶
func (*Field) ProtoMessage()
func (*Field) XXX_DiscardUnknown ¶
func (m *Field) XXX_DiscardUnknown()
func (*Field) XXX_Marshal ¶
func (*Field) XXX_Unmarshal ¶
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.ClientConn) MonitorClient
type MonitorMock ¶ added in v0.2.0
type MonitorMock struct{}
func (*MonitorMock) Bye ¶ added in v0.2.0
func (m *MonitorMock) Bye(ctx context.Context, req *EmptyRequest) (*EmptyResponse, error)
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 ¶
type MonitorServer interface { Hello(context.Context, *SemverRequest) (*EmptyResponse, error) Bye(context.Context, *EmptyRequest) (*EmptyResponse, error) NotifyBlock(context.Context, *BlockUpdate) (*EmptyResponse, error) NotifySlowdown(context.Context, *SlowdownAlert) (*EmptyResponse, error) NotifyError(context.Context, *ErrorAlert) (*EmptyResponse, error) }
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SemverRequest) Descriptor ¶
func (*SemverRequest) Descriptor() ([]byte, []int)
func (*SemverRequest) GetMajor ¶
func (m *SemverRequest) GetMajor() uint32
func (*SemverRequest) GetMinor ¶
func (m *SemverRequest) GetMinor() uint32
func (*SemverRequest) GetPatch ¶
func (m *SemverRequest) GetPatch() uint32
func (*SemverRequest) ProtoMessage ¶
func (*SemverRequest) ProtoMessage()
func (*SemverRequest) Reset ¶
func (m *SemverRequest) Reset()
func (*SemverRequest) String ¶
func (m *SemverRequest) String() string
func (*SemverRequest) XXX_DiscardUnknown ¶
func (m *SemverRequest) XXX_DiscardUnknown()
func (*SemverRequest) XXX_Marshal ¶
func (m *SemverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SemverRequest) XXX_Merge ¶
func (m *SemverRequest) XXX_Merge(src proto.Message)
func (*SemverRequest) XXX_Size ¶
func (m *SemverRequest) XXX_Size() int
func (*SemverRequest) XXX_Unmarshal ¶
func (m *SemverRequest) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SlowdownAlert) Descriptor ¶
func (*SlowdownAlert) Descriptor() ([]byte, []int)
func (*SlowdownAlert) GetLastKnownHash ¶
func (m *SlowdownAlert) GetLastKnownHash() []byte
func (*SlowdownAlert) GetLastKnownHeight ¶
func (m *SlowdownAlert) GetLastKnownHeight() uint64
func (*SlowdownAlert) GetTimeSinceLastBlockSec ¶
func (m *SlowdownAlert) GetTimeSinceLastBlockSec() uint32
func (*SlowdownAlert) ProtoMessage ¶
func (*SlowdownAlert) ProtoMessage()
func (*SlowdownAlert) Reset ¶
func (m *SlowdownAlert) Reset()
func (*SlowdownAlert) String ¶
func (m *SlowdownAlert) String() string
func (*SlowdownAlert) XXX_DiscardUnknown ¶
func (m *SlowdownAlert) XXX_DiscardUnknown()
func (*SlowdownAlert) XXX_Marshal ¶
func (m *SlowdownAlert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SlowdownAlert) XXX_Merge ¶
func (m *SlowdownAlert) XXX_Merge(src proto.Message)
func (*SlowdownAlert) XXX_Size ¶
func (m *SlowdownAlert) XXX_Size() int
func (*SlowdownAlert) XXX_Unmarshal ¶
func (m *SlowdownAlert) XXX_Unmarshal(b []byte) error
type UnimplementedMonitorServer ¶
type UnimplementedMonitorServer struct { }
UnimplementedMonitorServer can be embedded to have forward compatible implementations.
func (*UnimplementedMonitorServer) Bye ¶
func (*UnimplementedMonitorServer) Bye(ctx context.Context, req *EmptyRequest) (*EmptyResponse, error)
func (*UnimplementedMonitorServer) Hello ¶
func (*UnimplementedMonitorServer) Hello(ctx context.Context, req *SemverRequest) (*EmptyResponse, error)
func (*UnimplementedMonitorServer) NotifyBlock ¶
func (*UnimplementedMonitorServer) NotifyBlock(ctx context.Context, req *BlockUpdate) (*EmptyResponse, error)
func (*UnimplementedMonitorServer) NotifyError ¶
func (*UnimplementedMonitorServer) NotifyError(ctx context.Context, req *ErrorAlert) (*EmptyResponse, error)
func (*UnimplementedMonitorServer) NotifySlowdown ¶
func (*UnimplementedMonitorServer) NotifySlowdown(ctx context.Context, req *SlowdownAlert) (*EmptyResponse, error)
Click to show internal directories.
Click to hide internal directories.