Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /dislovelhl_enhanced-agent-bus /saga_persistence /redis /protocols.py
| """ | |
| Redis protocols for saga persistence. | |
| Constitutional Hash: 608508a9bd224290 | |
| """ | |
| from __future__ import annotations | |
| import builtins | |
| from typing import Protocol | |
| class SagaRedisPipelineProtocol(Protocol): | |
| """Subset of Redis pipeline API used by saga persistence.""" | |
| def hset(self, key: str, mapping: dict[str, str]) -> object: ... | |
| def srem(self, key: str, member: str) -> object: ... | |
| def sadd(self, key: str, member: str) -> object: ... | |
| def setex(self, key: str, ttl: int, value: str) -> object: ... | |
| def zadd(self, key: str, mapping: dict[str, float]) -> object: ... | |
| def expire(self, key: str, ttl: int) -> object: ... | |
| def delete(self, key: str) -> object: ... | |
| def lpush(self, key: str, value: str) -> object: ... | |
| async def execute(self) -> list[object]: ... | |
| class SagaRedisClientProtocol(Protocol): | |
| """Subset of async Redis client API used by saga persistence.""" | |
| async def hgetall(self, key: str) -> dict[str, str]: ... | |
| async def hset(self, key: str, mapping: dict[str, str]) -> object: ... | |
| async def exists(self, key: str) -> int: ... | |
| async def get(self, key: str) -> str | bytes | None: ... | |
| async def set( | |
| self, | |
| key: str, | |
| value: str, | |
| *, | |
| nx: bool | None = None, | |
| ex: int | None = None, | |
| ) -> object: ... | |
| async def setex(self, key: str, ttl: int, value: str) -> object: ... | |
| async def expire(self, key: str, ttl: int) -> object: ... | |
| async def delete(self, *keys: str) -> int: ... | |
| async def smembers(self, key: str) -> builtins.set[str | bytes]: ... | |
| async def scard(self, key: str) -> int: ... | |
| async def zrange(self, key: str, start: int, stop: int) -> list[str | bytes]: ... | |
| async def zrevrange(self, key: str, start: int, stop: int) -> list[str | bytes]: ... | |
| async def lrange(self, key: str, start: int, stop: int) -> list[str | bytes]: ... | |
| async def ping(self) -> object: ... | |
| def pipeline(self) -> SagaRedisPipelineProtocol: ... | |
Xet Storage Details
- Size:
- 2 kB
- Xet hash:
- 797fd363d7895809fb9696b7026ce2f4ec7791607f40e2588136162ced6b0550
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.