diagnosticspb

package
v0.0.0-...-3b3056d Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthDiagnosticspb        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDiagnosticspb          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDiagnosticspb = fmt.Errorf("proto: unexpected end of group")
)
View Source
var LogLevel_name = map[int32]string{
	0: "UNKNOWN",
	1: "Debug",
	2: "Info",
	3: "Warn",
	4: "Trace",
	5: "Critical",
	6: "Error",
}
View Source
var LogLevel_value = map[string]int32{
	"UNKNOWN":  0,
	"Debug":    1,
	"Info":     2,
	"Warn":     3,
	"Trace":    4,
	"Critical": 5,
	"Error":    6,
}
View Source
var SearchLogRequest_Target_name = map[int32]string{
	0: "Normal",
	1: "Slow",
}
View Source
var SearchLogRequest_Target_value = map[string]int32{
	"Normal": 0,
	"Slow":   1,
}
View Source
var ServerInfoType_name = map[int32]string{
	0: "All",
	1: "HardwareInfo",
	2: "SystemInfo",
	3: "LoadInfo",
}
View Source
var ServerInfoType_value = map[string]int32{
	"All":          0,
	"HardwareInfo": 1,
	"SystemInfo":   2,
	"LoadInfo":     3,
}

Functions

func RegisterDiagnosticsServer

func RegisterDiagnosticsServer(s *grpc.Server, srv DiagnosticsServer)

Types

type DiagnosticsClient

type DiagnosticsClient interface {
	// Searchs log in the target node
	SearchLog(ctx context.Context, in *SearchLogRequest, opts ...grpc.CallOption) (Diagnostics_SearchLogClient, error)
	// Retrieves server info in the target node
	ServerInfo(ctx context.Context, in *ServerInfoRequest, opts ...grpc.CallOption) (*ServerInfoResponse, error)
}

DiagnosticsClient is the client API for Diagnostics service.

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

func NewDiagnosticsClient

func NewDiagnosticsClient(cc *grpc.ClientConn) DiagnosticsClient

type DiagnosticsServer

type DiagnosticsServer interface {
	// Searchs log in the target node
	SearchLog(*SearchLogRequest, Diagnostics_SearchLogServer) error
	// Retrieves server info in the target node
	ServerInfo(context.Context, *ServerInfoRequest) (*ServerInfoResponse, error)
}

DiagnosticsServer is the server API for Diagnostics service.

type Diagnostics_SearchLogClient

type Diagnostics_SearchLogClient interface {
	Recv() (*SearchLogResponse, error)
	grpc.ClientStream
}

type Diagnostics_SearchLogServer

type Diagnostics_SearchLogServer interface {
	Send(*SearchLogResponse) error
	grpc.ServerStream
}

type LogLevel

type LogLevel int32
const (
	LogLevel_UNKNOWN  LogLevel = 0
	LogLevel_Debug    LogLevel = 1
	LogLevel_Info     LogLevel = 2
	LogLevel_Warn     LogLevel = 3
	LogLevel_Trace    LogLevel = 4
	LogLevel_Critical LogLevel = 5
	LogLevel_Error    LogLevel = 6
)

func (LogLevel) EnumDescriptor

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

func (LogLevel) String

func (x LogLevel) String() string

type LogMessage

