lockman

package
v2.3.11+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2018 License: Apache-2.0 Imports: 6 Imported by: 40

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(man ILockManager)

func LockClass

func LockClass(ctx context.Context, manager ILockedClass, projectId string)

func LockJointObject

func LockJointObject(ctx context.Context, model ILockedObject, model2 ILockedObject)

func LockObject

func LockObject(ctx context.Context, model ILockedObject)

func LockRawObject

func LockRawObject(ctx context.Context, resName string, resId string)

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)

func ReleaseRawObject

func ReleaseRawObject(ctx context.Context, resName string, resId string)

Types

type ElementInspectFunc

type ElementInspectFunc func(ele interface{})

type FIFO

type FIFO struct {
	// contains filtered or unexported fields
}

func NewFIFO

func NewFIFO() *FIFO

func (*FIFO) Enum

func (f *FIFO) Enum(eif ElementInspectFunc)

func (*FIFO) Len

func (f *FIFO) Len() int

func (*FIFO) Pop

func (f *FIFO) Pop(ele interface{}) interface{}

func (*FIFO) Push

func (f *FIFO) Push(ele interface{})

type ILockManager

type ILockManager interface {
	LockKey(ctx context.Context, key string)
	UnlockKey(ctx context.Context, key string)
}

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 SInMemoryLockManager

type SInMemoryLockManager struct {
	// contains filtered or unexported fields
}

func (*SInMemoryLockManager) LockKey

func (lockman *SInMemoryLockManager) LockKey(ctx context.Context, key string)

func (*SInMemoryLockManager) UnlockKey

func (lockman *SInMemoryLockManager) UnlockKey(ctx context.Context, key string)

type SInMemoryLockRecord

type SInMemoryLockRecord struct {
	// contains filtered or unexported fields
}

type SNoopLockManager

type SNoopLockManager struct {
}

func (*SNoopLockManager) LockKey

func (lockman *SNoopLockManager) LockKey(ctx context.Context, key string)

func (*SNoopLockManager) UnlockKey

func (lockman *SNoopLockManager) UnlockKey(ctx context.Context, key string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL