外观
packet_send API
模块说明
text
Prepared durable JSON packet submissions; admission is not dispatch evidence.PacketIntent
python
@dataclass(frozen=True)
class PacketIntentSDK 说明:
text
Owned immutable intent. Retain for reconciliation; never log packet data.该类型另有以下内部字段,参与数据类声明但不建议直接读写;创建对象时优先使用专题中的工厂方法:
python
_json: str = field(repr=False)PacketIntent.payload
python
def payload(self)PacketSubmissionError
python
class PacketSubmissionError(ProtocolError)PacketSubmissionError.__init__
python
def __init__(self, intent)PacketSubmissionError.intent
python
self.intent公开实例属性,在 __init__ 中设置。
PacketSubmissionTimeout
python
class PacketSubmissionTimeout(TimeoutError)PacketSubmissionTimeout.__init__
python
def __init__(self, intent)另继承外部类型 TimeoutError;其通用方法不在本 SDK 目录中重复展开。
PacketSubmissionTimeout.intent
python
self.intent公开实例属性,在 __init__ 中设置。
JSONPackets
python
class JSONPacketsSDK 说明:
text
Synchronous ThreadCalls bridge. No retry, cancellation or polling task.
submit_prepared returns only the admitted operation ID. Query that ID through
operations.get for dispatch evidence. A timeout retains the original key and
payload; it does not mean unsent. The host owns all authorization and fences.JSONPackets.__init__
python
def __init__(self, calls, session)JSONPackets.prepare
python
def prepare(self, packet_id, packet, *, idempotency_key, deadline)JSONPackets.submit_prepared
python
def submit_prepared(self, intent, *, timeout=10)JSONPackets.calls
python
self.calls公开实例属性,在 __init__ 中设置。
JSONPackets.session
python
self.session公开实例属性,在 __init__ 中设置。