Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FuncRollback ¶
type FuncRollback struct { Name string Fn func() }
FuncRollback records function used to rolling back some operations. It is currently used by units' Init to release resources when failing in the half-way.
type FuncRollbackHolder ¶
type FuncRollbackHolder struct {
// contains filtered or unexported fields
}
FuncRollbackHolder holds some RollbackFuncs.
func NewRollbackHolder ¶
func NewRollbackHolder(owner string) *FuncRollbackHolder
NewRollbackHolder creates a new FuncRollbackHolder instance.
func (*FuncRollbackHolder) Add ¶
func (h *FuncRollbackHolder) Add(fn FuncRollback)
Add adds a func to the holder.
func (*FuncRollbackHolder) RollbackReverseOrder ¶
func (h *FuncRollbackHolder) RollbackReverseOrder()
RollbackReverseOrder executes rollback functions in reverse order.
Click to show internal directories.
Click to hide internal directories.