Documentation ¶
Index ¶
- Variables
- func RegisterRPCPickServer(s *grpc.Server, srv RPCPickServer)
- func RegisterWatchServer(s *grpc.Server, srv WatchServer)
- type BalanceType
- type PickRequest
- func (*PickRequest) Descriptor() ([]byte, []int)
- func (*PickRequest) ProtoMessage()
- func (m *PickRequest) Reset()
- func (m *PickRequest) String() string
- func (m *PickRequest) XXX_DiscardUnknown()
- func (m *PickRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PickRequest) XXX_Merge(src proto.Message)
- func (m *PickRequest) XXX_Size() int
- func (m *PickRequest) XXX_Unmarshal(b []byte) error
- type PickResponse
- func (*PickResponse) Descriptor() ([]byte, []int)
- func (m *PickResponse) GetIp() string
- func (m *PickResponse) GetPort() int32
- func (m *PickResponse) GetWorkerId() uint32
- func (*PickResponse) ProtoMessage()
- func (m *PickResponse) Reset()
- func (m *PickResponse) String() string
- func (m *PickResponse) XXX_DiscardUnknown()
- func (m *PickResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PickResponse) XXX_Merge(src proto.Message)
- func (m *PickResponse) XXX_Size() int
- func (m *PickResponse) XXX_Unmarshal(b []byte) error
- type RPCPickClient
- type RPCPickServer
- type ServiceStatus
- type Stat
- func (*Stat) Descriptor() ([]byte, []int)
- func (m *Stat) GetCpuUsageRate() float32
- func (m *Stat) GetMemoryUsageRate() float32
- func (m *Stat) GetReadNetworkIOUsageRate() float32
- func (m *Stat) GetWriteNetworkIOUsageRate() float32
- func (*Stat) ProtoMessage()
- func (m *Stat) Reset()
- func (m *Stat) String() string
- func (m *Stat) XXX_DiscardUnknown()
- func (m *Stat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Stat) XXX_Merge(src proto.Message)
- func (m *Stat) XXX_Size() int
- func (m *Stat) XXX_Unmarshal(b []byte) error
- type UnimplementedRPCPickServer
- type UnimplementedWatchServer
- type WatchClient
- type WatchCreateRequest
- func (*WatchCreateRequest) Descriptor() ([]byte, []int)
- func (m *WatchCreateRequest) GetHeartbeatInterval() uint32
- func (m *WatchCreateRequest) GetServicePort() int32
- func (*WatchCreateRequest) ProtoMessage()
- func (m *WatchCreateRequest) Reset()
- func (m *WatchCreateRequest) String() string
- func (m *WatchCreateRequest) XXX_DiscardUnknown()
- func (m *WatchCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WatchCreateRequest) XXX_Merge(src proto.Message)
- func (m *WatchCreateRequest) XXX_Size() int
- func (m *WatchCreateRequest) XXX_Unmarshal(b []byte) error
- type WatchHeartbeatRequest
- func (*WatchHeartbeatRequest) Descriptor() ([]byte, []int)
- func (m *WatchHeartbeatRequest) GetServiceStatus() ServiceStatus
- func (*WatchHeartbeatRequest) ProtoMessage()
- func (m *WatchHeartbeatRequest) Reset()
- func (m *WatchHeartbeatRequest) String() string
- func (m *WatchHeartbeatRequest) XXX_DiscardUnknown()
- func (m *WatchHeartbeatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WatchHeartbeatRequest) XXX_Merge(src proto.Message)
- func (m *WatchHeartbeatRequest) XXX_Size() int
- func (m *WatchHeartbeatRequest) XXX_Unmarshal(b []byte) error
- type WatchLoadReportRequest
- func (*WatchLoadReportRequest) Descriptor() ([]byte, []int)
- func (m *WatchLoadReportRequest) GetLoadReportData() *any.Any
- func (*WatchLoadReportRequest) ProtoMessage()
- func (m *WatchLoadReportRequest) Reset()
- func (m *WatchLoadReportRequest) String() string
- func (m *WatchLoadReportRequest) XXX_DiscardUnknown()
- func (m *WatchLoadReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WatchLoadReportRequest) XXX_Merge(src proto.Message)
- func (m *WatchLoadReportRequest) XXX_Size() int
- func (m *WatchLoadReportRequest) XXX_Unmarshal(b []byte) error
- type WatchRequest
- func (*WatchRequest) Descriptor() ([]byte, []int)
- func (m *WatchRequest) GetCreateRequest() *WatchCreateRequest
- func (m *WatchRequest) GetHeartbeatRequest() *WatchHeartbeatRequest
- func (m *WatchRequest) GetLoadReportRequest() *WatchLoadReportRequest
- func (m *WatchRequest) GetRequestUnion() isWatchRequest_RequestUnion
- func (*WatchRequest) ProtoMessage()
- func (m *WatchRequest) Reset()
- func (m *WatchRequest) String() string
- func (m *WatchRequest) XXX_DiscardUnknown()
- func (m *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WatchRequest) XXX_Merge(src proto.Message)
- func (*WatchRequest) XXX_OneofWrappers() []interface{}
- func (m *WatchRequest) XXX_Size() int
- func (m *WatchRequest) XXX_Unmarshal(b []byte) error
- type WatchRequest_CreateRequest
- type WatchRequest_HeartbeatRequest
- type WatchRequest_LoadReportRequest
- type WatchResponse
- func (*WatchResponse) Descriptor() ([]byte, []int)
- func (m *WatchResponse) GetBalanceType() BalanceType
- func (m *WatchResponse) GetWorkerId() uint32
- func (*WatchResponse) ProtoMessage()
- func (m *WatchResponse) Reset()
- func (m *WatchResponse) String() string
- func (m *WatchResponse) XXX_DiscardUnknown()
- func (m *WatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WatchResponse) XXX_Merge(src proto.Message)
- func (m *WatchResponse) XXX_Size() int
- func (m *WatchResponse) XXX_Unmarshal(b []byte) error
- type WatchServer
- type Watch_WatchClient
- type Watch_WatchServer
Constants ¶
This section is empty.
Variables ¶
var BalanceType_name = map[int32]string{
0: "RoundRobin",
1: "OptimalPerformance",
}
var BalanceType_value = map[string]int32{
"RoundRobin": 0,
"OptimalPerformance": 1,
}
var ServiceStatus_name = map[int32]string{
0: "Down",
1: "Up",
}
var ServiceStatus_value = map[string]int32{
"Down": 0,
"Up": 1,
}
Functions ¶
func RegisterRPCPickServer ¶
func RegisterRPCPickServer(s *grpc.Server, srv RPCPickServer)
func RegisterWatchServer ¶
func RegisterWatchServer(s *grpc.Server, srv WatchServer)
Types ¶
type BalanceType ¶
type BalanceType int32
const ( BalanceType_RoundRobin BalanceType = 0 BalanceType_OptimalPerformance BalanceType = 1 )
func (BalanceType) EnumDescriptor ¶
func (BalanceType) EnumDescriptor() ([]byte, []int)
func (BalanceType) String ¶
func (x BalanceType) String() string
type PickRequest ¶
type PickRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PickRequest) Descriptor ¶
func (*PickRequest) Descriptor() ([]byte, []int)
func (*PickRequest) ProtoMessage ¶
func (*PickRequest) ProtoMessage()
func (*PickRequest) Reset ¶
func (m *PickRequest) Reset()
func (*PickRequest) String ¶
func (m *PickRequest) String() string
func (*PickRequest) XXX_DiscardUnknown ¶
func (m *PickRequest) XXX_DiscardUnknown()
func (*PickRequest) XXX_Marshal ¶
func (m *PickRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PickRequest) XXX_Merge ¶
func (m *PickRequest) XXX_Merge(src proto.Message)
func (*PickRequest) XXX_Size ¶
func (m *PickRequest) XXX_Size() int
func (*PickRequest) XXX_Unmarshal ¶
func (m *PickRequest) XXX_Unmarshal(b []byte) error
type PickResponse ¶
type PickResponse struct { Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` WorkerId uint32 `protobuf:"varint,3,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PickResponse) Descriptor ¶
func (*PickResponse) Descriptor() ([]byte, []int)
func (*PickResponse) GetIp ¶
func (m *PickResponse) GetIp() string
func (*PickResponse) GetPort ¶
func (m *PickResponse) GetPort() int32
func (*PickResponse) GetWorkerId ¶
func (m *PickResponse) GetWorkerId() uint32
func (*PickResponse) ProtoMessage ¶
func (*PickResponse) ProtoMessage()
func (*PickResponse) Reset ¶
func (m *PickResponse) Reset()
func (*PickResponse) String ¶
func (m *PickResponse) String() string
func (*PickResponse) XXX_DiscardUnknown ¶
func (m *PickResponse) XXX_DiscardUnknown()
func (*PickResponse) XXX_Marshal ¶
func (m *PickResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PickResponse) XXX_Merge ¶
func (m *PickResponse) XXX_Merge(src proto.Message)
func (*PickResponse) XXX_Size ¶
func (m *PickResponse) XXX_Size() int
func (*PickResponse) XXX_Unmarshal ¶
func (m *PickResponse) XXX_Unmarshal(b []byte) error
type RPCPickClient ¶
type RPCPickClient interface {
RPCPick(ctx context.Context, in *PickRequest, opts ...grpc.CallOption) (*PickResponse, error)
}
RPCPickClient is the client API for RPCPick service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRPCPickClient ¶
func NewRPCPickClient(cc *grpc.ClientConn) RPCPickClient
type RPCPickServer ¶
type RPCPickServer interface {
RPCPick(context.Context, *PickRequest) (*PickResponse, error)
}
RPCPickServer is the server API for RPCPick service.
type ServiceStatus ¶
type ServiceStatus int32
const ( ServiceStatus_Down ServiceStatus = 0 ServiceStatus_Up ServiceStatus = 1 )
func (ServiceStatus) EnumDescriptor ¶
func (ServiceStatus) EnumDescriptor() ([]byte, []int)
func (ServiceStatus) String ¶
func (x ServiceStatus) String() string
type Stat ¶
type Stat struct { CpuUsageRate float32 `protobuf:"fixed32,1,opt,name=cpuUsageRate,proto3" json:"cpuUsageRate,omitempty"` MemoryUsageRate float32 `protobuf:"fixed32,2,opt,name=memoryUsageRate,proto3" json:"memoryUsageRate,omitempty"` ReadNetworkIOUsageRate float32 `protobuf:"fixed32,3,opt,name=readNetworkIOUsageRate,proto3" json:"readNetworkIOUsageRate,omitempty"` WriteNetworkIOUsageRate float32 `protobuf:"fixed32,4,opt,name=writeNetworkIOUsageRate,proto3" json:"writeNetworkIOUsageRate,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Stat) Descriptor ¶
func (*Stat) GetCpuUsageRate ¶
func (*Stat) GetMemoryUsageRate ¶
func (*Stat) GetReadNetworkIOUsageRate ¶
func (*Stat) GetWriteNetworkIOUsageRate ¶
func (*Stat) ProtoMessage ¶
func (*Stat) ProtoMessage()
func (*Stat) XXX_DiscardUnknown ¶
func (m *Stat) XXX_DiscardUnknown()
func (*Stat) XXX_Unmarshal ¶
type UnimplementedRPCPickServer ¶
type UnimplementedRPCPickServer struct { }
UnimplementedRPCPickServer can be embedded to have forward compatible implementations.
func (*UnimplementedRPCPickServer) RPCPick ¶
func (*UnimplementedRPCPickServer) RPCPick(ctx context.Context, req *PickRequest) (*PickResponse, error)
type UnimplementedWatchServer ¶
type UnimplementedWatchServer struct { }
UnimplementedWatchServer can be embedded to have forward compatible implementations.
func (*UnimplementedWatchServer) Watch ¶
func (*UnimplementedWatchServer) Watch(srv Watch_WatchServer) error
type WatchClient ¶
type WatchClient interface {
Watch(ctx context.Context, opts ...grpc.CallOption) (Watch_WatchClient, error)
}
WatchClient is the client API for Watch service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewWatchClient ¶
func NewWatchClient(cc *grpc.ClientConn) WatchClient
type WatchCreateRequest ¶
type WatchCreateRequest struct { ServicePort int32 `protobuf:"varint,1,opt,name=service_port,json=servicePort,proto3" json:"service_port,omitempty"` HeartbeatInterval uint32 `protobuf:"varint,2,opt,name=heartbeat_interval,json=heartbeatInterval,proto3" json:"heartbeat_interval,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WatchCreateRequest) Descriptor ¶
func (*WatchCreateRequest) Descriptor() ([]byte, []int)
func (*WatchCreateRequest) GetHeartbeatInterval ¶
func (m *WatchCreateRequest) GetHeartbeatInterval() uint32
func (*WatchCreateRequest) GetServicePort ¶
func (m *WatchCreateRequest) GetServicePort() int32
func (*WatchCreateRequest) ProtoMessage ¶
func (*WatchCreateRequest) ProtoMessage()
func (*WatchCreateRequest) Reset ¶
func (m *WatchCreateRequest) Reset()
func (*WatchCreateRequest) String ¶
func (m *WatchCreateRequest) String() string
func (*WatchCreateRequest) XXX_DiscardUnknown ¶
func (m *WatchCreateRequest) XXX_DiscardUnknown()
func (*WatchCreateRequest) XXX_Marshal ¶
func (m *WatchCreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WatchCreateRequest) XXX_Merge ¶
func (m *WatchCreateRequest) XXX_Merge(src proto.Message)
func (*WatchCreateRequest) XXX_Size ¶
func (m *WatchCreateRequest) XXX_Size() int
func (*WatchCreateRequest) XXX_Unmarshal ¶
func (m *WatchCreateRequest) XXX_Unmarshal(b []byte) error
type WatchHeartbeatRequest ¶
type WatchHeartbeatRequest struct { ServiceStatus ServiceStatus `` /* 126-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WatchHeartbeatRequest) Descriptor ¶
func (*WatchHeartbeatRequest) Descriptor() ([]byte, []int)
func (*WatchHeartbeatRequest) GetServiceStatus ¶
func (m *WatchHeartbeatRequest) GetServiceStatus() ServiceStatus
func (*WatchHeartbeatRequest) ProtoMessage ¶
func (*WatchHeartbeatRequest) ProtoMessage()
func (*WatchHeartbeatRequest) Reset ¶
func (m *WatchHeartbeatRequest) Reset()
func (*WatchHeartbeatRequest) String ¶
func (m *WatchHeartbeatRequest) String() string
func (*WatchHeartbeatRequest) XXX_DiscardUnknown ¶
func (m *WatchHeartbeatRequest) XXX_DiscardUnknown()
func (*WatchHeartbeatRequest) XXX_Marshal ¶
func (m *WatchHeartbeatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WatchHeartbeatRequest) XXX_Merge ¶
func (m *WatchHeartbeatRequest) XXX_Merge(src proto.Message)
func (*WatchHeartbeatRequest) XXX_Size ¶
func (m *WatchHeartbeatRequest) XXX_Size() int
func (*WatchHeartbeatRequest) XXX_Unmarshal ¶
func (m *WatchHeartbeatRequest) XXX_Unmarshal(b []byte) error
type WatchLoadReportRequest ¶
type WatchLoadReportRequest struct { LoadReportData *any.Any `protobuf:"bytes,2,opt,name=load_report_data,json=loadReportData,proto3" json:"load_report_data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WatchLoadReportRequest) Descriptor ¶
func (*WatchLoadReportRequest) Descriptor() ([]byte, []int)
func (*WatchLoadReportRequest) GetLoadReportData ¶
func (m *WatchLoadReportRequest) GetLoadReportData() *any.Any
func (*WatchLoadReportRequest) ProtoMessage ¶
func (*WatchLoadReportRequest) ProtoMessage()
func (*WatchLoadReportRequest) Reset ¶
func (m *WatchLoadReportRequest) Reset()
func (*WatchLoadReportRequest) String ¶
func (m *WatchLoadReportRequest) String() string
func (*WatchLoadReportRequest) XXX_DiscardUnknown ¶
func (m *WatchLoadReportRequest) XXX_DiscardUnknown()
func (*WatchLoadReportRequest) XXX_Marshal ¶
func (m *WatchLoadReportRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WatchLoadReportRequest) XXX_Merge ¶
func (m *WatchLoadReportRequest) XXX_Merge(src proto.Message)
func (*WatchLoadReportRequest) XXX_Size ¶
func (m *WatchLoadReportRequest) XXX_Size() int
func (*WatchLoadReportRequest) XXX_Unmarshal ¶
func (m *WatchLoadReportRequest) XXX_Unmarshal(b []byte) error
type WatchRequest ¶
type WatchRequest struct { // Types that are valid to be assigned to RequestUnion: // *WatchRequest_CreateRequest // *WatchRequest_HeartbeatRequest // *WatchRequest_LoadReportRequest RequestUnion isWatchRequest_RequestUnion `protobuf_oneof:"request_union"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WatchRequest) Descriptor ¶
func (*WatchRequest) Descriptor() ([]byte, []int)
func (*WatchRequest) GetCreateRequest ¶
func (m *WatchRequest) GetCreateRequest() *WatchCreateRequest
func (*WatchRequest) GetHeartbeatRequest ¶
func (m *WatchRequest) GetHeartbeatRequest() *WatchHeartbeatRequest
func (*WatchRequest) GetLoadReportRequest ¶
func (m *WatchRequest) GetLoadReportRequest() *WatchLoadReportRequest
func (*WatchRequest) GetRequestUnion ¶
func (m *WatchRequest) GetRequestUnion() isWatchRequest_RequestUnion
func (*WatchRequest) ProtoMessage ¶
func (*WatchRequest) ProtoMessage()
func (*WatchRequest) Reset ¶
func (m *WatchRequest) Reset()
func (*WatchRequest) String ¶
func (m *WatchRequest) String() string
func (*WatchRequest) XXX_DiscardUnknown ¶
func (m *WatchRequest) XXX_DiscardUnknown()
func (*WatchRequest) XXX_Marshal ¶
func (m *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WatchRequest) XXX_Merge ¶
func (m *WatchRequest) XXX_Merge(src proto.Message)
func (*WatchRequest) XXX_OneofWrappers ¶
func (*WatchRequest) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*WatchRequest) XXX_Size ¶
func (m *WatchRequest) XXX_Size() int
func (*WatchRequest) XXX_Unmarshal ¶
func (m *WatchRequest) XXX_Unmarshal(b []byte) error
type WatchRequest_CreateRequest ¶
type WatchRequest_CreateRequest struct {
CreateRequest *WatchCreateRequest `protobuf:"bytes,1,opt,name=create_request,json=createRequest,proto3,oneof"`
}
type WatchRequest_HeartbeatRequest ¶
type WatchRequest_HeartbeatRequest struct {
HeartbeatRequest *WatchHeartbeatRequest `protobuf:"bytes,2,opt,name=heartbeat_request,json=heartbeatRequest,proto3,oneof"`
}
type WatchRequest_LoadReportRequest ¶
type WatchRequest_LoadReportRequest struct {
LoadReportRequest *WatchLoadReportRequest `protobuf:"bytes,3,opt,name=load_report_request,json=loadReportRequest,proto3,oneof"`
}
type WatchResponse ¶
type WatchResponse struct { WorkerId uint32 `protobuf:"varint,1,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` BalanceType BalanceType `protobuf:"varint,2,opt,name=balance_type,json=balanceType,proto3,enum=proto.BalanceType" json:"balance_type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WatchResponse) Descriptor ¶
func (*WatchResponse) Descriptor() ([]byte, []int)
func (*WatchResponse) GetBalanceType ¶
func (m *WatchResponse) GetBalanceType() BalanceType
func (*WatchResponse) GetWorkerId ¶
func (m *WatchResponse) GetWorkerId() uint32
func (*WatchResponse) ProtoMessage ¶
func (*WatchResponse) ProtoMessage()
func (*WatchResponse) Reset ¶
func (m *WatchResponse) Reset()
func (*WatchResponse) String ¶
func (m *WatchResponse) String() string
func (*WatchResponse) XXX_DiscardUnknown ¶
func (m *WatchResponse) XXX_DiscardUnknown()
func (*WatchResponse) XXX_Marshal ¶
func (m *WatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WatchResponse) XXX_Merge ¶
func (m *WatchResponse) XXX_Merge(src proto.Message)
func (*WatchResponse) XXX_Size ¶
func (m *WatchResponse) XXX_Size() int
func (*WatchResponse) XXX_Unmarshal ¶
func (m *WatchResponse) XXX_Unmarshal(b []byte) error
type WatchServer ¶
type WatchServer interface {
Watch(Watch_WatchServer) error
}
WatchServer is the server API for Watch service.
type Watch_WatchClient ¶
type Watch_WatchClient interface { Send(*WatchRequest) error Recv() (*WatchResponse, error) grpc.ClientStream }
type Watch_WatchServer ¶
type Watch_WatchServer interface { Send(*WatchResponse) error Recv() (*WatchRequest, error) grpc.ServerStream }