Documentation
¶
Index ¶
- Constants
- type WithEventSafeExecutor
- func (x *WithEventSafeExecutor) Close(ctx context.Context, e *events.Event) (err error)
- func (x *WithEventSafeExecutor) CreateWithVersion(ctx context.Context, e *events.Event, lockId string, version storage.Version, ...) (err error)
- func (x *WithEventSafeExecutor) DeleteWithVersion(ctx context.Context, e *events.Event, lockId string, ...) (err error)
- func (x *WithEventSafeExecutor) Get(ctx context.Context, e *events.Event, lockId string) (lockInformationJsonString string, err error)
- func (x *WithEventSafeExecutor) GetName(e *events.Event) (name string)
- func (x *WithEventSafeExecutor) GetTime(ctx context.Context, e *events.Event) (time time.Time, err error)
- func (x *WithEventSafeExecutor) Init(ctx context.Context, e *events.Event) (err error)
- func (x *WithEventSafeExecutor) List(ctx context.Context, e *events.Event) (iterator iterator.Iterator[*storage.LockInformation], err error)
- func (x *WithEventSafeExecutor) UpdateWithVersion(ctx context.Context, e *events.Event, lockId string, ...) (err error)
Constants ¶
View Source
const ( ActionStorageGetName = "Storage.GetName" ActionStorageInit = "Storage.Init" ActionStorageInitSuccess = "Storage.Init.Success" ActionStorageInitError = "Storage.Init.Error" ActionStorageUpdateWithVersion = "Storage.UpdateWithVersion" ActionStorageUpdateWithVersionSuccess = "Storage.UpdateWithVersion.Success" ActionStorageUpdateWithVersionError = "Storage.UpdateWithVersion.Error" ActionStorageUpdateWithVersionMiss = "Storage.UpdateWithVersion.Miss" ActionStorageCreateWithVersion = "Storage.CreateWithVersion" ActionStorageCreateWithVersionSuccess = "Storage.CreateWithVersion.Success" ActionStorageCreateWithVersionError = "Storage.CreateWithVersion.Error" ActionStorageCreateWithVersionMiss = "Storage.CreateWithVersion.Miss" ActionStorageDeleteWithVersion = "Storage.DeleteWithVersion" ActionStorageDeleteWithVersionSuccess = "Storage.DeleteWithVersion.Success" ActionStorageDeleteWithVersionError = "Storage.DeleteWithVersion.Error" ActionStorageDeleteWithVersionMiss = "Storage.DeleteWithVersion.Miss" ActionStorageGetTime = "Storage.GetTime" ActionStorageGetTimeSuccess = "Storage.GetTime.Success" ActionStorageGetTimeError = "Storage.GetTime.Error" ActionStorageGet = "Storage.Get" ActionStorageGetSuccess = "Storage.Get.Success" ActionStorageGetError = "Storage.Get.Error" ActionStorageClose = "Storage.Close" ActionStorageCloseSuccess = "Storage.Close.Success" ActionStorageCloseError = "Storage.Close.Error" ActionStorageList = "Storage.List" ActionStorageListSuccess = "Storage.List.Success" ActionStorageListError = "Storage.List.Error" )
用于统计Storage上的方法调用行为
View Source
const ( PayloadName = "name" PayloadIterator = "iterator" PayloadTime = "time" PayloadLockInformationJsonString = "lockInformationJsonString" PayloadLockId = "lockId" PayloadLockInformation = "lockInformation" PayloadVersion = "version" PayloadNewVersion = "newVersion" PayloadExceptedVersion = "exceptedVersion" )
action上的payload的名称,用于方便跟处理的时候统一
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WithEventSafeExecutor ¶
type WithEventSafeExecutor struct {
// contains filtered or unexported fields
}
WithEventSafeExecutor 带事件观测和recover的Storage执行器
func NewWithEventSafeExecutor ¶
func NewWithEventSafeExecutor(storage storage.Storage) *WithEventSafeExecutor
NewWithEventSafeExecutor 从给定的Storage创建一个执行器,后面就拿着这个执行器操作而不直接操作Storage了
func (*WithEventSafeExecutor) CreateWithVersion ¶ added in v0.0.2
func (*WithEventSafeExecutor) DeleteWithVersion ¶
func (*WithEventSafeExecutor) GetName ¶
func (x *WithEventSafeExecutor) GetName(e *events.Event) (name string)
func (*WithEventSafeExecutor) List ¶
func (x *WithEventSafeExecutor) List(ctx context.Context, e *events.Event) (iterator iterator.Iterator[*storage.LockInformation], err error)
func (*WithEventSafeExecutor) UpdateWithVersion ¶
Click to show internal directories.
Click to hide internal directories.