Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FunctionMeta ¶
type FunctionMeta struct { Name string Replicas map[string]*Replica ExecEnvironmentPerReplica int //Cond variable to signal if someone is waiting for a VM to be created //CondLock *sync.Mutex //WaitingForVM *sync.Cond //below are fields required to call the fcdaemon grpc Image string EnvProcess string Labels *map[string]string Annotations *map[string]string EnvVars map[string]string GPUMemReq uint32 sync.RWMutex }
FunctionMeta stores metadata for this serverless function
func (*FunctionMeta) GetMaxReplicaCount ¶
func (m *FunctionMeta) GetMaxReplicaCount() int
GetMaxReplicaCount gets the maximum replica count for this function
func (*FunctionMeta) GetMinReplicaCount ¶
func (m *FunctionMeta) GetMinReplicaCount() int
GetMinReplicaCount gets the minimum replica count for this function
type GPUChosen ¶
type GPUChosen struct { AvAReply *mngrinfo.AvAManagerInfoReply GPUNode *GPUNode GPUIdx int }
GPUChosen contains info of chosen gpu and the node that the gpu is on
type GPUNode ¶
type GPUNode struct { sync.RWMutex GPUInfos []*GPUInfo AllocatedGPUResc map[string]*GPUResc IP string }
GPUNode contains gpu info for a gpu worker machine
type Node ¶
type Node struct { sync.RWMutex HostIP string NodeID string Conn *grpc.ClientConn Grpc fcdaemon.FcServiceClient TimesUsed uint32 //dont trust TotalCreated unless you are in loadbalance.go, since it's the only thing that updates this number TotalCreated uint32 }
Node contains the ip address of the node
func (*Node) RequestCreateReplica ¶
func (n *Node) RequestCreateReplica(req *fcdaemon.CreateRequest) (*fcdaemon.CreateReply, error)
RequestCreateReplica send the CreateRequest rpc and returns the replied ips this is sent to fcdaemon
type Replica ¶
type Replica struct { Vmid string IP string Function string IdleExecutionEnvs int Status VMStatus DeployNode *Node }
Replica contains the metadata state of serverless worker
type Resources ¶
type Resources struct { NodesLock sync.RWMutex Nodes []*Node //map of available nodes GPUMappingLock sync.RWMutex //protect the GPUChosen entry GpuMapping map[string]*GPUChosen //map between vmid to gpu uuid ReplicasLock sync.RWMutex Replicas map[string]*Replica //maps vmid to replica FunctionsLock sync.RWMutex Functions map[string]*FunctionMeta //maps function names to function meta Bypass bool NumWorkerPerGPU uint32 GPULock sync.RWMutex //protect the gpu nodes array GPUNodes []*GPUNode //map of available gpu nodes }
Resources contains all resources the resource manager manges
Click to show internal directories.
Click to hide internal directories.