外观
bus_http API
模块说明
text
Authenticated small-value Bus HTTP/SSE transport, sharing the managed SDK.
This transport never follows redirects, resubmits effects, or consumes loopback
binary descriptors. Server identity and principal mapping remain Host-owned.RemoteBus
python
class RemoteBus(Bus)SDK 说明:
text
A remote EP with the same typed calls, scopes and recoverable projections.
``async with await RemoteBus.connect(url, token) as bus: ...`` owns the Host
session, heartbeat, SSE sources and transport. Use HTTPS for an untrusted
network. Large/binary values remain outside this small-value transport.RemoteBus.connect
python
@classmethod
async def connect(cls, url, token, *, timeout=5)RemoteBus.intent
python
def intent(self, *, idempotency_key, session, deadline)SDK 说明:
text
Freeze the original EP session even outside ``async with bus``.RemoteBus.call
python
async def call(self, member, *args, **options)RemoteBus.prepare_op
python
def prepare_op(self, member, *args, **options)RemoteBus.operation
python
async def operation(self, operation_id)SDK 说明:
text
Inspect the original durable receipt without replaying its effect.RemoteBus.close
python
async def close(self)RemoteBus.__aenter__
python
async def __aenter__(self)RemoteBus.__aexit__
python
async def __aexit__(self, kind, business, traceback)RemoteBus.__init__
python
def __init__(self, peer, registry=None)继承自 bus.Bus.__init__。
RemoteBus.watch
python
async def watch(self, member, *, snapshot_type, delta_type, major=1, provider=None)SDK 说明:
text
Open a Worker-owned atomic view after Host starts this active run.继承自 bus.Bus.watch。
RemoteBus.projection
python
async def projection(
self,
member,
*,
reducer,
snapshot_type,
delta_type,
major = 1,
provider = None,
)SDK 说明:
text
Open a display projection that automatically replaces invalid cursors.继承自 bus.Bus.projection。
RemoteBus.watch_async
python
def watch_async(self, member, **options)SDK 说明:
text
Stage an async callback taking one ViewUpdate, during on_init.继承自 bus.Bus.watch_async。
RemoteBus.watch_sync
python
def watch_sync(self, member, **options)SDK 说明:
text
Stage a synchronous callback; its thread is joined during drain.继承自 bus.Bus.watch_sync。
RemoteBus.provide
python
def provide(self, handler, **options)继承自 bus.Bus.provide。
RemoteBus.service
python
def service(self, name, **options)继承自 bus.Bus.service。
RemoteBus.read
python
def read(self, name, **options)继承自 bus.Bus.read。
RemoteBus.publish
python
def publish(self, name, **options)继承自 bus.Bus.publish。
RemoteBus.on_bus_data
python
def on_bus_data(self, name, **options)继承自 bus.Bus.on_bus_data。
RemoteBus.on_bus_data_async
python
def on_bus_data_async(self, name, **options)继承自 bus.Bus.on_bus_data_async。
RemoteBus.on_packet
python
def on_packet(self, packet_type, **options)继承自 bus.Bus.on_packet。
RemoteBus.on_packet_async
python
def on_packet_async(self, packet_type, **options)RemoteBus.stream_status
python
def stream_status(self)SDK 说明:
text
Return immutable stream snapshots, including local terminal reasons.RemoteBus.catalog
python
async def catalog(self)SDK 说明:
text
Get the Host's current visible directory; identities are Host-owned.继承自 bus.Bus.catalog。
RemoteBus.scopes
python
self.scopes公开实例属性,在 connect 中设置。