diff --git a/.gitignore b/.gitignore index 31d70e5b..91f796a3 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,8 @@ criterion/ bench/results/*.csv bench/results/*.json .bench-venv/ + +# python +__pycache__/ +*.pyc +*.egg-info/ diff --git a/Makefile b/Makefile index 29abb755..aaccaa59 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: build release test fmt fmt-check clippy check clean docker-build docker-run \ release-patch release-minor release-major github-release \ publish publish-dry-run bench bench-core bench-protocol bench-compare bench-quick \ - helm-lint helm-template proto-gen proto-go + helm-lint helm-template proto-gen proto-go proto-py # extract the workspace version from the root Cargo.toml VERSION = $(shell sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml) @@ -138,6 +138,9 @@ proto-gen: proto-go: cd clients/ember-go && $(MAKE) proto-gen +proto-py: + cd clients/ember-py && $(MAKE) proto-gen + # --- helm --- helm-lint: diff --git a/clients/ember-py/Makefile b/clients/ember-py/Makefile new file mode 100644 index 00000000..55bacdf8 --- /dev/null +++ b/clients/ember-py/Makefile @@ -0,0 +1,21 @@ +.PHONY: proto-gen test install-dev clean + +proto-gen: + python -m grpc_tools.protoc \ + --python_out=ember/proto \ + --grpc_python_out=ember/proto \ + --proto_path=../../proto \ + ember/v1/ember.proto + # fix generated import path: ember.v1 -> ember.proto.ember.v1 + sed -i '' 's/from ember\.v1 import/from ember.proto.ember.v1 import/' \ + ember/proto/ember/v1/ember_pb2_grpc.py + +test: + pytest -v + +install-dev: + pip install -e ".[dev]" + +clean: + find . -type d -name __pycache__ -exec rm -rf {} + + find . -type f -name "*.pyc" -delete diff --git a/clients/ember-py/ember/__init__.py b/clients/ember-py/ember/__init__.py new file mode 100644 index 00000000..19e2d2c3 --- /dev/null +++ b/clients/ember-py/ember/__init__.py @@ -0,0 +1,5 @@ +"""ember-py: python client for the ember cache server over gRPC.""" + +from ember.client import EmberClient + +__all__ = ["EmberClient"] diff --git a/clients/ember-py/ember/client.py b/clients/ember-py/ember/client.py new file mode 100644 index 00000000..956a01d9 --- /dev/null +++ b/clients/ember-py/ember/client.py @@ -0,0 +1,344 @@ +"""High-level ember gRPC client for Python.""" + +from __future__ import annotations + +from typing import Optional + +import grpc + +from ember.proto.ember.v1 import ember_pb2, ember_pb2_grpc + + +class EmberClient: + """A gRPC client for the ember cache server. + + Usage:: + + client = EmberClient("localhost:6380") + client.set("key", b"value") + value = client.get("key") + client.close() + + Or as a context manager:: + + with EmberClient("localhost:6380") as client: + client.set("key", b"value") + """ + + def __init__(self, addr: str = "localhost:6380", password: str | None = None): + self._channel = grpc.insecure_channel(addr) + self._stub = ember_pb2_grpc.EmberCacheStub(self._channel) + self._password = password + + def __enter__(self): + return self + + def __exit__(self, *_): + self.close() + + def close(self): + """Close the underlying gRPC channel.""" + self._channel.close() + + def _metadata(self) -> list[tuple[str, str]]: + if self._password: + return [("authorization", self._password)] + return [] + + # --- strings --- + + def get(self, key: str) -> bytes | None: + """Get the value for a key, or None if it doesn't exist.""" + resp = self._stub.Get( + ember_pb2.GetRequest(key=key), + metadata=self._metadata(), + ) + if resp.HasField("value"): + return resp.value + return None + + def set( + self, + key: str, + value: bytes, + ex: int | None = None, + px: int | None = None, + nx: bool = False, + xx: bool = False, + ) -> bool: + """Set a key-value pair. Returns True if the key was set.""" + req = ember_pb2.SetRequest(key=key, value=value, nx=nx, xx=xx) + if px is not None: + req.expire_millis = px + elif ex is not None: + req.expire_seconds = ex + resp = self._stub.Set(req, metadata=self._metadata()) + return resp.ok + + def delete(self, *keys: str) -> int: + """Delete keys. Returns the number of keys removed.""" + resp = self._stub.Del( + ember_pb2.DelRequest(keys=list(keys)), + metadata=self._metadata(), + ) + return resp.deleted + + def exists(self, *keys: str) -> int: + """Returns the number of keys that exist.""" + resp = self._stub.Exists( + ember_pb2.ExistsRequest(keys=list(keys)), + metadata=self._metadata(), + ) + return resp.value + + def incr(self, key: str) -> int: + """Increment a key by 1. Returns the new value.""" + resp = self._stub.Incr( + ember_pb2.IncrRequest(key=key), + metadata=self._metadata(), + ) + return resp.value + + def incr_by(self, key: str, delta: int) -> int: + """Increment a key by delta. Returns the new value.""" + resp = self._stub.IncrBy( + ember_pb2.IncrByRequest(key=key, delta=delta), + metadata=self._metadata(), + ) + return resp.value + + def expire(self, key: str, seconds: int) -> bool: + """Set a timeout on a key. Returns True if the timeout was set.""" + resp = self._stub.Expire( + ember_pb2.ExpireRequest(key=key, seconds=seconds), + metadata=self._metadata(), + ) + return resp.value + + def ttl(self, key: str) -> int: + """Returns remaining TTL in seconds. -1 = no expiry, -2 = not found.""" + resp = self._stub.Ttl( + ember_pb2.TtlRequest(key=key), + metadata=self._metadata(), + ) + return resp.value + + # --- lists --- + + def lpush(self, key: str, *values: bytes) -> int: + """Prepend values to a list. Returns the new length.""" + resp = self._stub.LPush( + ember_pb2.LPushRequest(key=key, values=list(values)), + metadata=self._metadata(), + ) + return resp.value + + def rpush(self, key: str, *values: bytes) -> int: + """Append values to a list. Returns the new length.""" + resp = self._stub.RPush( + ember_pb2.RPushRequest(key=key, values=list(values)), + metadata=self._metadata(), + ) + return resp.value + + def lpop(self, key: str) -> bytes | None: + """Remove and return the first element, or None if empty.""" + resp = self._stub.LPop( + ember_pb2.LPopRequest(key=key), + metadata=self._metadata(), + ) + if resp.HasField("value"): + return resp.value + return None + + def rpop(self, key: str) -> bytes | None: + """Remove and return the last element, or None if empty.""" + resp = self._stub.RPop( + ember_pb2.RPopRequest(key=key), + metadata=self._metadata(), + ) + if resp.HasField("value"): + return resp.value + return None + + def lrange(self, key: str, start: int, stop: int) -> list[bytes]: + """Return elements in the given range.""" + resp = self._stub.LRange( + ember_pb2.LRangeRequest(key=key, start=start, stop=stop), + metadata=self._metadata(), + ) + return list(resp.values) + + def llen(self, key: str) -> int: + """Return the length of a list.""" + resp = self._stub.LLen( + ember_pb2.LLenRequest(key=key), + metadata=self._metadata(), + ) + return resp.value + + # --- hashes --- + + def hset(self, key: str, fields: dict[str, bytes]) -> int: + """Set fields in a hash. Returns the number of new fields.""" + fvs = [ + ember_pb2.FieldValue(field=f, value=v) + for f, v in fields.items() + ] + resp = self._stub.HSet( + ember_pb2.HSetRequest(key=key, fields=fvs), + metadata=self._metadata(), + ) + return resp.value + + def hget(self, key: str, field: str) -> bytes | None: + """Get a field from a hash, or None if it doesn't exist.""" + resp = self._stub.HGet( + ember_pb2.HGetRequest(key=key, field=field), + metadata=self._metadata(), + ) + if resp.HasField("value"): + return resp.value + return None + + def hgetall(self, key: str) -> dict[str, bytes]: + """Return all fields and values in a hash.""" + resp = self._stub.HGetAll( + ember_pb2.HGetAllRequest(key=key), + metadata=self._metadata(), + ) + return {fv.field: fv.value for fv in resp.fields} + + def hdel(self, key: str, *fields: str) -> int: + """Remove fields from a hash. Returns the number removed.""" + resp = self._stub.HDel( + ember_pb2.HDelRequest(key=key, fields=list(fields)), + metadata=self._metadata(), + ) + return resp.value + + # --- sets --- + + def sadd(self, key: str, *members: str) -> int: + """Add members to a set. Returns the number of new members.""" + resp = self._stub.SAdd( + ember_pb2.SAddRequest(key=key, members=list(members)), + metadata=self._metadata(), + ) + return resp.value + + def smembers(self, key: str) -> set[str]: + """Return all members of a set.""" + resp = self._stub.SMembers( + ember_pb2.SMembersRequest(key=key), + metadata=self._metadata(), + ) + return set(resp.keys) + + def scard(self, key: str) -> int: + """Return the number of members in a set.""" + resp = self._stub.SCard( + ember_pb2.SCardRequest(key=key), + metadata=self._metadata(), + ) + return resp.value + + # --- sorted sets --- + + def zadd(self, key: str, members: dict[str, float]) -> int: + """Add members with scores to a sorted set. Returns the number added.""" + sm = [ + ember_pb2.ScoreMember(score=score, member=member) + for member, score in members.items() + ] + resp = self._stub.ZAdd( + ember_pb2.ZAddRequest(key=key, members=sm), + metadata=self._metadata(), + ) + return resp.value + + def zrange( + self, key: str, start: int, stop: int, with_scores: bool = False + ) -> list[tuple[str, float]]: + """Return members in a sorted set within the given rank range.""" + resp = self._stub.ZRange( + ember_pb2.ZRangeRequest( + key=key, start=start, stop=stop, with_scores=with_scores, + ), + metadata=self._metadata(), + ) + return [(m.member, m.score) for m in resp.members] + + # --- vectors --- + + def vadd( + self, + key: str, + element: str, + vector: list[float], + metric: str = "cosine", + m: int = 16, + ef: int = 64, + ) -> bool: + """Add a vector to a vector set. Returns True if newly added. + + The vector is sent as packed IEEE 754 floats — no string parsing. + """ + metric_map = { + "cosine": ember_pb2.VECTOR_METRIC_COSINE, + "euclidean": ember_pb2.VECTOR_METRIC_EUCLIDEAN, + "ip": ember_pb2.VECTOR_METRIC_INNER_PRODUCT, + } + resp = self._stub.VAdd( + ember_pb2.VAddRequest( + key=key, + element=element, + vector=vector, + metric=metric_map.get(metric, ember_pb2.VECTOR_METRIC_COSINE), + connectivity=m, + ef_construction=ef, + ), + metadata=self._metadata(), + ) + return resp.value + + def vsim( + self, + key: str, + query: list[float], + count: int = 10, + ef_search: int | None = None, + ) -> list[tuple[str, float]]: + """Search for nearest neighbors. Returns (element, distance) pairs.""" + req = ember_pb2.VSimRequest(key=key, query=query, count=count) + if ef_search is not None: + req.ef_search = ef_search + resp = self._stub.VSim(req, metadata=self._metadata()) + return [(r.element, r.distance) for r in resp.results] + + # --- server --- + + def ping(self) -> str: + """Send PING, returns 'PONG' (or echo message).""" + resp = self._stub.Ping( + ember_pb2.PingRequest(), + metadata=self._metadata(), + ) + return resp.message + + def flushdb(self, async_mode: bool = False) -> None: + """Remove all keys.""" + # field name in proto is `async` which is a reserved word in python, + # so protobuf generates it as `async_` or we use the kwargs approach + self._stub.FlushDb( + ember_pb2.FlushDbRequest(**{"async": async_mode}), + metadata=self._metadata(), + ) + + def dbsize(self) -> int: + """Return the total number of keys.""" + resp = self._stub.DbSize( + ember_pb2.DbSizeRequest(), + metadata=self._metadata(), + ) + return resp.value diff --git a/clients/ember-py/ember/proto/__init__.py b/clients/ember-py/ember/proto/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/clients/ember-py/ember/proto/ember/__init__.py b/clients/ember-py/ember/proto/ember/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/clients/ember-py/ember/proto/ember/v1/__init__.py b/clients/ember-py/ember/proto/ember/v1/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/clients/ember-py/ember/proto/ember/v1/ember_pb2.py b/clients/ember-py/ember/proto/ember/v1/ember_pb2.py new file mode 100644 index 00000000..3304b6ae --- /dev/null +++ b/clients/ember-py/ember/proto/ember/v1/ember_pb2.py @@ -0,0 +1,231 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: ember/v1/ember.proto +# Protobuf Python Version: 6.31.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 6, + 31, + 1, + '', + 'ember/v1/ember.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x14\x65mber/v1/ember.proto\x12\x08\x65mber.v1\"\x1c\n\x0bIntResponse\x12\r\n\x05value\x18\x01 \x01(\x03\"\x1d\n\x0c\x42oolResponse\x12\r\n\x05value\x18\x01 \x01(\x08\"\x1e\n\rFloatResponse\x12\r\n\x05value\x18\x01 \x01(\t\" \n\x0eStatusResponse\x12\x0e\n\x06status\x18\x01 \x01(\t\"\x19\n\nGetRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"+\n\x0bGetResponse\x12\x12\n\x05value\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\x08\n\x06_value\"o\n\nSetRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\x12\x16\n\x0e\x65xpire_seconds\x18\x03 \x01(\x04\x12\x15\n\rexpire_millis\x18\x04 \x01(\x04\x12\n\n\x02nx\x18\x05 \x01(\x08\x12\n\n\x02xx\x18\x06 \x01(\x08\"\x19\n\x0bSetResponse\x12\n\n\x02ok\x18\x01 \x01(\x08\"\x1a\n\nDelRequest\x12\x0c\n\x04keys\x18\x01 \x03(\t\"\x1e\n\x0b\x44\x65lResponse\x12\x0f\n\x07\x64\x65leted\x18\x01 \x01(\x03\"\x1b\n\x0bMGetRequest\x12\x0c\n\x04keys\x18\x01 \x03(\t\"7\n\x0cMGetResponse\x12\'\n\x06values\x18\x01 \x03(\x0b\x32\x17.ember.v1.OptionalValue\"-\n\rOptionalValue\x12\x12\n\x05value\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\x08\n\x06_value\"0\n\x0bMSetRequest\x12!\n\x05pairs\x18\x01 \x03(\x0b\x32\x12.ember.v1.KeyValue\"&\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x0e\n\x0cMSetResponse\"\x1a\n\x0bIncrRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"+\n\rIncrByRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x02 \x01(\x03\"+\n\rDecrByRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x02 \x01(\x03\"0\n\x12IncrByFloatRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x02 \x01(\x01\"+\n\rAppendRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x1c\n\rStrlenRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x1d\n\rExistsRequest\x12\x0c\n\x04keys\x18\x01 \x03(\t\"-\n\rExpireRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0f\n\x07seconds\x18\x02 \x01(\x04\"3\n\x0ePExpireRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x14\n\x0cmilliseconds\x18\x02 \x01(\x04\"\x1d\n\x0ePersistRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x19\n\nTtlRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x1a\n\x0bPTtlRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x1c\n\x0bTtlResponse\x12\r\n\x05value\x18\x01 \x01(\x03\"\x1a\n\x0bTypeRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"!\n\x0cTypeResponse\x12\x11\n\ttype_name\x18\x01 \x01(\t\"\x1e\n\x0bKeysRequest\x12\x0f\n\x07pattern\x18\x01 \x01(\t\"\x1c\n\x0cKeysResponse\x12\x0c\n\x04keys\x18\x01 \x03(\t\"-\n\rRenameRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0f\n\x07new_key\x18\x02 \x01(\t\"N\n\x0bScanRequest\x12\x0e\n\x06\x63ursor\x18\x01 \x01(\x04\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\x14\n\x07pattern\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_pattern\",\n\x0cScanResponse\x12\x0e\n\x06\x63ursor\x18\x01 \x01(\x04\x12\x0c\n\x04keys\x18\x02 \x03(\t\"+\n\x0cLPushRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0e\n\x06values\x18\x02 \x03(\x0c\"+\n\x0cRPushRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0e\n\x06values\x18\x02 \x03(\x0c\"\x1a\n\x0bLPopRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x1a\n\x0bRPopRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"9\n\rLRangeRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05start\x18\x02 \x01(\x03\x12\x0c\n\x04stop\x18\x03 \x01(\x03\"\x1f\n\rArrayResponse\x12\x0e\n\x06values\x18\x01 \x03(\x0c\"\x1a\n\x0bLLenRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"@\n\x0bHSetRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12$\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x14.ember.v1.FieldValue\"*\n\nFieldValue\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\")\n\x0bHGetRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05\x66ield\x18\x02 \x01(\t\"\x1d\n\x0eHGetAllRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"4\n\x0cHashResponse\x12$\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x14.ember.v1.FieldValue\"*\n\x0bHDelRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0e\n\x06\x66ields\x18\x02 \x03(\t\",\n\x0eHExistsRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05\x66ield\x18\x02 \x01(\t\"\x1a\n\x0bHLenRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\";\n\x0eHIncrByRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05\x66ield\x18\x02 \x01(\t\x12\r\n\x05\x64\x65lta\x18\x03 \x01(\x03\"\x1b\n\x0cHKeysRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x1b\n\x0cHValsRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"+\n\x0cHMGetRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0e\n\x06\x66ields\x18\x02 \x03(\t\"@\n\x15OptionalArrayResponse\x12\'\n\x06values\x18\x01 \x03(\x0b\x32\x17.ember.v1.OptionalValue\"+\n\x0bSAddRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0f\n\x07members\x18\x02 \x03(\t\"+\n\x0bSRemRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0f\n\x07members\x18\x02 \x03(\t\"\x1e\n\x0fSMembersRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"/\n\x10SIsMemberRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0e\n\x06member\x18\x02 \x01(\t\"\x1b\n\x0cSCardRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"~\n\x0bZAddRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x07members\x18\x02 \x03(\x0b\x32\x15.ember.v1.ScoreMember\x12\n\n\x02nx\x18\x03 \x01(\x08\x12\n\n\x02xx\x18\x04 \x01(\x08\x12\n\n\x02gt\x18\x05 \x01(\x08\x12\n\n\x02lt\x18\x06 \x01(\x08\x12\n\n\x02\x63h\x18\x07 \x01(\x08\",\n\x0bScoreMember\x12\r\n\x05score\x18\x01 \x01(\x01\x12\x0e\n\x06member\x18\x02 \x01(\t\"+\n\x0bZRemRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0f\n\x07members\x18\x02 \x03(\t\",\n\rZScoreRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0e\n\x06member\x18\x02 \x01(\t\"5\n\x15OptionalFloatResponse\x12\x12\n\x05value\x18\x01 \x01(\x01H\x00\x88\x01\x01\x42\x08\n\x06_value\"+\n\x0cZRankRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0e\n\x06member\x18\x02 \x01(\t\"3\n\x13OptionalIntResponse\x12\x12\n\x05value\x18\x01 \x01(\x03H\x00\x88\x01\x01\x42\x08\n\x06_value\"\x1b\n\x0cZCardRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"N\n\rZRangeRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05start\x18\x02 \x01(\x03\x12\x0c\n\x04stop\x18\x03 \x01(\x03\x12\x13\n\x0bwith_scores\x18\x04 \x01(\x08\"8\n\x0eZRangeResponse\x12&\n\x07members\x18\x01 \x03(\x0b\x32\x15.ember.v1.ScoreMember\"\xf9\x01\n\x0bVAddRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0f\n\x07\x65lement\x18\x02 \x01(\t\x12\x12\n\x06vector\x18\x03 \x03(\x02\x42\x02\x10\x01\x12&\n\x06metric\x18\x04 \x01(\x0e\x32\x16.ember.v1.VectorMetric\x12\x32\n\x0cquantization\x18\x05 \x01(\x0e\x32\x1c.ember.v1.VectorQuantization\x12\x19\n\x0c\x63onnectivity\x18\x06 \x01(\rH\x00\x88\x01\x01\x12\x1c\n\x0f\x65\x66_construction\x18\x07 \x01(\rH\x01\x88\x01\x01\x42\x0f\n\r_connectivityB\x12\n\x10_ef_construction\"b\n\x0bVSimRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x11\n\x05query\x18\x02 \x03(\x02\x42\x02\x10\x01\x12\r\n\x05\x63ount\x18\x03 \x01(\r\x12\x16\n\tef_search\x18\x04 \x01(\rH\x00\x88\x01\x01\x42\x0c\n\n_ef_search\"5\n\x0cVSimResponse\x12%\n\x07results\x18\x01 \x03(\x0b\x32\x14.ember.v1.VSimResult\"/\n\nVSimResult\x12\x0f\n\x07\x65lement\x18\x01 \x01(\t\x12\x10\n\x08\x64istance\x18\x02 \x01(\x02\"+\n\x0bVRemRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0f\n\x07\x65lement\x18\x02 \x01(\t\"+\n\x0bVGetRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x0f\n\x07\x65lement\x18\x02 \x01(\t\"B\n\x0cVGetResponse\x12\x13\n\x06\x65xists\x18\x01 \x01(\x08H\x00\x88\x01\x01\x12\x12\n\x06vector\x18\x02 \x03(\x02\x42\x02\x10\x01\x42\t\n\x07_exists\"\x1b\n\x0cVCardRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x1a\n\x0bVDimRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x1b\n\x0cVInfoRequest\x12\x0b\n\x03key\x18\x01 \x01(\t\"C\n\rVInfoResponse\x12\x0e\n\x06\x65xists\x18\x01 \x01(\x08\x12\"\n\x04info\x18\x02 \x03(\x0b\x32\x14.ember.v1.FieldValue\"/\n\x0bPingRequest\x12\x14\n\x07message\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_message\"\x1f\n\x0cPingResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\"\x1f\n\x0e\x46lushDbRequest\x12\r\n\x05\x61sync\x18\x01 \x01(\x08\"\x0f\n\rDbSizeRequest\"/\n\x0bInfoRequest\x12\x14\n\x07section\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_section\"\x1c\n\x0cInfoResponse\x12\x0c\n\x04info\x18\x01 \x01(\t\"\xff\x12\n\x0fPipelineRequest\x12\n\n\x02id\x18\x01 \x01(\x04\x12#\n\x03get\x18\x02 \x01(\x0b\x32\x14.ember.v1.GetRequestH\x00\x12#\n\x03set\x18\x03 \x01(\x0b\x32\x14.ember.v1.SetRequestH\x00\x12#\n\x03\x64\x65l\x18\x04 \x01(\x0b\x32\x14.ember.v1.DelRequestH\x00\x12)\n\x06\x65xists\x18\x05 \x01(\x0b\x32\x17.ember.v1.ExistsRequestH\x00\x12%\n\x04incr\x18\x06 \x01(\x0b\x32\x15.ember.v1.IncrRequestH\x00\x12*\n\x07incr_by\x18\x07 \x01(\x0b\x32\x17.ember.v1.IncrByRequestH\x00\x12*\n\x07\x64\x65\x63r_by\x18\x08 \x01(\x0b\x32\x17.ember.v1.DecrByRequestH\x00\x12\x35\n\rincr_by_float\x18\t \x01(\x0b\x32\x1c.ember.v1.IncrByFloatRequestH\x00\x12)\n\x06\x61ppend\x18\n \x01(\x0b\x32\x17.ember.v1.AppendRequestH\x00\x12)\n\x06strlen\x18\x0b \x01(\x0b\x32\x17.ember.v1.StrlenRequestH\x00\x12)\n\x06\x65xpire\x18\x0c \x01(\x0b\x32\x17.ember.v1.ExpireRequestH\x00\x12+\n\x07pexpire\x18\r \x01(\x0b\x32\x18.ember.v1.PExpireRequestH\x00\x12+\n\x07persist\x18\x0e \x01(\x0b\x32\x18.ember.v1.PersistRequestH\x00\x12#\n\x03ttl\x18\x0f \x01(\x0b\x32\x14.ember.v1.TtlRequestH\x00\x12%\n\x04pttl\x18\x10 \x01(\x0b\x32\x15.ember.v1.PTtlRequestH\x00\x12%\n\x04type\x18\x11 \x01(\x0b\x32\x15.ember.v1.TypeRequestH\x00\x12\'\n\x05lpush\x18\x12 \x01(\x0b\x32\x16.ember.v1.LPushRequestH\x00\x12\'\n\x05rpush\x18\x13 \x01(\x0b\x32\x16.ember.v1.RPushRequestH\x00\x12%\n\x04lpop\x18\x14 \x01(\x0b\x32\x15.ember.v1.LPopRequestH\x00\x12%\n\x04rpop\x18\x15 \x01(\x0b\x32\x15.ember.v1.RPopRequestH\x00\x12)\n\x06lrange\x18\x16 \x01(\x0b\x32\x17.ember.v1.LRangeRequestH\x00\x12%\n\x04llen\x18\x17 \x01(\x0b\x32\x15.ember.v1.LLenRequestH\x00\x12%\n\x04hset\x18\x18 \x01(\x0b\x32\x15.ember.v1.HSetRequestH\x00\x12%\n\x04hget\x18\x19 \x01(\x0b\x32\x15.ember.v1.HGetRequestH\x00\x12+\n\x07hgetall\x18\x1a \x01(\x0b\x32\x18.ember.v1.HGetAllRequestH\x00\x12%\n\x04hdel\x18\x1b \x01(\x0b\x32\x15.ember.v1.HDelRequestH\x00\x12+\n\x07hexists\x18\x1c \x01(\x0b\x32\x18.ember.v1.HExistsRequestH\x00\x12%\n\x04hlen\x18\x1d \x01(\x0b\x32\x15.ember.v1.HLenRequestH\x00\x12,\n\x08hincr_by\x18\x1e \x01(\x0b\x32\x18.ember.v1.HIncrByRequestH\x00\x12\'\n\x05hkeys\x18\x1f \x01(\x0b\x32\x16.ember.v1.HKeysRequestH\x00\x12\'\n\x05hvals\x18 \x01(\x0b\x32\x16.ember.v1.HValsRequestH\x00\x12\'\n\x05hmget\x18! \x01(\x0b\x32\x16.ember.v1.HMGetRequestH\x00\x12%\n\x04sadd\x18\" \x01(\x0b\x32\x15.ember.v1.SAddRequestH\x00\x12%\n\x04srem\x18# \x01(\x0b\x32\x15.ember.v1.SRemRequestH\x00\x12-\n\x08smembers\x18$ \x01(\x0b\x32\x19.ember.v1.SMembersRequestH\x00\x12/\n\tsismember\x18% \x01(\x0b\x32\x1a.ember.v1.SIsMemberRequestH\x00\x12\'\n\x05scard\x18& \x01(\x0b\x32\x16.ember.v1.SCardRequestH\x00\x12%\n\x04zadd\x18\' \x01(\x0b\x32\x15.ember.v1.ZAddRequestH\x00\x12%\n\x04zrem\x18( \x01(\x0b\x32\x15.ember.v1.ZRemRequestH\x00\x12)\n\x06zscore\x18) \x01(\x0b\x32\x17.ember.v1.ZScoreRequestH\x00\x12\'\n\x05zrank\x18* \x01(\x0b\x32\x16.ember.v1.ZRankRequestH\x00\x12\'\n\x05zcard\x18+ \x01(\x0b\x32\x16.ember.v1.ZCardRequestH\x00\x12)\n\x06zrange\x18, \x01(\x0b\x32\x17.ember.v1.ZRangeRequestH\x00\x12%\n\x04vadd\x18- \x01(\x0b\x32\x15.ember.v1.VAddRequestH\x00\x12%\n\x04vsim\x18. \x01(\x0b\x32\x15.ember.v1.VSimRequestH\x00\x12%\n\x04vrem\x18/ \x01(\x0b\x32\x15.ember.v1.VRemRequestH\x00\x12%\n\x04vget\x18\x30 \x01(\x0b\x32\x15.ember.v1.VGetRequestH\x00\x12\'\n\x05vcard\x18\x31 \x01(\x0b\x32\x16.ember.v1.VCardRequestH\x00\x12%\n\x04vdim\x18\x32 \x01(\x0b\x32\x15.ember.v1.VDimRequestH\x00\x12\'\n\x05vinfo\x18\x33 \x01(\x0b\x32\x16.ember.v1.VInfoRequestH\x00\x12%\n\x04ping\x18\x34 \x01(\x0b\x32\x15.ember.v1.PingRequestH\x00\x12+\n\x07\x66lushdb\x18\x35 \x01(\x0b\x32\x18.ember.v1.FlushDbRequestH\x00\x12)\n\x06\x64\x62size\x18\x36 \x01(\x0b\x32\x17.ember.v1.DbSizeRequestH\x00\x12%\n\x04mget\x18\x37 \x01(\x0b\x32\x15.ember.v1.MGetRequestH\x00\x12%\n\x04mset\x18\x38 \x01(\x0b\x32\x15.ember.v1.MSetRequestH\x00\x12%\n\x04keys\x18\x39 \x01(\x0b\x32\x15.ember.v1.KeysRequestH\x00\x12)\n\x06rename\x18: \x01(\x0b\x32\x17.ember.v1.RenameRequestH\x00\x12%\n\x04scan\x18; \x01(\x0b\x32\x15.ember.v1.ScanRequestH\x00\x42\t\n\x07\x63ommand\"\xd7\x08\n\x10PipelineResponse\x12\n\n\x02id\x18\x01 \x01(\x04\x12$\n\x03get\x18\x02 \x01(\x0b\x32\x15.ember.v1.GetResponseH\x00\x12$\n\x03set\x18\x03 \x01(\x0b\x32\x15.ember.v1.SetResponseH\x00\x12$\n\x03\x64\x65l\x18\x04 \x01(\x0b\x32\x15.ember.v1.DelResponseH\x00\x12(\n\x07int_val\x18\x05 \x01(\x0b\x32\x15.ember.v1.IntResponseH\x00\x12*\n\x08\x62ool_val\x18\x06 \x01(\x0b\x32\x16.ember.v1.BoolResponseH\x00\x12,\n\tfloat_val\x18\x07 \x01(\x0b\x32\x17.ember.v1.FloatResponseH\x00\x12*\n\x06status\x18\x08 \x01(\x0b\x32\x18.ember.v1.StatusResponseH\x00\x12$\n\x03ttl\x18\t \x01(\x0b\x32\x15.ember.v1.TtlResponseH\x00\x12&\n\x04type\x18\n \x01(\x0b\x32\x16.ember.v1.TypeResponseH\x00\x12(\n\x05\x61rray\x18\x0b \x01(\x0b\x32\x17.ember.v1.ArrayResponseH\x00\x12&\n\x04hash\x18\x0c \x01(\x0b\x32\x16.ember.v1.HashResponseH\x00\x12\x39\n\x0eoptional_array\x18\r \x01(\x0b\x32\x1f.ember.v1.OptionalArrayResponseH\x00\x12&\n\x04keys\x18\x0e \x01(\x0b\x32\x16.ember.v1.KeysResponseH\x00\x12&\n\x04scan\x18\x0f \x01(\x0b\x32\x16.ember.v1.ScanResponseH\x00\x12\x39\n\x0eoptional_float\x18\x10 \x01(\x0b\x32\x1f.ember.v1.OptionalFloatResponseH\x00\x12\x35\n\x0coptional_int\x18\x11 \x01(\x0b\x32\x1d.ember.v1.OptionalIntResponseH\x00\x12*\n\x06zrange\x18\x12 \x01(\x0b\x32\x18.ember.v1.ZRangeResponseH\x00\x12&\n\x04vsim\x18\x13 \x01(\x0b\x32\x16.ember.v1.VSimResponseH\x00\x12&\n\x04vget\x18\x14 \x01(\x0b\x32\x16.ember.v1.VGetResponseH\x00\x12(\n\x05vinfo\x18\x15 \x01(\x0b\x32\x17.ember.v1.VInfoResponseH\x00\x12&\n\x04mget\x18\x16 \x01(\x0b\x32\x16.ember.v1.MGetResponseH\x00\x12&\n\x04mset\x18\x17 \x01(\x0b\x32\x16.ember.v1.MSetResponseH\x00\x12&\n\x04ping\x18\x18 \x01(\x0b\x32\x16.ember.v1.PingResponseH\x00\x12(\n\x05\x65rror\x18\x19 \x01(\x0b\x32\x17.ember.v1.ErrorResponseH\x00\x12&\n\x04info\x18\x1a \x01(\x0b\x32\x16.ember.v1.InfoResponseH\x00\x42\x08\n\x06result\"C\n\rErrorResponse\x12\x0f\n\x07message\x18\x01 \x01(\t\x12!\n\x04kind\x18\x02 \x01(\x0e\x32\x13.ember.v1.ErrorKind*f\n\x0cVectorMetric\x12\x18\n\x14VECTOR_METRIC_COSINE\x10\x00\x12\x1b\n\x17VECTOR_METRIC_EUCLIDEAN\x10\x01\x12\x1f\n\x1bVECTOR_METRIC_INNER_PRODUCT\x10\x02*k\n\x12VectorQuantization\x12\x1c\n\x18VECTOR_QUANTIZATION_NONE\x10\x00\x12\x1b\n\x17VECTOR_QUANTIZATION_F16\x10\x01\x12\x1a\n\x16VECTOR_QUANTIZATION_I8\x10\x02*\x9a\x01\n\tErrorKind\x12\x1a\n\x16\x45RROR_KIND_UNSPECIFIED\x10\x00\x12\x19\n\x15\x45RROR_KIND_WRONG_TYPE\x10\x01\x12\x1c\n\x18\x45RROR_KIND_OUT_OF_MEMORY\x10\x02\x12\x17\n\x13\x45RROR_KIND_INTERNAL\x10\x03\x12\x1f\n\x1b\x45RROR_KIND_INVALID_ARGUMENT\x10\x04\x32\x81\x1b\n\nEmberCache\x12\x32\n\x03Get\x12\x14.ember.v1.GetRequest\x1a\x15.ember.v1.GetResponse\x12\x32\n\x03Set\x12\x14.ember.v1.SetRequest\x1a\x15.ember.v1.SetResponse\x12\x32\n\x03\x44\x65l\x12\x14.ember.v1.DelRequest\x1a\x15.ember.v1.DelResponse\x12\x35\n\x04MGet\x12\x15.ember.v1.MGetRequest\x1a\x16.ember.v1.MGetResponse\x12\x35\n\x04MSet\x12\x15.ember.v1.MSetRequest\x1a\x16.ember.v1.MSetResponse\x12\x34\n\x04Incr\x12\x15.ember.v1.IncrRequest\x1a\x15.ember.v1.IntResponse\x12\x38\n\x06IncrBy\x12\x17.ember.v1.IncrByRequest\x1a\x15.ember.v1.IntResponse\x12\x38\n\x06\x44\x65\x63rBy\x12\x17.ember.v1.DecrByRequest\x1a\x15.ember.v1.IntResponse\x12\x44\n\x0bIncrByFloat\x12\x1c.ember.v1.IncrByFloatRequest\x1a\x17.ember.v1.FloatResponse\x12\x38\n\x06\x41ppend\x12\x17.ember.v1.AppendRequest\x1a\x15.ember.v1.IntResponse\x12\x38\n\x06Strlen\x12\x17.ember.v1.StrlenRequest\x1a\x15.ember.v1.IntResponse\x12\x38\n\x06\x45xists\x12\x17.ember.v1.ExistsRequest\x1a\x15.ember.v1.IntResponse\x12\x39\n\x06\x45xpire\x12\x17.ember.v1.ExpireRequest\x1a\x16.ember.v1.BoolResponse\x12;\n\x07PExpire\x12\x18.ember.v1.PExpireRequest\x1a\x16.ember.v1.BoolResponse\x12;\n\x07Persist\x12\x18.ember.v1.PersistRequest\x1a\x16.ember.v1.BoolResponse\x12\x32\n\x03Ttl\x12\x14.ember.v1.TtlRequest\x1a\x15.ember.v1.TtlResponse\x12\x34\n\x04PTtl\x12\x15.ember.v1.PTtlRequest\x1a\x15.ember.v1.TtlResponse\x12\x35\n\x04Type\x12\x15.ember.v1.TypeRequest\x1a\x16.ember.v1.TypeResponse\x12\x35\n\x04Keys\x12\x15.ember.v1.KeysRequest\x1a\x16.ember.v1.KeysResponse\x12;\n\x06Rename\x12\x17.ember.v1.RenameRequest\x1a\x18.ember.v1.StatusResponse\x12\x35\n\x04Scan\x12\x15.ember.v1.ScanRequest\x1a\x16.ember.v1.ScanResponse\x12\x36\n\x05LPush\x12\x16.ember.v1.LPushRequest\x1a\x15.ember.v1.IntResponse\x12\x36\n\x05RPush\x12\x16.ember.v1.RPushRequest\x1a\x15.ember.v1.IntResponse\x12\x34\n\x04LPop\x12\x15.ember.v1.LPopRequest\x1a\x15.ember.v1.GetResponse\x12\x34\n\x04RPop\x12\x15.ember.v1.RPopRequest\x1a\x15.ember.v1.GetResponse\x12:\n\x06LRange\x12\x17.ember.v1.LRangeRequest\x1a\x17.ember.v1.ArrayResponse\x12\x34\n\x04LLen\x12\x15.ember.v1.LLenRequest\x1a\x15.ember.v1.IntResponse\x12\x34\n\x04HSet\x12\x15.ember.v1.HSetRequest\x1a\x15.ember.v1.IntResponse\x12\x34\n\x04HGet\x12\x15.ember.v1.HGetRequest\x1a\x15.ember.v1.GetResponse\x12;\n\x07HGetAll\x12\x18.ember.v1.HGetAllRequest\x1a\x16.ember.v1.HashResponse\x12\x34\n\x04HDel\x12\x15.ember.v1.HDelRequest\x1a\x15.ember.v1.IntResponse\x12;\n\x07HExists\x12\x18.ember.v1.HExistsRequest\x1a\x16.ember.v1.BoolResponse\x12\x34\n\x04HLen\x12\x15.ember.v1.HLenRequest\x1a\x15.ember.v1.IntResponse\x12:\n\x07HIncrBy\x12\x18.ember.v1.HIncrByRequest\x1a\x15.ember.v1.IntResponse\x12\x37\n\x05HKeys\x12\x16.ember.v1.HKeysRequest\x1a\x16.ember.v1.KeysResponse\x12\x38\n\x05HVals\x12\x16.ember.v1.HValsRequest\x1a\x17.ember.v1.ArrayResponse\x12@\n\x05HMGet\x12\x16.ember.v1.HMGetRequest\x1a\x1f.ember.v1.OptionalArrayResponse\x12\x34\n\x04SAdd\x12\x15.ember.v1.SAddRequest\x1a\x15.ember.v1.IntResponse\x12\x34\n\x04SRem\x12\x15.ember.v1.SRemRequest\x1a\x15.ember.v1.IntResponse\x12=\n\x08SMembers\x12\x19.ember.v1.SMembersRequest\x1a\x16.ember.v1.KeysResponse\x12?\n\tSIsMember\x12\x1a.ember.v1.SIsMemberRequest\x1a\x16.ember.v1.BoolResponse\x12\x36\n\x05SCard\x12\x16.ember.v1.SCardRequest\x1a\x15.ember.v1.IntResponse\x12\x34\n\x04ZAdd\x12\x15.ember.v1.ZAddRequest\x1a\x15.ember.v1.IntResponse\x12\x34\n\x04ZRem\x12\x15.ember.v1.ZRemRequest\x1a\x15.ember.v1.IntResponse\x12\x42\n\x06ZScore\x12\x17.ember.v1.ZScoreRequest\x1a\x1f.ember.v1.OptionalFloatResponse\x12>\n\x05ZRank\x12\x16.ember.v1.ZRankRequest\x1a\x1d.ember.v1.OptionalIntResponse\x12\x36\n\x05ZCard\x12\x16.ember.v1.ZCardRequest\x1a\x15.ember.v1.IntResponse\x12;\n\x06ZRange\x12\x17.ember.v1.ZRangeRequest\x1a\x18.ember.v1.ZRangeResponse\x12\x35\n\x04VAdd\x12\x15.ember.v1.VAddRequest\x1a\x16.ember.v1.BoolResponse\x12\x35\n\x04VSim\x12\x15.ember.v1.VSimRequest\x1a\x16.ember.v1.VSimResponse\x12\x35\n\x04VRem\x12\x15.ember.v1.VRemRequest\x1a\x16.ember.v1.BoolResponse\x12\x35\n\x04VGet\x12\x15.ember.v1.VGetRequest\x1a\x16.ember.v1.VGetResponse\x12\x36\n\x05VCard\x12\x16.ember.v1.VCardRequest\x1a\x15.ember.v1.IntResponse\x12\x34\n\x04VDim\x12\x15.ember.v1.VDimRequest\x1a\x15.ember.v1.IntResponse\x12\x38\n\x05VInfo\x12\x16.ember.v1.VInfoRequest\x1a\x17.ember.v1.VInfoResponse\x12\x35\n\x04Ping\x12\x15.ember.v1.PingRequest\x1a\x16.ember.v1.PingResponse\x12=\n\x07\x46lushDb\x12\x18.ember.v1.FlushDbRequest\x1a\x18.ember.v1.StatusResponse\x12\x38\n\x06\x44\x62Size\x12\x17.ember.v1.DbSizeRequest\x1a\x15.ember.v1.IntResponse\x12\x35\n\x04Info\x12\x15.ember.v1.InfoRequest\x1a\x16.ember.v1.InfoResponse\x12\x45\n\x08Pipeline\x12\x19.ember.v1.PipelineRequest\x1a\x1a.ember.v1.PipelineResponse(\x01\x30\x01\x42\x31Z/github.com/kacy/ember-go/proto/ember/v1;emberv1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'ember.v1.ember_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'Z/github.com/kacy/ember-go/proto/ember/v1;emberv1' + _globals['_VADDREQUEST'].fields_by_name['vector']._loaded_options = None + _globals['_VADDREQUEST'].fields_by_name['vector']._serialized_options = b'\020\001' + _globals['_VSIMREQUEST'].fields_by_name['query']._loaded_options = None + _globals['_VSIMREQUEST'].fields_by_name['query']._serialized_options = b'\020\001' + _globals['_VGETRESPONSE'].fields_by_name['vector']._loaded_options = None + _globals['_VGETRESPONSE'].fields_by_name['vector']._serialized_options = b'\020\001' + _globals['_VECTORMETRIC']._serialized_start=7694 + _globals['_VECTORMETRIC']._serialized_end=7796 + _globals['_VECTORQUANTIZATION']._serialized_start=7798 + _globals['_VECTORQUANTIZATION']._serialized_end=7905 + _globals['_ERRORKIND']._serialized_start=7908 + _globals['_ERRORKIND']._serialized_end=8062 + _globals['_INTRESPONSE']._serialized_start=34 + _globals['_INTRESPONSE']._serialized_end=62 + _globals['_BOOLRESPONSE']._serialized_start=64 + _globals['_BOOLRESPONSE']._serialized_end=93 + _globals['_FLOATRESPONSE']._serialized_start=95 + _globals['_FLOATRESPONSE']._serialized_end=125 + _globals['_STATUSRESPONSE']._serialized_start=127 + _globals['_STATUSRESPONSE']._serialized_end=159 + _globals['_GETREQUEST']._serialized_start=161 + _globals['_GETREQUEST']._serialized_end=186 + _globals['_GETRESPONSE']._serialized_start=188 + _globals['_GETRESPONSE']._serialized_end=231 + _globals['_SETREQUEST']._serialized_start=233 + _globals['_SETREQUEST']._serialized_end=344 + _globals['_SETRESPONSE']._serialized_start=346 + _globals['_SETRESPONSE']._serialized_end=371 + _globals['_DELREQUEST']._serialized_start=373 + _globals['_DELREQUEST']._serialized_end=399 + _globals['_DELRESPONSE']._serialized_start=401 + _globals['_DELRESPONSE']._serialized_end=431 + _globals['_MGETREQUEST']._serialized_start=433 + _globals['_MGETREQUEST']._serialized_end=460 + _globals['_MGETRESPONSE']._serialized_start=462 + _globals['_MGETRESPONSE']._serialized_end=517 + _globals['_OPTIONALVALUE']._serialized_start=519 + _globals['_OPTIONALVALUE']._serialized_end=564 + _globals['_MSETREQUEST']._serialized_start=566 + _globals['_MSETREQUEST']._serialized_end=614 + _globals['_KEYVALUE']._serialized_start=616 + _globals['_KEYVALUE']._serialized_end=654 + _globals['_MSETRESPONSE']._serialized_start=656 + _globals['_MSETRESPONSE']._serialized_end=670 + _globals['_INCRREQUEST']._serialized_start=672 + _globals['_INCRREQUEST']._serialized_end=698 + _globals['_INCRBYREQUEST']._serialized_start=700 + _globals['_INCRBYREQUEST']._serialized_end=743 + _globals['_DECRBYREQUEST']._serialized_start=745 + _globals['_DECRBYREQUEST']._serialized_end=788 + _globals['_INCRBYFLOATREQUEST']._serialized_start=790 + _globals['_INCRBYFLOATREQUEST']._serialized_end=838 + _globals['_APPENDREQUEST']._serialized_start=840 + _globals['_APPENDREQUEST']._serialized_end=883 + _globals['_STRLENREQUEST']._serialized_start=885 + _globals['_STRLENREQUEST']._serialized_end=913 + _globals['_EXISTSREQUEST']._serialized_start=915 + _globals['_EXISTSREQUEST']._serialized_end=944 + _globals['_EXPIREREQUEST']._serialized_start=946 + _globals['_EXPIREREQUEST']._serialized_end=991 + _globals['_PEXPIREREQUEST']._serialized_start=993 + _globals['_PEXPIREREQUEST']._serialized_end=1044 + _globals['_PERSISTREQUEST']._serialized_start=1046 + _globals['_PERSISTREQUEST']._serialized_end=1075 + _globals['_TTLREQUEST']._serialized_start=1077 + _globals['_TTLREQUEST']._serialized_end=1102 + _globals['_PTTLREQUEST']._serialized_start=1104 + _globals['_PTTLREQUEST']._serialized_end=1130 + _globals['_TTLRESPONSE']._serialized_start=1132 + _globals['_TTLRESPONSE']._serialized_end=1160 + _globals['_TYPEREQUEST']._serialized_start=1162 + _globals['_TYPEREQUEST']._serialized_end=1188 + _globals['_TYPERESPONSE']._serialized_start=1190 + _globals['_TYPERESPONSE']._serialized_end=1223 + _globals['_KEYSREQUEST']._serialized_start=1225 + _globals['_KEYSREQUEST']._serialized_end=1255 + _globals['_KEYSRESPONSE']._serialized_start=1257 + _globals['_KEYSRESPONSE']._serialized_end=1285 + _globals['_RENAMEREQUEST']._serialized_start=1287 + _globals['_RENAMEREQUEST']._serialized_end=1332 + _globals['_SCANREQUEST']._serialized_start=1334 + _globals['_SCANREQUEST']._serialized_end=1412 + _globals['_SCANRESPONSE']._serialized_start=1414 + _globals['_SCANRESPONSE']._serialized_end=1458 + _globals['_LPUSHREQUEST']._serialized_start=1460 + _globals['_LPUSHREQUEST']._serialized_end=1503 + _globals['_RPUSHREQUEST']._serialized_start=1505 + _globals['_RPUSHREQUEST']._serialized_end=1548 + _globals['_LPOPREQUEST']._serialized_start=1550 + _globals['_LPOPREQUEST']._serialized_end=1576 + _globals['_RPOPREQUEST']._serialized_start=1578 + _globals['_RPOPREQUEST']._serialized_end=1604 + _globals['_LRANGEREQUEST']._serialized_start=1606 + _globals['_LRANGEREQUEST']._serialized_end=1663 + _globals['_ARRAYRESPONSE']._serialized_start=1665 + _globals['_ARRAYRESPONSE']._serialized_end=1696 + _globals['_LLENREQUEST']._serialized_start=1698 + _globals['_LLENREQUEST']._serialized_end=1724 + _globals['_HSETREQUEST']._serialized_start=1726 + _globals['_HSETREQUEST']._serialized_end=1790 + _globals['_FIELDVALUE']._serialized_start=1792 + _globals['_FIELDVALUE']._serialized_end=1834 + _globals['_HGETREQUEST']._serialized_start=1836 + _globals['_HGETREQUEST']._serialized_end=1877 + _globals['_HGETALLREQUEST']._serialized_start=1879 + _globals['_HGETALLREQUEST']._serialized_end=1908 + _globals['_HASHRESPONSE']._serialized_start=1910 + _globals['_HASHRESPONSE']._serialized_end=1962 + _globals['_HDELREQUEST']._serialized_start=1964 + _globals['_HDELREQUEST']._serialized_end=2006 + _globals['_HEXISTSREQUEST']._serialized_start=2008 + _globals['_HEXISTSREQUEST']._serialized_end=2052 + _globals['_HLENREQUEST']._serialized_start=2054 + _globals['_HLENREQUEST']._serialized_end=2080 + _globals['_HINCRBYREQUEST']._serialized_start=2082 + _globals['_HINCRBYREQUEST']._serialized_end=2141 + _globals['_HKEYSREQUEST']._serialized_start=2143 + _globals['_HKEYSREQUEST']._serialized_end=2170 + _globals['_HVALSREQUEST']._serialized_start=2172 + _globals['_HVALSREQUEST']._serialized_end=2199 + _globals['_HMGETREQUEST']._serialized_start=2201 + _globals['_HMGETREQUEST']._serialized_end=2244 + _globals['_OPTIONALARRAYRESPONSE']._serialized_start=2246 + _globals['_OPTIONALARRAYRESPONSE']._serialized_end=2310 + _globals['_SADDREQUEST']._serialized_start=2312 + _globals['_SADDREQUEST']._serialized_end=2355 + _globals['_SREMREQUEST']._serialized_start=2357 + _globals['_SREMREQUEST']._serialized_end=2400 + _globals['_SMEMBERSREQUEST']._serialized_start=2402 + _globals['_SMEMBERSREQUEST']._serialized_end=2432 + _globals['_SISMEMBERREQUEST']._serialized_start=2434 + _globals['_SISMEMBERREQUEST']._serialized_end=2481 + _globals['_SCARDREQUEST']._serialized_start=2483 + _globals['_SCARDREQUEST']._serialized_end=2510 + _globals['_ZADDREQUEST']._serialized_start=2512 + _globals['_ZADDREQUEST']._serialized_end=2638 + _globals['_SCOREMEMBER']._serialized_start=2640 + _globals['_SCOREMEMBER']._serialized_end=2684 + _globals['_ZREMREQUEST']._serialized_start=2686 + _globals['_ZREMREQUEST']._serialized_end=2729 + _globals['_ZSCOREREQUEST']._serialized_start=2731 + _globals['_ZSCOREREQUEST']._serialized_end=2775 + _globals['_OPTIONALFLOATRESPONSE']._serialized_start=2777 + _globals['_OPTIONALFLOATRESPONSE']._serialized_end=2830 + _globals['_ZRANKREQUEST']._serialized_start=2832 + _globals['_ZRANKREQUEST']._serialized_end=2875 + _globals['_OPTIONALINTRESPONSE']._serialized_start=2877 + _globals['_OPTIONALINTRESPONSE']._serialized_end=2928 + _globals['_ZCARDREQUEST']._serialized_start=2930 + _globals['_ZCARDREQUEST']._serialized_end=2957 + _globals['_ZRANGEREQUEST']._serialized_start=2959 + _globals['_ZRANGEREQUEST']._serialized_end=3037 + _globals['_ZRANGERESPONSE']._serialized_start=3039 + _globals['_ZRANGERESPONSE']._serialized_end=3095 + _globals['_VADDREQUEST']._serialized_start=3098 + _globals['_VADDREQUEST']._serialized_end=3347 + _globals['_VSIMREQUEST']._serialized_start=3349 + _globals['_VSIMREQUEST']._serialized_end=3447 + _globals['_VSIMRESPONSE']._serialized_start=3449 + _globals['_VSIMRESPONSE']._serialized_end=3502 + _globals['_VSIMRESULT']._serialized_start=3504 + _globals['_VSIMRESULT']._serialized_end=3551 + _globals['_VREMREQUEST']._serialized_start=3553 + _globals['_VREMREQUEST']._serialized_end=3596 + _globals['_VGETREQUEST']._serialized_start=3598 + _globals['_VGETREQUEST']._serialized_end=3641 + _globals['_VGETRESPONSE']._serialized_start=3643 + _globals['_VGETRESPONSE']._serialized_end=3709 + _globals['_VCARDREQUEST']._serialized_start=3711 + _globals['_VCARDREQUEST']._serialized_end=3738 + _globals['_VDIMREQUEST']._serialized_start=3740 + _globals['_VDIMREQUEST']._serialized_end=3766 + _globals['_VINFOREQUEST']._serialized_start=3768 + _globals['_VINFOREQUEST']._serialized_end=3795 + _globals['_VINFORESPONSE']._serialized_start=3797 + _globals['_VINFORESPONSE']._serialized_end=3864 + _globals['_PINGREQUEST']._serialized_start=3866 + _globals['_PINGREQUEST']._serialized_end=3913 + _globals['_PINGRESPONSE']._serialized_start=3915 + _globals['_PINGRESPONSE']._serialized_end=3946 + _globals['_FLUSHDBREQUEST']._serialized_start=3948 + _globals['_FLUSHDBREQUEST']._serialized_end=3979 + _globals['_DBSIZEREQUEST']._serialized_start=3981 + _globals['_DBSIZEREQUEST']._serialized_end=3996 + _globals['_INFOREQUEST']._serialized_start=3998 + _globals['_INFOREQUEST']._serialized_end=4045 + _globals['_INFORESPONSE']._serialized_start=4047 + _globals['_INFORESPONSE']._serialized_end=4075 + _globals['_PIPELINEREQUEST']._serialized_start=4078 + _globals['_PIPELINEREQUEST']._serialized_end=6509 + _globals['_PIPELINERESPONSE']._serialized_start=6512 + _globals['_PIPELINERESPONSE']._serialized_end=7623 + _globals['_ERRORRESPONSE']._serialized_start=7625 + _globals['_ERRORRESPONSE']._serialized_end=7692 + _globals['_EMBERCACHE']._serialized_start=8065 + _globals['_EMBERCACHE']._serialized_end=11522 +# @@protoc_insertion_point(module_scope) diff --git a/clients/ember-py/ember/proto/ember/v1/ember_pb2_grpc.py b/clients/ember-py/ember/proto/ember/v1/ember_pb2_grpc.py new file mode 100644 index 00000000..31f18a59 --- /dev/null +++ b/clients/ember-py/ember/proto/ember/v1/ember_pb2_grpc.py @@ -0,0 +1,2664 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc +import warnings + +from ember.proto.ember.v1 import ember_pb2 as ember_dot_v1_dot_ember__pb2 + +GRPC_GENERATED_VERSION = '1.78.0' +GRPC_VERSION = grpc.__version__ +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + raise RuntimeError( + f'The grpc package installed is at version {GRPC_VERSION},' + + ' but the generated code in ember/v1/ember_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + ) + + +class EmberCacheStub(object): + """EmberCache provides a gRPC interface to ember's key-value store. + all commands route through the same engine as RESP3, so behavior + is identical regardless of protocol. + --- strings --- + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Get = channel.unary_unary( + '/ember.v1.EmberCache/Get', + request_serializer=ember_dot_v1_dot_ember__pb2.GetRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.GetResponse.FromString, + _registered_method=True) + self.Set = channel.unary_unary( + '/ember.v1.EmberCache/Set', + request_serializer=ember_dot_v1_dot_ember__pb2.SetRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.SetResponse.FromString, + _registered_method=True) + self.Del = channel.unary_unary( + '/ember.v1.EmberCache/Del', + request_serializer=ember_dot_v1_dot_ember__pb2.DelRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.DelResponse.FromString, + _registered_method=True) + self.MGet = channel.unary_unary( + '/ember.v1.EmberCache/MGet', + request_serializer=ember_dot_v1_dot_ember__pb2.MGetRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.MGetResponse.FromString, + _registered_method=True) + self.MSet = channel.unary_unary( + '/ember.v1.EmberCache/MSet', + request_serializer=ember_dot_v1_dot_ember__pb2.MSetRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.MSetResponse.FromString, + _registered_method=True) + self.Incr = channel.unary_unary( + '/ember.v1.EmberCache/Incr', + request_serializer=ember_dot_v1_dot_ember__pb2.IncrRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.IncrBy = channel.unary_unary( + '/ember.v1.EmberCache/IncrBy', + request_serializer=ember_dot_v1_dot_ember__pb2.IncrByRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.DecrBy = channel.unary_unary( + '/ember.v1.EmberCache/DecrBy', + request_serializer=ember_dot_v1_dot_ember__pb2.DecrByRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.IncrByFloat = channel.unary_unary( + '/ember.v1.EmberCache/IncrByFloat', + request_serializer=ember_dot_v1_dot_ember__pb2.IncrByFloatRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.FloatResponse.FromString, + _registered_method=True) + self.Append = channel.unary_unary( + '/ember.v1.EmberCache/Append', + request_serializer=ember_dot_v1_dot_ember__pb2.AppendRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.Strlen = channel.unary_unary( + '/ember.v1.EmberCache/Strlen', + request_serializer=ember_dot_v1_dot_ember__pb2.StrlenRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.Exists = channel.unary_unary( + '/ember.v1.EmberCache/Exists', + request_serializer=ember_dot_v1_dot_ember__pb2.ExistsRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.Expire = channel.unary_unary( + '/ember.v1.EmberCache/Expire', + request_serializer=ember_dot_v1_dot_ember__pb2.ExpireRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + _registered_method=True) + self.PExpire = channel.unary_unary( + '/ember.v1.EmberCache/PExpire', + request_serializer=ember_dot_v1_dot_ember__pb2.PExpireRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + _registered_method=True) + self.Persist = channel.unary_unary( + '/ember.v1.EmberCache/Persist', + request_serializer=ember_dot_v1_dot_ember__pb2.PersistRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + _registered_method=True) + self.Ttl = channel.unary_unary( + '/ember.v1.EmberCache/Ttl', + request_serializer=ember_dot_v1_dot_ember__pb2.TtlRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.TtlResponse.FromString, + _registered_method=True) + self.PTtl = channel.unary_unary( + '/ember.v1.EmberCache/PTtl', + request_serializer=ember_dot_v1_dot_ember__pb2.PTtlRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.TtlResponse.FromString, + _registered_method=True) + self.Type = channel.unary_unary( + '/ember.v1.EmberCache/Type', + request_serializer=ember_dot_v1_dot_ember__pb2.TypeRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.TypeResponse.FromString, + _registered_method=True) + self.Keys = channel.unary_unary( + '/ember.v1.EmberCache/Keys', + request_serializer=ember_dot_v1_dot_ember__pb2.KeysRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.KeysResponse.FromString, + _registered_method=True) + self.Rename = channel.unary_unary( + '/ember.v1.EmberCache/Rename', + request_serializer=ember_dot_v1_dot_ember__pb2.RenameRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.StatusResponse.FromString, + _registered_method=True) + self.Scan = channel.unary_unary( + '/ember.v1.EmberCache/Scan', + request_serializer=ember_dot_v1_dot_ember__pb2.ScanRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.ScanResponse.FromString, + _registered_method=True) + self.LPush = channel.unary_unary( + '/ember.v1.EmberCache/LPush', + request_serializer=ember_dot_v1_dot_ember__pb2.LPushRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.RPush = channel.unary_unary( + '/ember.v1.EmberCache/RPush', + request_serializer=ember_dot_v1_dot_ember__pb2.RPushRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.LPop = channel.unary_unary( + '/ember.v1.EmberCache/LPop', + request_serializer=ember_dot_v1_dot_ember__pb2.LPopRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.GetResponse.FromString, + _registered_method=True) + self.RPop = channel.unary_unary( + '/ember.v1.EmberCache/RPop', + request_serializer=ember_dot_v1_dot_ember__pb2.RPopRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.GetResponse.FromString, + _registered_method=True) + self.LRange = channel.unary_unary( + '/ember.v1.EmberCache/LRange', + request_serializer=ember_dot_v1_dot_ember__pb2.LRangeRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.ArrayResponse.FromString, + _registered_method=True) + self.LLen = channel.unary_unary( + '/ember.v1.EmberCache/LLen', + request_serializer=ember_dot_v1_dot_ember__pb2.LLenRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.HSet = channel.unary_unary( + '/ember.v1.EmberCache/HSet', + request_serializer=ember_dot_v1_dot_ember__pb2.HSetRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.HGet = channel.unary_unary( + '/ember.v1.EmberCache/HGet', + request_serializer=ember_dot_v1_dot_ember__pb2.HGetRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.GetResponse.FromString, + _registered_method=True) + self.HGetAll = channel.unary_unary( + '/ember.v1.EmberCache/HGetAll', + request_serializer=ember_dot_v1_dot_ember__pb2.HGetAllRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.HashResponse.FromString, + _registered_method=True) + self.HDel = channel.unary_unary( + '/ember.v1.EmberCache/HDel', + request_serializer=ember_dot_v1_dot_ember__pb2.HDelRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.HExists = channel.unary_unary( + '/ember.v1.EmberCache/HExists', + request_serializer=ember_dot_v1_dot_ember__pb2.HExistsRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + _registered_method=True) + self.HLen = channel.unary_unary( + '/ember.v1.EmberCache/HLen', + request_serializer=ember_dot_v1_dot_ember__pb2.HLenRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.HIncrBy = channel.unary_unary( + '/ember.v1.EmberCache/HIncrBy', + request_serializer=ember_dot_v1_dot_ember__pb2.HIncrByRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.HKeys = channel.unary_unary( + '/ember.v1.EmberCache/HKeys', + request_serializer=ember_dot_v1_dot_ember__pb2.HKeysRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.KeysResponse.FromString, + _registered_method=True) + self.HVals = channel.unary_unary( + '/ember.v1.EmberCache/HVals', + request_serializer=ember_dot_v1_dot_ember__pb2.HValsRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.ArrayResponse.FromString, + _registered_method=True) + self.HMGet = channel.unary_unary( + '/ember.v1.EmberCache/HMGet', + request_serializer=ember_dot_v1_dot_ember__pb2.HMGetRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.OptionalArrayResponse.FromString, + _registered_method=True) + self.SAdd = channel.unary_unary( + '/ember.v1.EmberCache/SAdd', + request_serializer=ember_dot_v1_dot_ember__pb2.SAddRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.SRem = channel.unary_unary( + '/ember.v1.EmberCache/SRem', + request_serializer=ember_dot_v1_dot_ember__pb2.SRemRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.SMembers = channel.unary_unary( + '/ember.v1.EmberCache/SMembers', + request_serializer=ember_dot_v1_dot_ember__pb2.SMembersRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.KeysResponse.FromString, + _registered_method=True) + self.SIsMember = channel.unary_unary( + '/ember.v1.EmberCache/SIsMember', + request_serializer=ember_dot_v1_dot_ember__pb2.SIsMemberRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + _registered_method=True) + self.SCard = channel.unary_unary( + '/ember.v1.EmberCache/SCard', + request_serializer=ember_dot_v1_dot_ember__pb2.SCardRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.ZAdd = channel.unary_unary( + '/ember.v1.EmberCache/ZAdd', + request_serializer=ember_dot_v1_dot_ember__pb2.ZAddRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.ZRem = channel.unary_unary( + '/ember.v1.EmberCache/ZRem', + request_serializer=ember_dot_v1_dot_ember__pb2.ZRemRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.ZScore = channel.unary_unary( + '/ember.v1.EmberCache/ZScore', + request_serializer=ember_dot_v1_dot_ember__pb2.ZScoreRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.OptionalFloatResponse.FromString, + _registered_method=True) + self.ZRank = channel.unary_unary( + '/ember.v1.EmberCache/ZRank', + request_serializer=ember_dot_v1_dot_ember__pb2.ZRankRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.OptionalIntResponse.FromString, + _registered_method=True) + self.ZCard = channel.unary_unary( + '/ember.v1.EmberCache/ZCard', + request_serializer=ember_dot_v1_dot_ember__pb2.ZCardRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.ZRange = channel.unary_unary( + '/ember.v1.EmberCache/ZRange', + request_serializer=ember_dot_v1_dot_ember__pb2.ZRangeRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.ZRangeResponse.FromString, + _registered_method=True) + self.VAdd = channel.unary_unary( + '/ember.v1.EmberCache/VAdd', + request_serializer=ember_dot_v1_dot_ember__pb2.VAddRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + _registered_method=True) + self.VSim = channel.unary_unary( + '/ember.v1.EmberCache/VSim', + request_serializer=ember_dot_v1_dot_ember__pb2.VSimRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.VSimResponse.FromString, + _registered_method=True) + self.VRem = channel.unary_unary( + '/ember.v1.EmberCache/VRem', + request_serializer=ember_dot_v1_dot_ember__pb2.VRemRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + _registered_method=True) + self.VGet = channel.unary_unary( + '/ember.v1.EmberCache/VGet', + request_serializer=ember_dot_v1_dot_ember__pb2.VGetRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.VGetResponse.FromString, + _registered_method=True) + self.VCard = channel.unary_unary( + '/ember.v1.EmberCache/VCard', + request_serializer=ember_dot_v1_dot_ember__pb2.VCardRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.VDim = channel.unary_unary( + '/ember.v1.EmberCache/VDim', + request_serializer=ember_dot_v1_dot_ember__pb2.VDimRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.VInfo = channel.unary_unary( + '/ember.v1.EmberCache/VInfo', + request_serializer=ember_dot_v1_dot_ember__pb2.VInfoRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.VInfoResponse.FromString, + _registered_method=True) + self.Ping = channel.unary_unary( + '/ember.v1.EmberCache/Ping', + request_serializer=ember_dot_v1_dot_ember__pb2.PingRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.PingResponse.FromString, + _registered_method=True) + self.FlushDb = channel.unary_unary( + '/ember.v1.EmberCache/FlushDb', + request_serializer=ember_dot_v1_dot_ember__pb2.FlushDbRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.StatusResponse.FromString, + _registered_method=True) + self.DbSize = channel.unary_unary( + '/ember.v1.EmberCache/DbSize', + request_serializer=ember_dot_v1_dot_ember__pb2.DbSizeRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + _registered_method=True) + self.Info = channel.unary_unary( + '/ember.v1.EmberCache/Info', + request_serializer=ember_dot_v1_dot_ember__pb2.InfoRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.InfoResponse.FromString, + _registered_method=True) + self.Pipeline = channel.stream_stream( + '/ember.v1.EmberCache/Pipeline', + request_serializer=ember_dot_v1_dot_ember__pb2.PipelineRequest.SerializeToString, + response_deserializer=ember_dot_v1_dot_ember__pb2.PipelineResponse.FromString, + _registered_method=True) + + +class EmberCacheServicer(object): + """EmberCache provides a gRPC interface to ember's key-value store. + all commands route through the same engine as RESP3, so behavior + is identical regardless of protocol. + --- strings --- + """ + + def Get(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Set(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Del(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def MGet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def MSet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Incr(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def IncrBy(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DecrBy(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def IncrByFloat(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Append(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Strlen(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Exists(self, request, context): + """--- keys --- + + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Expire(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PExpire(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Persist(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Ttl(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def PTtl(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Type(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Keys(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Rename(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Scan(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def LPush(self, request, context): + """--- lists --- + + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RPush(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def LPop(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def RPop(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def LRange(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def LLen(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def HSet(self, request, context): + """--- hashes --- + + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def HGet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def HGetAll(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def HDel(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def HExists(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def HLen(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def HIncrBy(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def HKeys(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def HVals(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def HMGet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SAdd(self, request, context): + """--- sets --- + + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SRem(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SMembers(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SIsMember(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SCard(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ZAdd(self, request, context): + """--- sorted sets --- + + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ZRem(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ZScore(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ZRank(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ZCard(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ZRange(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VAdd(self, request, context): + """--- vectors --- + only available when the server is built with the vector feature. + + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VSim(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VRem(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VGet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VCard(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VDim(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VInfo(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Ping(self, request, context): + """--- server --- + + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def FlushDb(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DbSize(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Info(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Pipeline(self, request_iterator, context): + """--- streaming --- + bidirectional streaming for batch operations, matching RESP3 pipelining. + + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_EmberCacheServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Get': grpc.unary_unary_rpc_method_handler( + servicer.Get, + request_deserializer=ember_dot_v1_dot_ember__pb2.GetRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.GetResponse.SerializeToString, + ), + 'Set': grpc.unary_unary_rpc_method_handler( + servicer.Set, + request_deserializer=ember_dot_v1_dot_ember__pb2.SetRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.SetResponse.SerializeToString, + ), + 'Del': grpc.unary_unary_rpc_method_handler( + servicer.Del, + request_deserializer=ember_dot_v1_dot_ember__pb2.DelRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.DelResponse.SerializeToString, + ), + 'MGet': grpc.unary_unary_rpc_method_handler( + servicer.MGet, + request_deserializer=ember_dot_v1_dot_ember__pb2.MGetRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.MGetResponse.SerializeToString, + ), + 'MSet': grpc.unary_unary_rpc_method_handler( + servicer.MSet, + request_deserializer=ember_dot_v1_dot_ember__pb2.MSetRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.MSetResponse.SerializeToString, + ), + 'Incr': grpc.unary_unary_rpc_method_handler( + servicer.Incr, + request_deserializer=ember_dot_v1_dot_ember__pb2.IncrRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'IncrBy': grpc.unary_unary_rpc_method_handler( + servicer.IncrBy, + request_deserializer=ember_dot_v1_dot_ember__pb2.IncrByRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'DecrBy': grpc.unary_unary_rpc_method_handler( + servicer.DecrBy, + request_deserializer=ember_dot_v1_dot_ember__pb2.DecrByRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'IncrByFloat': grpc.unary_unary_rpc_method_handler( + servicer.IncrByFloat, + request_deserializer=ember_dot_v1_dot_ember__pb2.IncrByFloatRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.FloatResponse.SerializeToString, + ), + 'Append': grpc.unary_unary_rpc_method_handler( + servicer.Append, + request_deserializer=ember_dot_v1_dot_ember__pb2.AppendRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'Strlen': grpc.unary_unary_rpc_method_handler( + servicer.Strlen, + request_deserializer=ember_dot_v1_dot_ember__pb2.StrlenRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'Exists': grpc.unary_unary_rpc_method_handler( + servicer.Exists, + request_deserializer=ember_dot_v1_dot_ember__pb2.ExistsRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'Expire': grpc.unary_unary_rpc_method_handler( + servicer.Expire, + request_deserializer=ember_dot_v1_dot_ember__pb2.ExpireRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.BoolResponse.SerializeToString, + ), + 'PExpire': grpc.unary_unary_rpc_method_handler( + servicer.PExpire, + request_deserializer=ember_dot_v1_dot_ember__pb2.PExpireRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.BoolResponse.SerializeToString, + ), + 'Persist': grpc.unary_unary_rpc_method_handler( + servicer.Persist, + request_deserializer=ember_dot_v1_dot_ember__pb2.PersistRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.BoolResponse.SerializeToString, + ), + 'Ttl': grpc.unary_unary_rpc_method_handler( + servicer.Ttl, + request_deserializer=ember_dot_v1_dot_ember__pb2.TtlRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.TtlResponse.SerializeToString, + ), + 'PTtl': grpc.unary_unary_rpc_method_handler( + servicer.PTtl, + request_deserializer=ember_dot_v1_dot_ember__pb2.PTtlRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.TtlResponse.SerializeToString, + ), + 'Type': grpc.unary_unary_rpc_method_handler( + servicer.Type, + request_deserializer=ember_dot_v1_dot_ember__pb2.TypeRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.TypeResponse.SerializeToString, + ), + 'Keys': grpc.unary_unary_rpc_method_handler( + servicer.Keys, + request_deserializer=ember_dot_v1_dot_ember__pb2.KeysRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.KeysResponse.SerializeToString, + ), + 'Rename': grpc.unary_unary_rpc_method_handler( + servicer.Rename, + request_deserializer=ember_dot_v1_dot_ember__pb2.RenameRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.StatusResponse.SerializeToString, + ), + 'Scan': grpc.unary_unary_rpc_method_handler( + servicer.Scan, + request_deserializer=ember_dot_v1_dot_ember__pb2.ScanRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.ScanResponse.SerializeToString, + ), + 'LPush': grpc.unary_unary_rpc_method_handler( + servicer.LPush, + request_deserializer=ember_dot_v1_dot_ember__pb2.LPushRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'RPush': grpc.unary_unary_rpc_method_handler( + servicer.RPush, + request_deserializer=ember_dot_v1_dot_ember__pb2.RPushRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'LPop': grpc.unary_unary_rpc_method_handler( + servicer.LPop, + request_deserializer=ember_dot_v1_dot_ember__pb2.LPopRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.GetResponse.SerializeToString, + ), + 'RPop': grpc.unary_unary_rpc_method_handler( + servicer.RPop, + request_deserializer=ember_dot_v1_dot_ember__pb2.RPopRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.GetResponse.SerializeToString, + ), + 'LRange': grpc.unary_unary_rpc_method_handler( + servicer.LRange, + request_deserializer=ember_dot_v1_dot_ember__pb2.LRangeRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.ArrayResponse.SerializeToString, + ), + 'LLen': grpc.unary_unary_rpc_method_handler( + servicer.LLen, + request_deserializer=ember_dot_v1_dot_ember__pb2.LLenRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'HSet': grpc.unary_unary_rpc_method_handler( + servicer.HSet, + request_deserializer=ember_dot_v1_dot_ember__pb2.HSetRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'HGet': grpc.unary_unary_rpc_method_handler( + servicer.HGet, + request_deserializer=ember_dot_v1_dot_ember__pb2.HGetRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.GetResponse.SerializeToString, + ), + 'HGetAll': grpc.unary_unary_rpc_method_handler( + servicer.HGetAll, + request_deserializer=ember_dot_v1_dot_ember__pb2.HGetAllRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.HashResponse.SerializeToString, + ), + 'HDel': grpc.unary_unary_rpc_method_handler( + servicer.HDel, + request_deserializer=ember_dot_v1_dot_ember__pb2.HDelRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'HExists': grpc.unary_unary_rpc_method_handler( + servicer.HExists, + request_deserializer=ember_dot_v1_dot_ember__pb2.HExistsRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.BoolResponse.SerializeToString, + ), + 'HLen': grpc.unary_unary_rpc_method_handler( + servicer.HLen, + request_deserializer=ember_dot_v1_dot_ember__pb2.HLenRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'HIncrBy': grpc.unary_unary_rpc_method_handler( + servicer.HIncrBy, + request_deserializer=ember_dot_v1_dot_ember__pb2.HIncrByRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'HKeys': grpc.unary_unary_rpc_method_handler( + servicer.HKeys, + request_deserializer=ember_dot_v1_dot_ember__pb2.HKeysRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.KeysResponse.SerializeToString, + ), + 'HVals': grpc.unary_unary_rpc_method_handler( + servicer.HVals, + request_deserializer=ember_dot_v1_dot_ember__pb2.HValsRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.ArrayResponse.SerializeToString, + ), + 'HMGet': grpc.unary_unary_rpc_method_handler( + servicer.HMGet, + request_deserializer=ember_dot_v1_dot_ember__pb2.HMGetRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.OptionalArrayResponse.SerializeToString, + ), + 'SAdd': grpc.unary_unary_rpc_method_handler( + servicer.SAdd, + request_deserializer=ember_dot_v1_dot_ember__pb2.SAddRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'SRem': grpc.unary_unary_rpc_method_handler( + servicer.SRem, + request_deserializer=ember_dot_v1_dot_ember__pb2.SRemRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'SMembers': grpc.unary_unary_rpc_method_handler( + servicer.SMembers, + request_deserializer=ember_dot_v1_dot_ember__pb2.SMembersRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.KeysResponse.SerializeToString, + ), + 'SIsMember': grpc.unary_unary_rpc_method_handler( + servicer.SIsMember, + request_deserializer=ember_dot_v1_dot_ember__pb2.SIsMemberRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.BoolResponse.SerializeToString, + ), + 'SCard': grpc.unary_unary_rpc_method_handler( + servicer.SCard, + request_deserializer=ember_dot_v1_dot_ember__pb2.SCardRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'ZAdd': grpc.unary_unary_rpc_method_handler( + servicer.ZAdd, + request_deserializer=ember_dot_v1_dot_ember__pb2.ZAddRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'ZRem': grpc.unary_unary_rpc_method_handler( + servicer.ZRem, + request_deserializer=ember_dot_v1_dot_ember__pb2.ZRemRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'ZScore': grpc.unary_unary_rpc_method_handler( + servicer.ZScore, + request_deserializer=ember_dot_v1_dot_ember__pb2.ZScoreRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.OptionalFloatResponse.SerializeToString, + ), + 'ZRank': grpc.unary_unary_rpc_method_handler( + servicer.ZRank, + request_deserializer=ember_dot_v1_dot_ember__pb2.ZRankRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.OptionalIntResponse.SerializeToString, + ), + 'ZCard': grpc.unary_unary_rpc_method_handler( + servicer.ZCard, + request_deserializer=ember_dot_v1_dot_ember__pb2.ZCardRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'ZRange': grpc.unary_unary_rpc_method_handler( + servicer.ZRange, + request_deserializer=ember_dot_v1_dot_ember__pb2.ZRangeRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.ZRangeResponse.SerializeToString, + ), + 'VAdd': grpc.unary_unary_rpc_method_handler( + servicer.VAdd, + request_deserializer=ember_dot_v1_dot_ember__pb2.VAddRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.BoolResponse.SerializeToString, + ), + 'VSim': grpc.unary_unary_rpc_method_handler( + servicer.VSim, + request_deserializer=ember_dot_v1_dot_ember__pb2.VSimRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.VSimResponse.SerializeToString, + ), + 'VRem': grpc.unary_unary_rpc_method_handler( + servicer.VRem, + request_deserializer=ember_dot_v1_dot_ember__pb2.VRemRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.BoolResponse.SerializeToString, + ), + 'VGet': grpc.unary_unary_rpc_method_handler( + servicer.VGet, + request_deserializer=ember_dot_v1_dot_ember__pb2.VGetRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.VGetResponse.SerializeToString, + ), + 'VCard': grpc.unary_unary_rpc_method_handler( + servicer.VCard, + request_deserializer=ember_dot_v1_dot_ember__pb2.VCardRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'VDim': grpc.unary_unary_rpc_method_handler( + servicer.VDim, + request_deserializer=ember_dot_v1_dot_ember__pb2.VDimRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'VInfo': grpc.unary_unary_rpc_method_handler( + servicer.VInfo, + request_deserializer=ember_dot_v1_dot_ember__pb2.VInfoRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.VInfoResponse.SerializeToString, + ), + 'Ping': grpc.unary_unary_rpc_method_handler( + servicer.Ping, + request_deserializer=ember_dot_v1_dot_ember__pb2.PingRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.PingResponse.SerializeToString, + ), + 'FlushDb': grpc.unary_unary_rpc_method_handler( + servicer.FlushDb, + request_deserializer=ember_dot_v1_dot_ember__pb2.FlushDbRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.StatusResponse.SerializeToString, + ), + 'DbSize': grpc.unary_unary_rpc_method_handler( + servicer.DbSize, + request_deserializer=ember_dot_v1_dot_ember__pb2.DbSizeRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.IntResponse.SerializeToString, + ), + 'Info': grpc.unary_unary_rpc_method_handler( + servicer.Info, + request_deserializer=ember_dot_v1_dot_ember__pb2.InfoRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.InfoResponse.SerializeToString, + ), + 'Pipeline': grpc.stream_stream_rpc_method_handler( + servicer.Pipeline, + request_deserializer=ember_dot_v1_dot_ember__pb2.PipelineRequest.FromString, + response_serializer=ember_dot_v1_dot_ember__pb2.PipelineResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'ember.v1.EmberCache', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('ember.v1.EmberCache', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class EmberCache(object): + """EmberCache provides a gRPC interface to ember's key-value store. + all commands route through the same engine as RESP3, so behavior + is identical regardless of protocol. + --- strings --- + """ + + @staticmethod + def Get(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Get', + ember_dot_v1_dot_ember__pb2.GetRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.GetResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Set(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Set', + ember_dot_v1_dot_ember__pb2.SetRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.SetResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Del(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Del', + ember_dot_v1_dot_ember__pb2.DelRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.DelResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def MGet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/MGet', + ember_dot_v1_dot_ember__pb2.MGetRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.MGetResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def MSet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/MSet', + ember_dot_v1_dot_ember__pb2.MSetRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.MSetResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Incr(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Incr', + ember_dot_v1_dot_ember__pb2.IncrRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def IncrBy(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/IncrBy', + ember_dot_v1_dot_ember__pb2.IncrByRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def DecrBy(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/DecrBy', + ember_dot_v1_dot_ember__pb2.DecrByRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def IncrByFloat(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/IncrByFloat', + ember_dot_v1_dot_ember__pb2.IncrByFloatRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.FloatResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Append(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Append', + ember_dot_v1_dot_ember__pb2.AppendRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Strlen(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Strlen', + ember_dot_v1_dot_ember__pb2.StrlenRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Exists(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Exists', + ember_dot_v1_dot_ember__pb2.ExistsRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Expire(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Expire', + ember_dot_v1_dot_ember__pb2.ExpireRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def PExpire(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/PExpire', + ember_dot_v1_dot_ember__pb2.PExpireRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Persist(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Persist', + ember_dot_v1_dot_ember__pb2.PersistRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Ttl(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Ttl', + ember_dot_v1_dot_ember__pb2.TtlRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.TtlResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def PTtl(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/PTtl', + ember_dot_v1_dot_ember__pb2.PTtlRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.TtlResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Type(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Type', + ember_dot_v1_dot_ember__pb2.TypeRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.TypeResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Keys(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Keys', + ember_dot_v1_dot_ember__pb2.KeysRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.KeysResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Rename(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Rename', + ember_dot_v1_dot_ember__pb2.RenameRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.StatusResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Scan(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Scan', + ember_dot_v1_dot_ember__pb2.ScanRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.ScanResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def LPush(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/LPush', + ember_dot_v1_dot_ember__pb2.LPushRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def RPush(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/RPush', + ember_dot_v1_dot_ember__pb2.RPushRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def LPop(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/LPop', + ember_dot_v1_dot_ember__pb2.LPopRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.GetResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def RPop(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/RPop', + ember_dot_v1_dot_ember__pb2.RPopRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.GetResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def LRange(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/LRange', + ember_dot_v1_dot_ember__pb2.LRangeRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.ArrayResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def LLen(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/LLen', + ember_dot_v1_dot_ember__pb2.LLenRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def HSet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/HSet', + ember_dot_v1_dot_ember__pb2.HSetRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def HGet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/HGet', + ember_dot_v1_dot_ember__pb2.HGetRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.GetResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def HGetAll(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/HGetAll', + ember_dot_v1_dot_ember__pb2.HGetAllRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.HashResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def HDel(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/HDel', + ember_dot_v1_dot_ember__pb2.HDelRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def HExists(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/HExists', + ember_dot_v1_dot_ember__pb2.HExistsRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def HLen(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/HLen', + ember_dot_v1_dot_ember__pb2.HLenRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def HIncrBy(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/HIncrBy', + ember_dot_v1_dot_ember__pb2.HIncrByRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def HKeys(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/HKeys', + ember_dot_v1_dot_ember__pb2.HKeysRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.KeysResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def HVals(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/HVals', + ember_dot_v1_dot_ember__pb2.HValsRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.ArrayResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def HMGet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/HMGet', + ember_dot_v1_dot_ember__pb2.HMGetRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.OptionalArrayResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def SAdd(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/SAdd', + ember_dot_v1_dot_ember__pb2.SAddRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def SRem(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/SRem', + ember_dot_v1_dot_ember__pb2.SRemRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def SMembers(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/SMembers', + ember_dot_v1_dot_ember__pb2.SMembersRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.KeysResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def SIsMember(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/SIsMember', + ember_dot_v1_dot_ember__pb2.SIsMemberRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def SCard(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/SCard', + ember_dot_v1_dot_ember__pb2.SCardRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def ZAdd(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/ZAdd', + ember_dot_v1_dot_ember__pb2.ZAddRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def ZRem(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/ZRem', + ember_dot_v1_dot_ember__pb2.ZRemRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def ZScore(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/ZScore', + ember_dot_v1_dot_ember__pb2.ZScoreRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.OptionalFloatResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def ZRank(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/ZRank', + ember_dot_v1_dot_ember__pb2.ZRankRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.OptionalIntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def ZCard(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/ZCard', + ember_dot_v1_dot_ember__pb2.ZCardRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def ZRange(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/ZRange', + ember_dot_v1_dot_ember__pb2.ZRangeRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.ZRangeResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def VAdd(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/VAdd', + ember_dot_v1_dot_ember__pb2.VAddRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def VSim(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/VSim', + ember_dot_v1_dot_ember__pb2.VSimRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.VSimResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def VRem(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/VRem', + ember_dot_v1_dot_ember__pb2.VRemRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.BoolResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def VGet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/VGet', + ember_dot_v1_dot_ember__pb2.VGetRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.VGetResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def VCard(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/VCard', + ember_dot_v1_dot_ember__pb2.VCardRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def VDim(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/VDim', + ember_dot_v1_dot_ember__pb2.VDimRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def VInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/VInfo', + ember_dot_v1_dot_ember__pb2.VInfoRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.VInfoResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Ping(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Ping', + ember_dot_v1_dot_ember__pb2.PingRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.PingResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def FlushDb(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/FlushDb', + ember_dot_v1_dot_ember__pb2.FlushDbRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.StatusResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def DbSize(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/DbSize', + ember_dot_v1_dot_ember__pb2.DbSizeRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.IntResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Info(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/ember.v1.EmberCache/Info', + ember_dot_v1_dot_ember__pb2.InfoRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.InfoResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def Pipeline(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream( + request_iterator, + target, + '/ember.v1.EmberCache/Pipeline', + ember_dot_v1_dot_ember__pb2.PipelineRequest.SerializeToString, + ember_dot_v1_dot_ember__pb2.PipelineResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/clients/ember-py/pyproject.toml b/clients/ember-py/pyproject.toml new file mode 100644 index 00000000..81c1e490 --- /dev/null +++ b/clients/ember-py/pyproject.toml @@ -0,0 +1,27 @@ +[project] +name = "ember-py" +version = "0.1.0" +description = "python client for the ember cache server over gRPC" +readme = "README.md" +requires-python = ">=3.10" +license = "MIT" +dependencies = [ + "grpcio>=1.60", + "protobuf>=4.25", +] + +[project.optional-dependencies] +dev = [ + "grpcio-tools>=1.60", + "pytest>=8.0", +] + +[build-system] +requires = ["setuptools>=68.0"] +build-backend = "setuptools.build_meta" + +[tool.setuptools.packages.find] +include = ["ember*"] + +[tool.pytest.ini_options] +testpaths = ["tests"] diff --git a/clients/ember-py/tests/__init__.py b/clients/ember-py/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/clients/ember-py/tests/test_client.py b/clients/ember-py/tests/test_client.py new file mode 100644 index 00000000..d5961aa9 --- /dev/null +++ b/clients/ember-py/tests/test_client.py @@ -0,0 +1,93 @@ +"""Tests for the ember python client. + +These are unit-level tests that verify the client API surface and proto +mapping without requiring a running server. Integration tests that hit +a real ember-server are left to the CI integration suite. +""" + +from unittest.mock import MagicMock, patch + +import pytest + +from ember.client import EmberClient + + +# --- construction --- + + +def test_default_addr(): + """Client should default to localhost:6380.""" + with patch("grpc.insecure_channel") as mock_channel: + mock_channel.return_value = MagicMock() + client = EmberClient() + mock_channel.assert_called_once_with("localhost:6380") + client.close() + + +def test_custom_addr(): + """Client should accept a custom address.""" + with patch("grpc.insecure_channel") as mock_channel: + mock_channel.return_value = MagicMock() + client = EmberClient("10.0.0.1:9999") + mock_channel.assert_called_once_with("10.0.0.1:9999") + client.close() + + +def test_context_manager(): + """Client should work as a context manager and close on exit.""" + with patch("grpc.insecure_channel") as mock_channel: + chan = MagicMock() + mock_channel.return_value = chan + with EmberClient() as client: + assert client is not None + chan.close.assert_called_once() + + +# --- metadata --- + + +def test_no_password_metadata(): + """Without a password, metadata should be empty.""" + with patch("grpc.insecure_channel"): + client = EmberClient() + assert client._metadata() == [] + client.close() + + +def test_password_metadata(): + """With a password, metadata should include authorization header.""" + with patch("grpc.insecure_channel"): + client = EmberClient(password="secret") + metadata = client._metadata() + assert len(metadata) == 1 + assert metadata[0] == ("authorization", "secret") + client.close() + + +# --- type conversions --- + + +def test_vadd_metric_mapping(): + """Verify that metric string maps to the correct proto enum.""" + from ember.proto.ember.v1 import ember_pb2 + + metric_map = { + "cosine": ember_pb2.VECTOR_METRIC_COSINE, + "euclidean": ember_pb2.VECTOR_METRIC_EUCLIDEAN, + "ip": ember_pb2.VECTOR_METRIC_INNER_PRODUCT, + } + for name, expected in metric_map.items(): + assert metric_map[name] == expected + + +def test_vadd_unknown_metric_defaults_to_cosine(): + """Unknown metric strings should default to cosine.""" + from ember.proto.ember.v1 import ember_pb2 + + metric_map = { + "cosine": ember_pb2.VECTOR_METRIC_COSINE, + "euclidean": ember_pb2.VECTOR_METRIC_EUCLIDEAN, + "ip": ember_pb2.VECTOR_METRIC_INNER_PRODUCT, + } + result = metric_map.get("unknown", ember_pb2.VECTOR_METRIC_COSINE) + assert result == ember_pb2.VECTOR_METRIC_COSINE