Documentation ¶
Index ¶
- Variables
- func RandomName() string
- type ResourceManager
- func (*ResourceManager) Exec(pool *util.PoolContainer, cmd scheduler.Command)
- func (r *ResourceManager) Register(pool util.GoroutinePool, name string, component util.Component) error
- func (r *ResourceManager) Reset()
- func (r *ResourceManager) Start()
- func (r *ResourceManager) Stop()
- func (r *ResourceManager) Unregister(name string)
Constants ¶
This section is empty.
Variables ¶
View Source
var InstanceResourceManager = NewResourceManger()
InstanceResourceManager is a local instance resource manager
Functions ¶
func RandomName ¶
func RandomName() string
RandomName is to get a random name for register pool. It is just for test.
Types ¶
type ResourceManager ¶
type ResourceManager struct {
// contains filtered or unexported fields
}
ResourceManager is a resource manager
func NewResourceManger ¶
func NewResourceManger() *ResourceManager
NewResourceManger is to create a new resource manager
func (*ResourceManager) Exec ¶
func (*ResourceManager) Exec(pool *util.PoolContainer, cmd scheduler.Command)
Exec is to executor the command from scheduler.
func (*ResourceManager) Register ¶
func (r *ResourceManager) Register(pool util.GoroutinePool, name string, component util.Component) error
Register is to register pool into resource manager
func (*ResourceManager) Reset ¶
func (r *ResourceManager) Reset()
Reset is to Reset resource manager. it is just for test.
func (*ResourceManager) Start ¶
func (r *ResourceManager) Start()
Start is to start resource manager
func (*ResourceManager) Unregister ¶
func (r *ResourceManager) Unregister(name string)
Unregister is to unregister pool into resource manager.
Click to show internal directories.
Click to hide internal directories.