Documentation ¶
Index ¶
Constants ¶
View Source
const ( SUCCESS_SUFFIX = config.HISTORY_TAG + "__y" FAILURE_SUFFIX = config.HISTORY_TAG + "__n" SUCCESS_FILE = config.HISTORY_DIR + "/" + SUCCESS_SUFFIX FAILURE_FILE = config.HISTORY_DIR + "/" + FAILURE_SUFFIX )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Historier ¶
type Historier interface { ReadSuccess(provider string, inherit bool) // 读取成功记录 UpsertSuccess(string) bool // 更新或加入成功记录 HasSuccess(string) bool // 检查是否存在某条成功记录 FlushSuccess(provider string) // I/O输出成功记录,但不清缓存 ReadFailure(provider string, inherit bool) // 取出失败记录 PullFailure() map[string]*request.Request // 拉取失败记录并清空 UpsertFailure(*request.Request) bool // 更新或加入失败记录 DeleteFailure(*request.Request) // 删除失败记录 FlushFailure(provider string) // I/O输出失败记录,但不清缓存 Empty() // 清空缓存,但不输出 }
type Success ¶
func (*Success) HasSuccess ¶
func (*Success) UpsertSuccess ¶
更新或加入成功记录, 对比是否已存在,不存在就记录, 返回值表示是否有插入操作。
Click to show internal directories.
Click to hide internal directories.