Documentation ¶
Overview ¶
Package master collects data from agents, and manage named network channels.
Index ¶
- func RunMaster(listenOn string, logDirectory string)
- type AgentInformation
- type DataCenter
- type MasterServer
- func (s *MasterServer) GetResources(ctx context.Context, in *pb.ComputeRequest) (*pb.AllocationResult, error)
- func (s *MasterServer) SendFlowExecutionStatus(stream pb.GleamMaster_SendFlowExecutionStatusServer) error
- func (s *MasterServer) SendHeartbeat(stream pb.GleamMaster_SendHeartbeatServer) error
- type Rack
- type Topology
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentInformation ¶
type AgentInformation struct { Location pb.Location LastHeartBeat time.Time Resource pb.ComputeResource Allocated pb.ComputeResource }
type DataCenter ¶
type DataCenter struct { sync.RWMutex Name string Racks map[string]*Rack Resource pb.ComputeResource Allocated pb.ComputeResource }
func NewDataCenter ¶
func NewDataCenter(name string) *DataCenter
func (*DataCenter) AddRack ¶
func (dc *DataCenter) AddRack(rack *Rack)
func (*DataCenter) GetRacks ¶
func (dc *DataCenter) GetRacks() (ret []*Rack)
type MasterServer ¶
type MasterServer struct { Topology *Topology // contains filtered or unexported fields }
func (*MasterServer) GetResources ¶
func (s *MasterServer) GetResources(ctx context.Context, in *pb.ComputeRequest) (*pb.AllocationResult, error)
func (*MasterServer) SendFlowExecutionStatus ¶
func (s *MasterServer) SendFlowExecutionStatus(stream pb.GleamMaster_SendFlowExecutionStatusServer) error
func (*MasterServer) SendHeartbeat ¶
func (s *MasterServer) SendHeartbeat(stream pb.GleamMaster_SendHeartbeatServer) error
type Rack ¶
type Rack struct { sync.RWMutex Name string Agents map[string]*AgentInformation Resource pb.ComputeResource Allocated pb.ComputeResource }
func (*Rack) AddAgent ¶
func (rack *Rack) AddAgent(a *AgentInformation)
func (*Rack) GetAgents ¶
func (rack *Rack) GetAgents() (ret []*AgentInformation)
type Topology ¶
type Topology struct { Resource pb.ComputeResource Allocated pb.ComputeResource sync.RWMutex DataCenters map[string]*DataCenter }
func NewTopology ¶
func NewTopology() *Topology
func (*Topology) AddDataCenter ¶
func (tp *Topology) AddDataCenter(dc *DataCenter)
func (*Topology) GetDataCenter ¶
func (tp *Topology) GetDataCenter(name string) (*DataCenter, bool)
func (*Topology) GetDataCenters ¶
func (tp *Topology) GetDataCenters() map[string]*DataCenter
func (*Topology) UpdateAgentInformation ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.