外观
business API
模块说明
text
Persistent business results committed atomically with plugin state and intents.
An online service may expose begin/get through its own business API. This stores
no other plugin's data and never retries business callbacks or game effects.BusinessConflict
python
class BusinessConflict(ValueError)另继承外部类型 ValueError;其通用方法不在本 SDK 目录中重复展开。
Business
python
class BusinessBusiness.__init__
python
def __init__(self, storage)Business.once
python
async def once(self, business_key, prepare, *, keys=None)SDK 说明:
text
Retain one native service request, its state and complete child intents.
prepare(tx) must only prepare local state/actions synchronously. Matching
retries recover the original commit and IDs without running it again.Business.get
python
async def get(self, business_id)Business.begin
python
async def begin(self, business_id, request, *, keys=None)SDK 说明:
text
Read a transaction or its previous result. Conflict never reruns logic.Business.storage
python
self.storage公开实例属性,在 __init__ 中设置。
BusinessTransaction
python
class BusinessTransactionBusinessTransaction.__init__
python
def __init__(self, business, transaction, identity, key, digest, receipt)BusinessTransaction.commit
python
async def commit(self, result)BusinessTransaction.business
python
self.business公开实例属性,在 __init__ 中设置。
BusinessTransaction.state
python
self.state公开实例属性,在 __init__ 中设置。
BusinessTransaction.business_id
python
self.business_id公开实例属性,在 __init__ 中设置。
BusinessTransaction.key
python
self.key公开实例属性,在 __init__ 中设置。
BusinessTransaction.digest
python
self.digest公开实例属性,在 __init__ 中设置。
BusinessTransaction.receipt
python
self.receipt公开实例属性,在 __init__、commit 中设置。