Documentation ¶
Index ¶
- func Init(man ILockManager)
- func LockClass(ctx context.Context, manager ILockedClass, projectId string)
- func LockJointObject(ctx context.Context, model ILockedObject, model2 ILockedObject)
- func LockObject(ctx context.Context, model ILockedObject)
- func LockRawObject(ctx context.Context, resName string, resId string)
- func ReleaseClass(ctx context.Context, manager ILockedClass, projectId string)
- func ReleaseJointObject(ctx context.Context, model ILockedObject, model2 ILockedObject)
- func ReleaseObject(ctx context.Context, model ILockedObject)
- func ReleaseRawObject(ctx context.Context, resName string, resId string)
- type ElementInspectFunc
- type FIFO
- type ILockManager
- type ILockedClass
- type ILockedObject
- type SBaseLockManager
- func (m *SBaseLockManager) LockClass(ctx context.Context, manager ILockedClass, projectId string)
- func (m *SBaseLockManager) LockJointObject(ctx context.Context, model ILockedObject, model2 ILockedObject)
- func (m *SBaseLockManager) LockObject(ctx context.Context, model ILockedObject)
- func (m *SBaseLockManager) LockRawObject(ctx context.Context, resName string, resId string)
- func (m *SBaseLockManager) ReleaseClass(ctx context.Context, manager ILockedClass, projectId string)
- func (m *SBaseLockManager) ReleaseJointObject(ctx context.Context, model ILockedObject, model2 ILockedObject)
- func (m *SBaseLockManager) ReleaseObject(ctx context.Context, model ILockedObject)
- func (m *SBaseLockManager) ReleaseRawObject(ctx context.Context, resName string, resId string)
- type SEtcdLockManager
- type SEtcdLockManagerConfig
- type SEtcdLockRecord
- type SInMemoryLockManager
- type SInMemoryLockRecord
- type SLockTableIndex
- type SNoopLockManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(man ILockManager)
func LockJointObject ¶
func LockJointObject(ctx context.Context, model ILockedObject, model2 ILockedObject)
func LockObject ¶
func LockObject(ctx context.Context, model ILockedObject)
func ReleaseClass ¶
func ReleaseClass(ctx context.Context, manager ILockedClass, projectId string)
func ReleaseJointObject ¶
func ReleaseJointObject(ctx context.Context, model ILockedObject, model2 ILockedObject)
func ReleaseObject ¶
func ReleaseObject(ctx context.Context, model ILockedObject)
Types ¶
type ElementInspectFunc ¶
type ElementInspectFunc func(ele interface{})
type FIFO ¶
type FIFO struct {
// contains filtered or unexported fields
}
func (*FIFO) Enum ¶
func (f *FIFO) Enum(eif ElementInspectFunc)
type ILockManager ¶
type ILockManager interface { LockKey(ctx context.Context, key string) UnlockKey(ctx context.Context, key string) LockClass(ctx context.Context, manager ILockedClass, projectId string) ReleaseClass(ctx context.Context, manager ILockedClass, projectId string) LockObject(ctx context.Context, model ILockedObject) ReleaseObject(ctx context.Context, model ILockedObject) LockRawObject(ctx context.Context, resName string, resId string) ReleaseRawObject(ctx context.Context, resName string, resId string) LockJointObject(ctx context.Context, model ILockedObject, model2 ILockedObject) ReleaseJointObject(ctx context.Context, model ILockedObject, model2 ILockedObject) }
func NewEtcdLockManager ¶
func NewEtcdLockManager(config *SEtcdLockManagerConfig) (ILockManager, error)
func NewInMemoryLockManager ¶
func NewInMemoryLockManager() ILockManager
func NewNoopLockManager ¶
func NewNoopLockManager() ILockManager
type ILockedClass ¶
type ILockedClass interface {
Keyword() string
}
type ILockedObject ¶
type ILockedObject interface { ILockedClass GetId() string }
type SBaseLockManager ¶
type SBaseLockManager struct {
// contains filtered or unexported fields
}
func NewBaseLockManger ¶
func NewBaseLockManger(m ILockManager) *SBaseLockManager
func (*SBaseLockManager) LockClass ¶
func (m *SBaseLockManager) LockClass(ctx context.Context, manager ILockedClass, projectId string)
func (*SBaseLockManager) LockJointObject ¶
func (m *SBaseLockManager) LockJointObject(ctx context.Context, model ILockedObject, model2 ILockedObject)
func (*SBaseLockManager) LockObject ¶
func (m *SBaseLockManager) LockObject(ctx context.Context, model ILockedObject)
func (*SBaseLockManager) LockRawObject ¶
func (m *SBaseLockManager) LockRawObject(ctx context.Context, resName string, resId string)
func (*SBaseLockManager) ReleaseClass ¶
func (m *SBaseLockManager) ReleaseClass(ctx context.Context, manager ILockedClass, projectId string)
func (*SBaseLockManager) ReleaseJointObject ¶
func (m *SBaseLockManager) ReleaseJointObject(ctx context.Context, model ILockedObject, model2 ILockedObject)
func (*SBaseLockManager) ReleaseObject ¶
func (m *SBaseLockManager) ReleaseObject(ctx context.Context, model ILockedObject)
func (*SBaseLockManager) ReleaseRawObject ¶
func (m *SBaseLockManager) ReleaseRawObject(ctx context.Context, resName string, resId string)
type SEtcdLockManager ¶
type SEtcdLockManager struct { *SBaseLockManager // contains filtered or unexported fields }
type SEtcdLockManagerConfig ¶
type SEtcdLockRecord ¶
type SEtcdLockRecord struct {
// contains filtered or unexported fields
}
type SInMemoryLockManager ¶
type SInMemoryLockManager struct { *SBaseLockManager // contains filtered or unexported fields }
type SInMemoryLockRecord ¶
type SInMemoryLockRecord struct {
// contains filtered or unexported fields
}
type SLockTableIndex ¶
type SLockTableIndex struct {
// contains filtered or unexported fields
}
type SNoopLockManager ¶
type SNoopLockManager struct {
*SBaseLockManager
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.