Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IResource ¶
type IResource interface { GetType() string //获得资源类型 GetDeductionMoney(deductableMoney int) int //获得资源抵扣的金额 GetPrice() int //获得资源价格 GetPostage() int //获得资源的运费 IsAllocated() bool //设置资源已申请成功 ResetAllocation() //设置资源未申请 SetAllocated() //设置资源未申请 CanSplit() bool //是否可以切分给不同的supplier IsNeedLockWhenConsume() bool //在消费时是否需要加锁 GetLockName() string //获得加锁时的锁名 IsValid() error //验证资源是否合法 ToMap() map[string]interface{} //转换为map SaveForOrder(order IOrder) error //存储资源自身 GetRawResourceObject() interface{} }
type IResourceAllocator ¶
Click to show internal directories.
Click to hide internal directories.