Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResourceManager ¶
type ResourceManager struct {
// contains filtered or unexported fields
}
A ResourceManager is a manager that used to manage resources.
func NewResourceManager ¶
func NewResourceManager() *ResourceManager
NewResourceManager returns a ResourceManager.
func (*ResourceManager) Close ¶
func (manager *ResourceManager) Close() error
Close closes the manager. Don't use the ResourceManager after Close() called.
func (*ResourceManager) GetResource ¶
func (manager *ResourceManager) GetResource(key string, create func() (io.Closer, error)) (io.Closer, error)
GetResource returns the resource associated with given key.
Click to show internal directories.
Click to hide internal directories.