type LogMessage struct {
	Time                 int64    `protobuf:"varint,1,opt,name=time,proto3" json:"time,omitempty"`
	Level                LogLevel `protobuf:"varint,2,opt,name=level,proto3,enum=diagnosticspb.LogLevel" json:"level,omitempty"`
	Message              string   `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*LogMessage) Descriptor

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

func (*LogMessage) GetLevel

func (m *LogMessage) GetLevel() LogLevel

func (*LogMessage) GetMessage

func (m *LogMessage) GetMessage() string

func (*LogMessage) GetTime

func (m *LogMessage) GetTime() int64

func (*LogMessage) Marshal

func (m *LogMessage) Marshal() (dAtA []byte, err error)

func (*LogMessage) MarshalTo

func (m *LogMessage) MarshalTo(dAtA []byte) (int, error)

func (*LogMessage) MarshalToSizedBuffer

func (m *LogMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogMessage) ProtoMessage

func (*LogMessage) ProtoMessage()

func (*LogMessage) Reset

func (m *LogMessage) Reset()

func (*LogMessage) Size

func (m *LogMessage) Size() (n int)

func (*LogMessage) String

func (m *LogMessage) String() string

func (*LogMessage) Unmarshal

func (m *LogMessage) Unmarshal(dAtA []byte) error

func (*LogMessage) XXX_DiscardUnknown

func (m *LogMessage) XXX_DiscardUnknown()

func (*LogMessage) XXX_Marshal

func (m *LogMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogMessage) XXX_Merge

func (m *LogMessage) XXX_Merge(src proto.Message)

func (*LogMessage) XXX_Size

func (m *LogMessage) XXX_Size() int

func (*LogMessage) XXX_Unmarshal

func (m *LogMessage) XXX_Unmarshal(b []byte) error

type SearchLogRequest

type SearchLogRequest struct {
	StartTime int64      `protobuf:"varint,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	EndTime   int64      `protobuf:"varint,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
	Levels    []LogLevel `protobuf:"varint,3,rep,packed,name=levels,proto3,enum=diagnosticspb.LogLevel" json:"levels,omitempty"`
	// We use a string array to represent multiple CNF pattern sceniaor like:
	// SELECT * FROM t WHERE c LIKE '%s%' and c REGEXP '.*a.*' because
	// Golang and Rust don't support perl-like (?=re1)(?=re2)
	Patterns             []string                `protobuf:"bytes,4,rep,name=patterns,proto3" json:"patterns,omitempty"`
	Target               SearchLogRequest_Target `protobuf:"varint,5,opt,name=target,proto3,enum=diagnosticspb.SearchLogRequest_Target" json:"target,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*SearchLogRequest) Descriptor

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

func (*SearchLogRequest) GetEndTime

func (m *SearchLogRequest) GetEndTime() int64

func (*SearchLogRequest) GetLevels

func (m *SearchLogRequest) GetLevels() []LogLevel

func (*SearchLogRequest) GetPatterns

func (m *SearchLogRequest) GetPatterns() []string

func (*SearchLogRequest) GetStartTime

func (m *SearchLogRequest) GetStartTime() int64

func (*SearchLogRequest) GetTarget

func (*SearchLogRequest) Marshal

func (m *SearchLogRequest) Marshal() (dAtA []byte, err error)

func (*SearchLogRequest) MarshalTo

func (m *SearchLogRequest) MarshalTo(dAtA []byte) (int, error)

func (*SearchLogRequest) MarshalToSizedBuffer

func (m *SearchLogRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SearchLogRequest) ProtoMessage

func (*SearchLogRequest) ProtoMessage()

func (*SearchLogRequest) Reset

func (m *SearchLogRequest) Reset()

func (*SearchLogRequest) Size

func (m *SearchLogRequest) Size() (n int)

func (*SearchLogRequest) String

func (m *SearchLogRequest) String() string

func (*SearchLogRequest) Unmarshal

func (m *SearchLogRequest) Unmarshal(dAtA []byte) error

func (*SearchLogRequest) XXX_DiscardUnknown

func (m *SearchLogRequest) XXX_DiscardUnknown()

func (*SearchLogRequest) XXX_Marshal

func (m *SearchLogRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SearchLogRequest) XXX_Merge

func (m *SearchLogRequest) XXX_Merge(src proto.Message)

func (*SearchLogRequest) XXX_Size

func (m *SearchLogRequest) XXX_Size() int

func (*SearchLogRequest) XXX_Unmarshal

func (m *SearchLogRequest) XXX_Unmarshal(b []byte) error

type SearchLogRequest_Target

type SearchLogRequest_Target int32
const (
	SearchLogRequest_Normal SearchLogRequest_Target = 0
	SearchLogRequest_Slow   SearchLogRequest_Target = 1
)

func (SearchLogRequest_Target) EnumDescriptor

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

func (SearchLogRequest_Target) String

func (x SearchLogRequest_Target) String() string

type SearchLogResponse

type SearchLogResponse struct {
	Messages             []*LogMessage `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*SearchLogResponse) Descriptor

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

func (*SearchLogResponse) GetMessages

func (m *SearchLogResponse) GetMessages() []*LogMessage

func (*SearchLogResponse) Marshal

func (m *SearchLogResponse) Marshal() (dAtA []byte, err error)

func (*SearchLogResponse) MarshalTo

func (m *SearchLogResponse) MarshalTo(dAtA []byte) (int, error)

func (*SearchLogResponse) MarshalToSizedBuffer

func (m *SearchLogResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SearchLogResponse) ProtoMessage

func (*SearchLogResponse) ProtoMessage()

func (*SearchLogResponse) Reset

func (m *SearchLogResponse) Reset()

func (*SearchLogResponse) Size

func (m *SearchLogResponse) Size() (n int)

func (*SearchLogResponse) String

func (m *SearchLogResponse) String() string

