Documentation ¶
Index ¶
- Variables
- func RegisterMasterNodeServer(s *grpc.Server, srv MasterNodeServer)
- type Action
- type ChanData
- func (*ChanData) Descriptor() ([]byte, []int)deprecated
- func (x *ChanData) GetIsExisted() bool
- func (x *ChanData) GetLength() uint32
- func (x *ChanData) GetNumberInCh() uint32
- func (x *ChanData) GetNumberOfWorkers() uint32
- func (x *ChanData) GetType() ChanType
- func (*ChanData) ProtoMessage()
- func (x *ChanData) ProtoReflect() protoreflect.Message
- func (x *ChanData) Reset()
- func (x *ChanData) String() string
- type ChanType
- type ManagerAction
- func (*ManagerAction) Descriptor() ([]byte, []int)deprecated
- func (x *ManagerAction) GetAction() Action
- func (x *ManagerAction) GetDelta() int32
- func (x *ManagerAction) GetType() Type
- func (*ManagerAction) ProtoMessage()
- func (x *ManagerAction) ProtoReflect() protoreflect.Message
- func (x *ManagerAction) Reset()
- func (x *ManagerAction) String() string
- type ManagerData
- func (*ManagerData) Descriptor() ([]byte, []int)deprecated
- func (x *ManagerData) GetChanAfter() []*ChanData
- func (x *ManagerData) GetChanBefore() []*ChanData
- func (x *ManagerData) GetCreated() *timestamp.Timestamp
- func (x *ManagerData) GetDelta() uint64
- func (x *ManagerData) GetID() string
- func (x *ManagerData) GetName() string
- func (x *ManagerData) GetWorkers() *WorkersData
- func (*ManagerData) ProtoMessage()
- func (x *ManagerData) ProtoReflect() protoreflect.Message
- func (x *ManagerData) Reset()
- func (x *ManagerData) String() string
- type MasterNodeClient
- type MasterNodeServer
- type SimpleResult
- type SlaveNodeInfoRequest
- func (*SlaveNodeInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SlaveNodeInfoRequest) GetClusterID() string
- func (x *SlaveNodeInfoRequest) GetErrorManagerData() []*ManagerData
- func (x *SlaveNodeInfoRequest) GetFinalManagerData() []*ManagerData
- func (x *SlaveNodeInfoRequest) GetManagerData() []*ManagerData
- func (x *SlaveNodeInfoRequest) GetNodeID() string
- func (*SlaveNodeInfoRequest) ProtoMessage()
- func (x *SlaveNodeInfoRequest) ProtoReflect() protoreflect.Message
- func (x *SlaveNodeInfoRequest) Reset()
- func (x *SlaveNodeInfoRequest) String() string
- type Type
- type UnimplementedMasterNodeServer
- type WorkersData
- func (*WorkersData) Descriptor() ([]byte, []int)deprecated
- func (x *WorkersData) GetActive() uint32
- func (x *WorkersData) GetMax() uint32
- func (x *WorkersData) GetMin() uint32
- func (x *WorkersData) GetNumber() uint32
- func (*WorkersData) ProtoMessage()
- func (x *WorkersData) ProtoReflect() protoreflect.Message
- func (x *WorkersData) Reset()
- func (x *WorkersData) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Action_name = map[int32]string{ 0: "NOTHING", 1: "UP", 2: "DOWN", } Action_value = map[string]int32{ "NOTHING": 0, "UP": 1, "DOWN": 2, } )
Enum value maps for Action.
var ( Type_name = map[int32]string{ 0: "TYPE_UNKNOWN", 1: "TYPE_WORKER", 2: "TYPE_CHANNEL", 3: "TYPE_MANAGER", 4: "TYPE_NODE", 5: "TYPE_CLUSTER", } Type_value = map[string]int32{ "TYPE_UNKNOWN": 0, "TYPE_WORKER": 1, "TYPE_CHANNEL": 2, "TYPE_MANAGER": 3, "TYPE_NODE": 4, "TYPE_CLUSTER": 5, } )
Enum value maps for Type.
var ( ChanType_name = map[int32]string{ 0: "CHAN_UNKNOWN", 1: "CHAN_STD_GO", 2: "CHAN_STACK", 3: "CHAN_PRIORITY_QUEUE", } ChanType_value = map[string]int32{ "CHAN_UNKNOWN": 0, "CHAN_STD_GO": 1, "CHAN_STACK": 2, "CHAN_PRIORITY_QUEUE": 3, } )
Enum value maps for ChanType.
var File_protobuf_proto_masternode_proto protoreflect.FileDescriptor
Functions ¶
func RegisterMasterNodeServer ¶
func RegisterMasterNodeServer(s *grpc.Server, srv MasterNodeServer)
Types ¶
type Action ¶
type Action int32
* enum Action is a rule of conduct the managers
func (Action) Descriptor ¶
func (Action) Descriptor() protoreflect.EnumDescriptor
func (Action) EnumDescriptor
deprecated
func (Action) Number ¶
func (x Action) Number() protoreflect.EnumNumber
func (Action) Type ¶
func (Action) Type() protoreflect.EnumType
type ChanData ¶
type ChanData struct { IsExisted bool `protobuf:"varint,1,opt,name=IsExisted,proto3" json:"IsExisted,omitempty"` // last manager has false for out channel Type ChanType `protobuf:"varint,2,opt,name=Type,proto3,enum=nodes.ChanType" json:"Type,omitempty"` // type of channel. last manager has UNKNOWN for out channel Length uint32 `protobuf:"varint,3,opt,name=Length,proto3" json:"Length,omitempty"` // length of channel NumberInCh uint32 `protobuf:"varint,4,opt,name=NumberInCh,proto3" json:"NumberInCh,omitempty"` // number of items in channel right now // number of workers which are serving the channel right now. Usually it equals the WorkersData.Number NumberOfWorkers uint32 `protobuf:"varint,5,opt,name=NumberOfWorkers,proto3" json:"NumberOfWorkers,omitempty"` // contains filtered or unexported fields }
* message ChanData contents the information about single channel
func (*ChanData) Descriptor
deprecated
func (*ChanData) GetIsExisted ¶
func (*ChanData) GetNumberInCh ¶
func (*ChanData) GetNumberOfWorkers ¶
func (*ChanData) ProtoMessage ¶
func (*ChanData) ProtoMessage()
func (*ChanData) ProtoReflect ¶
func (x *ChanData) ProtoReflect() protoreflect.Message
type ChanType ¶
type ChanType int32
* enum ChanType is a type of channel
func (ChanType) Descriptor ¶
func (ChanType) Descriptor() protoreflect.EnumDescriptor
func (ChanType) EnumDescriptor
deprecated
func (ChanType) Number ¶
func (x ChanType) Number() protoreflect.EnumNumber
func (ChanType) Type ¶
func (ChanType) Type() protoreflect.EnumType
type ManagerAction ¶
type ManagerAction struct { Type Type `protobuf:"varint,1,opt,name=Type,json=type,proto3,enum=nodes.Type" json:"Type,omitempty"` Action Action `protobuf:"varint,2,opt,name=Action,json=action,proto3,enum=nodes.Action" json:"Action,omitempty"` Delta int32 `protobuf:"varint,3,opt,name=Delta,json=number,proto3" json:"Delta,omitempty"` // contains filtered or unexported fields }
func (*ManagerAction) Descriptor
deprecated
func (*ManagerAction) Descriptor() ([]byte, []int)
Deprecated: Use ManagerAction.ProtoReflect.Descriptor instead.
func (*ManagerAction) GetAction ¶
func (x *ManagerAction) GetAction() Action
func (*ManagerAction) GetDelta ¶
func (x *ManagerAction) GetDelta() int32
func (*ManagerAction) GetType ¶
func (x *ManagerAction) GetType() Type
func (*ManagerAction) ProtoMessage ¶
func (*ManagerAction) ProtoMessage()
func (*ManagerAction) ProtoReflect ¶
func (x *ManagerAction) ProtoReflect() protoreflect.Message
func (*ManagerAction) Reset ¶
func (x *ManagerAction) Reset()
func (*ManagerAction) String ¶
func (x *ManagerAction) String() string
type ManagerData ¶
type ManagerData struct { Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"` ID string `protobuf:"bytes,2,opt,name=ID,proto3" json:"ID,omitempty"` Created *timestamp.Timestamp `protobuf:"bytes,3,opt,name=Created,proto3" json:"Created,omitempty"` // time of getting into Delta uint64 `protobuf:"varint,4,opt,name=Delta,proto3" json:"Delta,omitempty"` // number of microseconds from last getting into Workers *WorkersData `protobuf:"bytes,5,opt,name=Workers,proto3" json:"Workers,omitempty"` ChanBefore []*ChanData `protobuf:"bytes,6,rep,name=ChanBefore,proto3" json:"ChanBefore,omitempty"` ChanAfter []*ChanData `protobuf:"bytes,7,rep,name=ChanAfter,proto3" json:"ChanAfter,omitempty"` // contains filtered or unexported fields }
* message ManagerData contents the information about single manager
func (*ManagerData) Descriptor
deprecated
func (*ManagerData) Descriptor() ([]byte, []int)
Deprecated: Use ManagerData.ProtoReflect.Descriptor instead.
func (*ManagerData) GetChanAfter ¶
func (x *ManagerData) GetChanAfter() []*ChanData
func (*ManagerData) GetChanBefore ¶
func (x *ManagerData) GetChanBefore() []*ChanData
func (*ManagerData) GetCreated ¶
func (x *ManagerData) GetCreated() *timestamp.Timestamp
func (*ManagerData) GetDelta ¶
func (x *ManagerData) GetDelta() uint64
func (*ManagerData) GetID ¶
func (x *ManagerData) GetID() string
func (*ManagerData) GetName ¶
func (x *ManagerData) GetName() string
func (*ManagerData) GetWorkers ¶
func (x *ManagerData) GetWorkers() *WorkersData
func (*ManagerData) ProtoMessage ¶
func (*ManagerData) ProtoMessage()
func (*ManagerData) ProtoReflect ¶
func (x *ManagerData) ProtoReflect() protoreflect.Message
func (*ManagerData) Reset ¶
func (x *ManagerData) Reset()
func (*ManagerData) String ¶
func (x *ManagerData) String() string
type MasterNodeClient ¶
type MasterNodeClient interface { // rpc UpdateNodeInfo sends info about current details of slave node to master node UpdateNodeInfo(ctx context.Context, in *SlaveNodeInfoRequest, opts ...grpc.CallOption) (*SimpleResult, error) }
MasterNodeClient is the client API for MasterNode service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMasterNodeClient ¶
func NewMasterNodeClient(cc grpc.ClientConnInterface) MasterNodeClient
type MasterNodeServer ¶
type MasterNodeServer interface { // rpc UpdateNodeInfo sends info about current details of slave node to master node UpdateNodeInfo(context.Context, *SlaveNodeInfoRequest) (*SimpleResult, error) }
MasterNodeServer is the server API for MasterNode service.
type SimpleResult ¶
type SimpleResult struct { OK bool `protobuf:"varint,1,opt,name=OK,json=ok,proto3" json:"OK,omitempty"` // contains filtered or unexported fields }
* To be or not to be
func (*SimpleResult) Descriptor
deprecated
func (*SimpleResult) Descriptor() ([]byte, []int)
Deprecated: Use SimpleResult.ProtoReflect.Descriptor instead.
func (*SimpleResult) GetOK ¶
func (x *SimpleResult) GetOK() bool
func (*SimpleResult) ProtoMessage ¶
func (*SimpleResult) ProtoMessage()
func (*SimpleResult) ProtoReflect ¶
func (x *SimpleResult) ProtoReflect() protoreflect.Message
func (*SimpleResult) Reset ¶
func (x *SimpleResult) Reset()
func (*SimpleResult) String ¶
func (x *SimpleResult) String() string
type SlaveNodeInfoRequest ¶
type SlaveNodeInfoRequest struct { ClusterID string `protobuf:"bytes,1,opt,name=ClusterID,proto3" json:"ClusterID,omitempty"` // unique name of cluster. No specific info NodeID string `protobuf:"bytes,2,opt,name=NodeID,proto3" json:"NodeID,omitempty"` // unique name of node. No specific info ManagerData []*ManagerData `protobuf:"bytes,3,rep,name=ManagerData,proto3" json:"ManagerData,omitempty"` // FinalManagerData []*ManagerData `protobuf:"bytes,4,rep,name=FinalManagerData,proto3" json:"FinalManagerData,omitempty"` // ErrorManagerData []*ManagerData `protobuf:"bytes,5,rep,name=ErrorManagerData,proto3" json:"ErrorManagerData,omitempty"` // // contains filtered or unexported fields }
* SlaveNodeInfoRequest is a request with slave node data to master node
func (*SlaveNodeInfoRequest) Descriptor
deprecated
func (*SlaveNodeInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use SlaveNodeInfoRequest.ProtoReflect.Descriptor instead.
func (*SlaveNodeInfoRequest) GetClusterID ¶
func (x *SlaveNodeInfoRequest) GetClusterID() string
func (*SlaveNodeInfoRequest) GetErrorManagerData ¶
func (x *SlaveNodeInfoRequest) GetErrorManagerData() []*ManagerData
func (*SlaveNodeInfoRequest) GetFinalManagerData ¶
func (x *SlaveNodeInfoRequest) GetFinalManagerData() []*ManagerData
func (*SlaveNodeInfoRequest) GetManagerData ¶
func (x *SlaveNodeInfoRequest) GetManagerData() []*ManagerData
func (*SlaveNodeInfoRequest) GetNodeID ¶
func (x *SlaveNodeInfoRequest) GetNodeID() string
func (*SlaveNodeInfoRequest) ProtoMessage ¶
func (*SlaveNodeInfoRequest) ProtoMessage()
func (*SlaveNodeInfoRequest) ProtoReflect ¶
func (x *SlaveNodeInfoRequest) ProtoReflect() protoreflect.Message
func (*SlaveNodeInfoRequest) Reset ¶
func (x *SlaveNodeInfoRequest) Reset()
func (*SlaveNodeInfoRequest) String ¶
func (x *SlaveNodeInfoRequest) String() string
type Type ¶
type Type int32
* enum Type is a type of ruling objects
func (Type) Descriptor ¶
func (Type) Descriptor() protoreflect.EnumDescriptor
func (Type) EnumDescriptor
deprecated
func (Type) Number ¶
func (x Type) Number() protoreflect.EnumNumber
func (Type) Type ¶
func (Type) Type() protoreflect.EnumType
type UnimplementedMasterNodeServer ¶
type UnimplementedMasterNodeServer struct { }
UnimplementedMasterNodeServer can be embedded to have forward compatible implementations.
func (*UnimplementedMasterNodeServer) UpdateNodeInfo ¶
func (*UnimplementedMasterNodeServer) UpdateNodeInfo(context.Context, *SlaveNodeInfoRequest) (*SimpleResult, error)
type WorkersData ¶
type WorkersData struct { Min uint32 `protobuf:"varint,1,opt,name=Min,proto3" json:"Min,omitempty"` // available minimum of number of workers Max uint32 `protobuf:"varint,2,opt,name=Max,proto3" json:"Max,omitempty"` // available maximum of number of workers Number uint32 `protobuf:"varint,3,opt,name=Number,proto3" json:"Number,omitempty"` // total number of workers right now Active uint32 `protobuf:"varint,4,opt,name=Active,proto3" json:"Active,omitempty"` // number of workers these are active right now // contains filtered or unexported fields }
* message WorkersData contents the information about workers for single manager
func (*WorkersData) Descriptor
deprecated
func (*WorkersData) Descriptor() ([]byte, []int)
Deprecated: Use WorkersData.ProtoReflect.Descriptor instead.
func (*WorkersData) GetActive ¶
func (x *WorkersData) GetActive() uint32
func (*WorkersData) GetMax ¶
func (x *WorkersData) GetMax() uint32
func (*WorkersData) GetMin ¶
func (x *WorkersData) GetMin() uint32
func (*WorkersData) GetNumber ¶
func (x *WorkersData) GetNumber() uint32
func (*WorkersData) ProtoMessage ¶
func (*WorkersData) ProtoMessage()
func (*WorkersData) ProtoReflect ¶
func (x *WorkersData) ProtoReflect() protoreflect.Message
func (*WorkersData) Reset ¶
func (x *WorkersData) Reset()
func (*WorkersData) String ¶
func (x *WorkersData) String() string