Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Record ¶
type Record struct { Ignore bool `json:"ignore" yaml:"ignore"` Key string `json:"key" yaml:"key"` Name string `json:"name" yaml:"name"` RetryAndSuccess int `json:"retry_and_success" yaml:"retry_and_success"` SuggestTimeout int `json:"suggest_timeout" yaml:"suggest_timeout"` UpdateTime int64 `json:"update_time" yaml:"update_time"` InspectTime int64 `json:"inspect_time" yaml:"inspect_time"` // contains filtered or unexported fields }
Record 记录单条job的历史记录
type Recorder ¶
type Recorder struct { Records []*Record `json:"records" yaml:"records"` // contains filtered or unexported fields }
Recorder 用于记录work中命令的历史表现, 以支持相应的分发或执行决策 数据可以保存在文件中, 并支持加载已存在的文件
type RecordersPool ¶
RecordersPool 提供一个池子来管理recorders, 可以用不同的key来区分不同的记录空间 例如以project为维度, 或以整台机器为维度
func NewRecordersPool ¶
func NewRecordersPool() *RecordersPool
NewRecordersPool get a new RecordersPool
func (*RecordersPool) GetRecorder ¶
func (rp *RecordersPool) GetRecorder(key string) (*Recorder, error)
GetRecorders 获取一个recorder, 若不在缓存中, 则从文件中读取或创建
Click to show internal directories.
Click to hide internal directories.