commonpb

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: MIT Imports: 6 Imported by: 0

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

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

func (*Job) Marshal

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

func (*Job) MarshalTo

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

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) Reset

func (m *Job) Reset()

func (*Job) Size

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

func (*Job) String

func (m *Job) String() string

func (*Job) Unmarshal

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

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

func (*Node) Marshal

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

func (*Node) MarshalTo

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

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) Size

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

func (*Node) String

func (m *Node) String() string

func (*Node) Unmarshal

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

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

func (m *NodeCapacity) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *NodeInfoReq) MarshalTo(dAtA []byte) (int, 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) MarshalTo

func (m *NodeInfoRes) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*NodePrice) Marshal

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

func (*NodePrice) MarshalTo

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

func (*NodePrice) ProtoMessage

func (*NodePrice) ProtoMessage()

func (*NodePrice) Reset

func (m *NodePrice) Reset()

func (*NodePrice) Size

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

func (*NodePrice) String

func (m *NodePrice) String() string

func (*NodePrice) Unmarshal

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

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

func (m *NodeProvider) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*NodeRole) Marshal

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

func (*NodeRole) MarshalTo

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

func (*NodeRole) ProtoMessage

func (*NodeRole) ProtoMessage()

func (*NodeRole) Reset

func (m *NodeRole) Reset()

func (*NodeRole) Size

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

func (*NodeRole) String

func (m *NodeRole) String() string

func (*NodeRole) Unmarshal

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

type NodeState

type NodeState int32

node state, used in

heartbeat with central http api for UI tag monitoring data

const (
	NodeState_UNKNOWN_STATE     NodeState = 0
	NodeState_FINDING_CENTRAL   NodeState = 1
	NodeState_IDLE              NodeState = 2
	NodeState_JOB_RUNNING       NodeState = 3
	NodeState_JOB_WAITING_PEERS NodeState = 5
	NodeState_JOB_REPORTING     NodeState = 6
	NodeState_JOB_CLEANUP       NodeState = 7
)

func (NodeState) EnumDescriptor

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

func (NodeState) String

func (x NodeState) String() string

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

func (m *NodeStatus) MarshalTo(dAtA []byte) (int, 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) Descriptor() ([]byte, []int)

func (*Ping) Marshal

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

func (*Ping) MarshalTo

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

func (*Ping) ProtoMessage

func (*Ping) ProtoMessage()

func (*Ping) Reset

func (m *Ping) Reset()

func (*Ping) Size

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

func (*Ping) String

func (m *Ping) String() string

func (*Ping) Unmarshal

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

type Pong

type Pong struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
}

func (*Pong) Descriptor

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

func (*Pong) Marshal

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

func (*Pong) MarshalTo

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

func (*Pong) ProtoMessage

func (*Pong) ProtoMessage()

func (*Pong) Reset

func (m *Pong) Reset()

func (*Pong) Size

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

func (*Pong) String

func (m *Pong) String() string

func (*Pong) Unmarshal

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

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

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

func (Provider) String

func (x Provider) String() string

type Role

type Role int32
const (
	Role_UNKNOWN_ROLE Role = 0
	Role_ANY          Role = 1
	Role_CENTRAL      Role = 2
	Role_LOADER       Role = 3
	Role_DATABASE     Role = 4
)

func (Role) EnumDescriptor

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

func (Role) String

func (x Role) String() string

Jump to

Keyboard shortcuts

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