ResourceModule

package
v0.0.0-...-c8d1825 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourceManager

type ResourceManager struct {
	core.MessageList                 // 消息列表
	Service          map[string]bool // 本机的所有服务组件的名称
	ServiceLock      sync.RWMutex
	SamplingRate     int // 采样频率

	LastAccess time.Time // 用户最后一次查看资源使用的时间
	// contains filtered or unexported fields
}

func (*ResourceManager) BeginWork

func (r *ResourceManager) BeginWork()

开始工作

func (*ResourceManager) DiskStatisticLoop

func (r *ResourceManager) DiskStatisticLoop(index int)

硬盘使用情况采集

func (*ResourceManager) Init

func (r *ResourceManager) Init()

初始化

func (*ResourceManager) OnForeseeMessage

func (r *ResourceManager) OnForeseeMessage(msg message.BaseMessage) (done bool)

偷窥消息

func (*ResourceManager) OnForeseeResponse

func (r *ResourceManager) OnForeseeResponse(rsp message.BaseResponse) (done bool)

偷窥消息的回应

func (*ResourceManager) OnProcessMessage

func (r *ResourceManager) OnProcessMessage(msg message.BaseMessage) (rsp message.BaseResponse, err error)

处理消息

func (*ResourceManager) OnProcessResponse

func (r *ResourceManager) OnProcessResponse(rsp message.BaseResponse)

处理消息的回应

func (*ResourceManager) StopWork

func (r *ResourceManager) StopWork()

停止工作

func (*ResourceManager) Uninit

func (r *ResourceManager) Uninit()

反初始化

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL