Documentation
¶
Overview ¶
Package commonpb is a generated protocol buffer package.
It is generated from these files:
types.proto
It has these top-level messages:
Ping Pong NodeStatus Node NodeCapacity NodeProvider NodeRole NodePrice NodeInfoReq NodeInfoRes Job
Index ¶
- Variables
- type Job
- type Node
- type NodeCapacity
- func (*NodeCapacity) Descriptor() ([]byte, []int)
- func (m *NodeCapacity) Marshal() (dAtA []byte, err error)
- func (m *NodeCapacity) MarshalTo(dAtA []byte) (int, error)
- func (*NodeCapacity) ProtoMessage()
- func (m *NodeCapacity) Reset()
- func (m *NodeCapacity) Size() (n int)
- func (m *NodeCapacity) String() string
- func (m *NodeCapacity) Unmarshal(dAtA []byte) error
- type NodeInfoReq
- func (*NodeInfoReq) Descriptor() ([]byte, []int)
- func (m *NodeInfoReq) Marshal() (dAtA []byte, err error)
- func (m *NodeInfoReq) MarshalTo(dAtA []byte) (int, error)
- func (*NodeInfoReq) ProtoMessage()
- func (m *NodeInfoReq) Reset()
- func (m *NodeInfoReq) Size() (n int)
- func (m *NodeInfoReq) String() string
- func (m *NodeInfoReq) Unmarshal(dAtA []byte) error
- type NodeInfoRes
- func (*NodeInfoRes) Descriptor() ([]byte, []int)
- func (m *NodeInfoRes) Marshal() (dAtA []byte, err error)
- func (m *NodeInfoRes) MarshalTo(dAtA []byte) (int, error)
- func (*NodeInfoRes) ProtoMessage()
- func (m *NodeInfoRes) Reset()
- func (m *NodeInfoRes) Size() (n int)
- func (m *NodeInfoRes) String() string
- func (m *NodeInfoRes) Unmarshal(dAtA []byte) error
- type NodePrice
- func (*NodePrice) Descriptor() ([]byte, []int)
- func (m *NodePrice) Marshal() (dAtA []byte, err error)
- func (m *NodePrice) MarshalTo(dAtA []byte) (int, error)
- func (*NodePrice) ProtoMessage()
- func (m *NodePrice) Reset()
- func (m *NodePrice) Size() (n int)
- func (m *NodePrice) String() string
- func (m *NodePrice) Unmarshal(dAtA []byte) error
- type NodeProvider
- func (*NodeProvider) Descriptor() ([]byte, []int)
- func (m *NodeProvider) Marshal() (dAtA []byte, err error)
- func (m *NodeProvider) MarshalTo(dAtA []byte) (int, error)
- func (*NodeProvider) ProtoMessage()
- func (m *NodeProvider) Reset()
- func (m *NodeProvider) Size() (n int)
- func (m *NodeProvider) String() string
- func (m *NodeProvider) Unmarshal(dAtA []byte) error
- type NodeRole
- func (*NodeRole) Descriptor() ([]byte, []int)
- func (m *NodeRole) Marshal() (dAtA []byte, err error)
- func (m *NodeRole) MarshalTo(dAtA []byte) (int, error)
- func (*NodeRole) ProtoMessage()
- func (m *NodeRole) Reset()
- func (m *NodeRole) Size() (n int)
- func (m *NodeRole) String() string
- func (m *NodeRole) Unmarshal(dAtA []byte) error
- type NodeState
- type NodeStatus
- func (*NodeStatus) Descriptor() ([]byte, []int)
- func (m *NodeStatus) Marshal() (dAtA []byte, err error)
- func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error)
- func (*NodeStatus) ProtoMessage()
- func (m *NodeStatus) Reset()
- func (m *NodeStatus) Size() (n int)
- func (m *NodeStatus) String() string
- func (m *NodeStatus) Unmarshal(dAtA []byte) error
- type Ping
- type Pong
- type Provider
- type Role
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") )
View Source
var NodeState_name = map[int32]string{
0: "UNKNOWN_STATE",
1: "FINDING_CENTRAL",
2: "IDLE",
3: "JOB_RUNNING",
5: "JOB_WAITING_PEERS",
6: "JOB_REPORTING",
7: "JOB_CLEANUP",
}
View Source
var NodeState_value = map[string]int32{
"UNKNOWN_STATE": 0,
"FINDING_CENTRAL": 1,
"IDLE": 2,
"JOB_RUNNING": 3,
"JOB_WAITING_PEERS": 5,
"JOB_REPORTING": 6,
"JOB_CLEANUP": 7,
}
View Source
var Provider_name = map[int32]string{
0: "UNKNOWN_PROVIDER",
1: "LOCAL_PROVIDER",
2: "VAGRANT_PROVIDER",
3: "ALI_PROVIDER",
4: "AWS_PROVIDER",
5: "AZURE_PROVIDER",
6: "GCP_PROVIDER",
7: "PACKET_PROVIDER",
}
View Source
var Provider_value = map[string]int32{
"UNKNOWN_PROVIDER": 0,
"LOCAL_PROVIDER": 1,
"VAGRANT_PROVIDER": 2,
"ALI_PROVIDER": 3,
"AWS_PROVIDER": 4,
"AZURE_PROVIDER": 5,
"GCP_PROVIDER": 6,
"PACKET_PROVIDER": 7,
}
View Source
var Role_name = map[int32]string{
0: "UNKNOWN_ROLE",
1: "ANY",
2: "CENTRAL",
3: "LOADER",
4: "DATABASE",
}
View Source
var Role_value = map[string]int32{
"UNKNOWN_ROLE": 0,
"ANY": 1,
"CENTRAL": 2,
"LOADER": 3,
"DATABASE": 4,
}
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct {
// TODO: job should have much more info
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
----- start of job ------
func (*Job) Descriptor ¶
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
type Node ¶
type Node struct {
// addr grpc server listens on i.e. :6081
BindAdrr string `protobuf:"bytes,1,opt,name=bindAdrr,proto3" json:"bindAdrr,omitempty"`
// ip grpc server listens on, sometime it's empty for 0.0.0.0
BindIp string `protobuf:"bytes,2,opt,name=bindIp,proto3" json:"bindIp,omitempty"`
// port grpc server listens on, addr without the ip part
BindPort int64 `protobuf:"varint,3,opt,name=bindPort,proto3" json:"bindPort,omitempty"`
// remoteAddr that server sees when this node act as client, the ip is accurate, but the port is random, not the listen port
RemoteAddr string `protobuf:"bytes,4,opt,name=remoteAddr,proto3" json:"remoteAddr,omitempty"`
// self generated uid, used through a node agent's lifetime, change after process restart https://github.com/benchhub/benchhub/issues/17
Uid string `protobuf:"bytes,5,opt,name=uid,proto3" json:"uid,omitempty"`
// hostname
Host string `protobuf:"bytes,6,opt,name=host,proto3" json:"host,omitempty"`
// unix timestamp when process start
StartTime int64 `protobuf:"varint,7,opt,name=startTime,proto3" json:"startTime,omitempty"`
BootTime int64 `protobuf:"varint,8,opt,name=bootTime,proto3" json:"bootTime,omitempty"`
Capacity NodeCapacity `protobuf:"bytes,9,opt,name=capacity" json:"capacity"`
Provider NodeProvider `protobuf:"bytes,10,opt,name=provider" json:"provider"`
Role NodeRole `protobuf:"bytes,11,opt,name=role" json:"role"`
}
used for register
func (*Node) Descriptor ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
type NodeCapacity ¶
type NodeCapacity struct {
// number of cpu cores
Cores int32 `protobuf:"varint,1,opt,name=cores,proto3" json:"cores,omitempty"`
// free memory in MB
MemoryFree int32 `protobuf:"varint,2,opt,name=memoryFree,proto3" json:"memoryFree,omitempty"`
// total memory in MB
MemoryTotal int32 `protobuf:"varint,3,opt,name=memoryTotal,proto3" json:"memoryTotal,omitempty"`
// free disk space in MB
DiskFree int32 `protobuf:"varint,4,opt,name=diskFree,proto3" json:"diskFree,omitempty"`
// total disk space in MB
DiskTotal int32 `protobuf:"varint,5,opt,name=diskTotal,proto3" json:"diskTotal,omitempty"`
}
func (*NodeCapacity) Descriptor ¶
func (*NodeCapacity) Descriptor() ([]byte, []int)
func (*NodeCapacity) Marshal ¶
func (m *NodeCapacity) Marshal() (dAtA []byte, err error)
func (*NodeCapacity) ProtoMessage ¶
func (*NodeCapacity) ProtoMessage()
func (*NodeCapacity) Reset ¶
func (m *NodeCapacity) Reset()
func (*NodeCapacity) Size ¶
func (m *NodeCapacity) Size() (n int)
func (*NodeCapacity) String ¶
func (m *NodeCapacity) String() string
func (*NodeCapacity) Unmarshal ¶
func (m *NodeCapacity) Unmarshal(dAtA []byte) error
type NodeInfoReq ¶
type NodeInfoReq struct {
}
func (*NodeInfoReq) Descriptor ¶
func (*NodeInfoReq) Descriptor() ([]byte, []int)
func (*NodeInfoReq) Marshal ¶
func (m *NodeInfoReq) Marshal() (dAtA []byte, err error)
func (*NodeInfoReq) ProtoMessage ¶
func (*NodeInfoReq) ProtoMessage()
func (*NodeInfoReq) Reset ¶
func (m *NodeInfoReq) Reset()
func (*NodeInfoReq) Size ¶
func (m *NodeInfoReq) Size() (n int)
func (*NodeInfoReq) String ¶
func (m *NodeInfoReq) String() string
func (*NodeInfoReq) Unmarshal ¶
func (m *NodeInfoReq) Unmarshal(dAtA []byte) error
type NodeInfoRes ¶
type NodeInfoRes struct {
Node *Node `protobuf:"bytes,1,opt,name=node" json:"node,omitempty"`
}
func (*NodeInfoRes) Descriptor ¶
func (*NodeInfoRes) Descriptor() ([]byte, []int)
func (*NodeInfoRes) Marshal ¶
func (m *NodeInfoRes) Marshal() (dAtA []byte, err error)
func (*NodeInfoRes) ProtoMessage ¶
func (*NodeInfoRes) ProtoMessage()
func (*NodeInfoRes) Reset ¶
func (m *NodeInfoRes) Reset()
func (*NodeInfoRes) Size ¶
func (m *NodeInfoRes) Size() (n int)
func (*NodeInfoRes) String ¶
func (m *NodeInfoRes) String() string
func (*NodeInfoRes) Unmarshal ¶
func (m *NodeInfoRes) Unmarshal(dAtA []byte) error
type NodePrice ¶
type NodePrice struct {
MachinePerHour float64 `protobuf:"fixed64,1,opt,name=MachinePerHour,proto3" json:"MachinePerHour,omitempty"`
StoragePerGB float64 `protobuf:"fixed64,2,opt,name=StoragePerGB,proto3" json:"StoragePerGB,omitempty"`
OutboundPerMB float64 `protobuf:"fixed64,3,opt,name=OutboundPerMB,proto3" json:"OutboundPerMB,omitempty"`
}
func (*NodePrice) Descriptor ¶
func (*NodePrice) ProtoMessage ¶
func (*NodePrice) ProtoMessage()
type NodeProvider ¶
type NodeProvider struct {
// Provider code = 1;
// Region regionCode = 2;
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"`
Instance string `protobuf:"bytes,3,opt,name=instance,proto3" json:"instance,omitempty"`
}
func (*NodeProvider) Descriptor ¶
func (*NodeProvider) Descriptor() ([]byte, []int)
func (*NodeProvider) Marshal ¶
func (m *NodeProvider) Marshal() (dAtA []byte, err error)
func (*NodeProvider) ProtoMessage ¶
func (*NodeProvider) ProtoMessage()
func (*NodeProvider) Reset ¶
func (m *NodeProvider) Reset()
func (*NodeProvider) Size ¶
func (m *NodeProvider) Size() (n int)
func (*NodeProvider) String ¶
func (m *NodeProvider) String() string
func (*NodeProvider) Unmarshal ¶
func (m *NodeProvider) Unmarshal(dAtA []byte) error
type NodeRole ¶
type NodeRole struct {
Preferred Role `protobuf:"varint,1,opt,name=preferred,proto3,enum=bhcommon.Role" json:"preferred,omitempty"`
Current Role `protobuf:"varint,2,opt,name=current,proto3,enum=bhcommon.Role" json:"current,omitempty"`
Previous Role `protobuf:"varint,3,opt,name=previous,proto3,enum=bhcommon.Role" json:"previous,omitempty"`
}
func (*NodeRole) Descriptor ¶
func (*NodeRole) ProtoMessage ¶
func (*NodeRole) ProtoMessage()
type NodeState ¶
type NodeState int32
node state, used in
heartbeat with central http api for UI tag monitoring data
func (NodeState) EnumDescriptor ¶
type NodeStatus ¶
type NodeStatus struct {
State NodeState `protobuf:"varint,1,opt,name=state,proto3,enum=bhcommon.NodeState" json:"state,omitempty"`
}
func (*NodeStatus) Descriptor ¶
func (*NodeStatus) Descriptor() ([]byte, []int)
func (*NodeStatus) Marshal ¶
func (m *NodeStatus) Marshal() (dAtA []byte, err error)
func (*NodeStatus) ProtoMessage ¶
func (*NodeStatus) ProtoMessage()
func (*NodeStatus) Reset ¶
func (m *NodeStatus) Reset()
func (*NodeStatus) Size ¶
func (m *NodeStatus) Size() (n int)
func (*NodeStatus) String ¶
func (m *NodeStatus) String() string
func (*NodeStatus) Unmarshal ¶
func (m *NodeStatus) Unmarshal(dAtA []byte) error
type Ping ¶
type Ping struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}
func (*Ping) Descriptor ¶
func (*Ping) ProtoMessage ¶
func (*Ping) ProtoMessage()
type Pong ¶
type Pong struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}
func (*Pong) Descriptor ¶
func (*Pong) ProtoMessage ¶
func (*Pong) ProtoMessage()
type Provider ¶
type Provider int32
const ( Provider_UNKNOWN_PROVIDER Provider = 0 Provider_LOCAL_PROVIDER Provider = 1 Provider_VAGRANT_PROVIDER Provider = 2 Provider_ALI_PROVIDER Provider = 3 Provider_AWS_PROVIDER Provider = 4 Provider_AZURE_PROVIDER Provider = 5 Provider_GCP_PROVIDER Provider = 6 Provider_PACKET_PROVIDER Provider = 7 )
func (Provider) EnumDescriptor ¶
Click to show internal directories.
Click to hide internal directories.