Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Closeable ¶
type Closeable interface {
io.Closer
SetOnCloseHandler(handler OnCloseHandler)
}
Closeable 可关闭对象
type CloseableObject ¶
CloseableObject 实现基础流程逻辑的关闭对象
func (*CloseableObject) SetOnCloseHandler ¶
func (c *CloseableObject) SetOnCloseHandler(handler OnCloseHandler)
SetOnCloseHandler 设置关闭时需要执行的句柄
type OnCloseHandler ¶
type OnCloseHandler interface {
// OnClosing 关闭前需要处理的事务,如果要拒绝继续关闭,返回false
OnClosing() bool
// OnClosed 关闭后的事务,仅当完毕完成才会执行此业务
OnClosed() error
}
OnCloseHandler 关闭的api接口
Click to show internal directories.
Click to hide internal directories.