UNPKG

@pureweb/platform-streaming-agent

Version:

The PureWeb platform streaming agent enables your game to communicate and stream through the PureWeb Platform

16 lines (15 loc) 1.04 kB
import { ServerUnaryCall, sendUnaryData, ServerWritableStream } from '@grpc/grpc-js'; import { IStorageServer } from './proto/sidecar_grpc_pb'; import { ILocalAgent } from '@pureweb/platform-sdk'; import { KeyValue, StorageEvent, StoreKeyResponse, Key, RemoveKeyResponse, RetrieveAllKeysRequest, KeyList, StorageSubscription } from './proto/sidecar_pb'; export declare class StorageServer implements IStorageServer { private readonly agent; private errorMsg; constructor(agent: ILocalAgent); store(call: ServerUnaryCall<KeyValue, StoreKeyResponse>, callback: sendUnaryData<StoreKeyResponse>): void; retrieve(call: ServerUnaryCall<Key, KeyValue>, callback: sendUnaryData<KeyValue>): void; remove(call: ServerUnaryCall<Key, RemoveKeyResponse>, callback: sendUnaryData<RemoveKeyResponse>): void; retrieveAllKeys(call: ServerUnaryCall<RetrieveAllKeysRequest, KeyList>, callback: sendUnaryData<KeyList>): void; subscribe(call: ServerWritableStream<StorageSubscription, StorageEvent>): void; private getAgent; }