func (*SearchLogResponse) Unmarshal

func (m *SearchLogResponse) Unmarshal(dAtA []byte) error

func (*SearchLogResponse) XXX_DiscardUnknown

func (m *SearchLogResponse) XXX_DiscardUnknown()

func (*SearchLogResponse) XXX_Marshal

func (m *SearchLogResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SearchLogResponse) XXX_Merge

func (m *SearchLogResponse) XXX_Merge(src proto.Message)

func (*SearchLogResponse) XXX_Size

func (m *SearchLogResponse) XXX_Size() int

func (*SearchLogResponse) XXX_Unmarshal

func (m *SearchLogResponse) XXX_Unmarshal(b []byte) error

type ServerInfoItem

type ServerInfoItem struct {
	// cpu, memory, disk, network ...
	Tp string `protobuf:"bytes,1,opt,name=tp,proto3" json:"tp,omitempty"`
	// eg. network: lo1/eth0, cpu: core1/core2, disk: sda1/sda2
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// all key-value pairs for specified item, e.g:
	// ServerInfoItem {
	//     tp = "network"
	//     name = "eth0"
	//     paris = [
	//         ServerInfoPair { key = "readbytes", value = "4k"},
	//         ServerInfoPair { key = "writebytes", value = "1k"},
	//     ]
	// }
	Pairs                []*ServerInfoPair `protobuf:"bytes,3,rep,name=pairs,proto3" json:"pairs,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*ServerInfoItem) Descriptor

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

func (*ServerInfoItem) GetName

func (m *ServerInfoItem) GetName() string

func (*ServerInfoItem) GetPairs

func (m *ServerInfoItem) GetPairs() []*ServerInfoPair

func (*ServerInfoItem) GetTp

func (m *ServerInfoItem) GetTp() string

func (*ServerInfoItem) Marshal

func (m *ServerInfoItem) Marshal() (dAtA []byte, err error)

func (*ServerInfoItem) MarshalTo

func (m *ServerInfoItem) MarshalTo(dAtA []byte) (int, error)

func (*ServerInfoItem) MarshalToSizedBuffer

func (m *ServerInfoItem) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServerInfoItem) ProtoMessage

func (*ServerInfoItem) ProtoMessage()

func (*ServerInfoItem) Reset

func (m *ServerInfoItem) Reset()

func (*ServerInfoItem) Size

func (m *ServerInfoItem) Size() (n int)

func (*ServerInfoItem) String

func (m *ServerInfoItem) String() string

func (*ServerInfoItem) Unmarshal

func (m *ServerInfoItem) Unmarshal(dAtA []byte) error

func (*ServerInfoItem) XXX_DiscardUnknown

func (m *ServerInfoItem) XXX_DiscardUnknown()

func (*ServerInfoItem) XXX_Marshal

func (m *ServerInfoItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerInfoItem) XXX_Merge

func (m *ServerInfoItem) XXX_Merge(src proto.Message)

func (*ServerInfoItem) XXX_Size

func (m *ServerInfoItem) XXX_Size() int

func (*ServerInfoItem) XXX_Unmarshal

func (m *ServerInfoItem) XXX_Unmarshal(b []byte) error

type ServerInfoPair

type ServerInfoPair struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,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 (*ServerInfoPair) Descriptor

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

func (*ServerInfoPair) GetKey

func (m *ServerInfoPair) GetKey() string

func (*ServerInfoPair) GetValue

func (m *ServerInfoPair) GetValue() string

func (*ServerInfoPair) Marshal

func (m *ServerInfoPair) Marshal() (dAtA []byte, err error)

func (*ServerInfoPair) MarshalTo

func (m *ServerInfoPair) MarshalTo(dAtA []byte) (int, error)

func (*ServerInfoPair) MarshalToSizedBuffer

func (m *ServerInfoPair) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServerInfoPair) ProtoMessage

func (*ServerInfoPair) ProtoMessage()

func (*ServerInfoPair) Reset

func (m *ServerInfoPair) Reset()

func (*ServerInfoPair) Size

func (m *ServerInfoPair) Size() (n int)

func (*ServerInfoPair) String

func (m *ServerInfoPair) String() string

func (*ServerInfoPair) Unmarshal

func (m *ServerInfoPair) Unmarshal(dAtA []byte) error

func (*ServerInfoPair) XXX_DiscardUnknown

func (m *ServerInfoPair) XXX_DiscardUnknown()

func (*ServerInfoPair) XXX_Marshal

func (m *ServerInfoPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerInfoPair) XXX_Merge

func (m *ServerInfoPair) XXX_Merge(src proto.Message)

func (*ServerInfoPair) XXX_Size

func (m *ServerInfoPair) XXX_Size() int

func (*ServerInfoPair) XXX_Unmarshal

func (m *ServerInfoPair) XXX_Unmarshal(b []byte) error

type ServerInfoRequest

type ServerInfoRequest struct {
	Tp                   ServerInfoType `protobuf:"varint,1,opt,name=tp,proto3,enum=diagnosticspb.ServerInfoType" json:"tp,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*ServerInfoRequest) Descriptor

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

func (*ServerInfoRequest) GetTp

func (m *ServerInfoRequest) GetTp() ServerInfoType

func (*ServerInfoRequest) Marshal

func (m *ServerInfoRequest) Marshal() (dAtA []byte, err error)

func (*ServerInfoRequest) MarshalTo

func (m *ServerInfoRequest) MarshalTo(dAtA []byte) (int, error)

func (*ServerInfoRequest) MarshalToSizedBuffer

func (m *ServerInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServerInfoRequest) ProtoMessage

func (*ServerInfoRequest) ProtoMessage()

func (*ServerInfoRequest) Reset

func (m *ServerInfoRequest) Reset()

func (*ServerInfoRequest) Size

func (m *ServerInfoRequest) Size() (n int)

func (*ServerInfoRequest) String

func (m *ServerInfoRequest) String() string

func (*ServerInfoRequest) Unmarshal

func (m *ServerInfoRequest) Unmarshal(dAtA []byte) error

func (*ServerInfoRequest) XXX_DiscardUnknown

func (m *ServerInfoRequest) XXX_DiscardUnknown()

func (*ServerInfoRequest) XXX_Marshal

func (m *ServerInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerInfoRequest) XXX_Merge

func (m *ServerInfoRequest) XXX_Merge(src proto.Message)

func (*ServerInfoRequest) XXX_Size

func (m *ServerInfoRequest) XXX_Size() int

func (*ServerInfoRequest) XXX_Unmarshal

func (m *ServerInfoRequest) XXX_Unmarshal(b []byte) error

type ServerInfoResponse

type ServerInfoResponse struct {
	Items                []*ServerInfoItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*ServerInfoResponse) Descriptor

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

func (*ServerInfoResponse) GetItems

func (m *ServerInfoResponse) GetItems() []*ServerInfoItem

func (*ServerInfoResponse) Marshal

func (m *ServerInfoResponse) Marshal() (dAtA []byte, err error)

func (*ServerInfoResponse) MarshalTo

func (m *ServerInfoResponse) MarshalTo(dAtA []byte) (int, error)

func (*ServerInfoResponse) MarshalToSizedBuffer

func (m *ServerInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ServerInfoResponse) ProtoMessage

func (*ServerInfoResponse) ProtoMessage()

func (*ServerInfoResponse) Reset

func (m *ServerInfoResponse) Reset()

func (*ServerInfoResponse) Size

func (m *ServerInfoResponse) Size() (n int)

func (*ServerInfoResponse) String

func (m *ServerInfoResponse) String() string

func (*ServerInfoResponse) Unmarshal

func (m *ServerInfoResponse) Unmarshal(dAtA []byte) error

func (*ServerInfoResponse) XXX_DiscardUnknown

func (m *ServerInfoResponse) XXX_DiscardUnknown()

func (*ServerInfoResponse) XXX_Marshal

func (m *ServerInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ServerInfoResponse) XXX_Merge

func (m *ServerInfoResponse) XXX_Merge(src proto.Message)

func (*ServerInfoResponse) XXX_Size

func (m *ServerInfoResponse) XXX_Size() int

func (*ServerInfoResponse) XXX_Unmarshal

func (m *ServerInfoResponse) XXX_Unmarshal(b []byte) error

type ServerInfoType

type ServerInfoType int32
const (
	ServerInfoType_All          ServerInfoType = 0
	ServerInfoType_HardwareInfo ServerInfoType = 1
	ServerInfoType_SystemInfo   ServerInfoType = 2
	ServerInfoType_LoadInfo     ServerInfoType = 3
)

func (ServerInfoType) EnumDescriptor

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

func (ServerInfoType) String

func (x ServerInfoType) String() string

type UnimplementedDiagnosticsServer

type UnimplementedDiagnosticsServer struct {
}

UnimplementedDiagnosticsServer can be embedded to have forward compatible implementations.

func (*UnimplementedDiagnosticsServer) SearchLog

func (*UnimplementedDiagnosticsServer) ServerInfo

Jump to

Keyboard shortcuts

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