Skip to main content

FunctionRegistry

Trait FunctionRegistry 

Source
pub trait FunctionRegistry:
    Send
    + Sync
    + 'static {
    type ListFunctionsStream: Stream<Item = Result<Function, Status>> + Send + 'static;
    type ListFunctionVersionsStream: Stream<Item = Result<FunctionVersion, Status>> + Send + 'static;
    type ListWasmsStream: Stream<Item = Result<Wasm, Status>> + Send + 'static;

    // Required methods
    fn put_function<'life0, 'async_trait>(
        &'life0 self,
        request: Request<PutFunctionRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<PutFunctionResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn put_wasm<'life0, 'async_trait>(
        &'life0 self,
        request: Request<PutWasmRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<PutWasmResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_functions<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ListFunctionsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListFunctionsStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_function_versions<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ListFunctionVersionsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListFunctionVersionsStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_wasms<'life0, 'async_trait>(
        &'life0 self,
        request: Request<ListWasmsRequest>,
    ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListWasmsStream>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with FunctionRegistryServer.

Required Associated Types§

Source

type ListFunctionsStream: Stream<Item = Result<Function, Status>> + Send + 'static

Server streaming response type for the ListFunctions method.

Source

type ListFunctionVersionsStream: Stream<Item = Result<FunctionVersion, Status>> + Send + 'static

Server streaming response type for the ListFunctionVersions method.

Source

type ListWasmsStream: Stream<Item = Result<Wasm, Status>> + Send + 'static

Server streaming response type for the ListWasms method.

Required Methods§

Source

fn put_function<'life0, 'async_trait>( &'life0 self, request: Request<PutFunctionRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<PutFunctionResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Register a new Function. This will overwrite any existing Function with the same name. Functions are registered within a cache, which namespaces them.

Source

fn put_wasm<'life0, 'async_trait>( &'life0 self, request: Request<PutWasmRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<PutWasmResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_functions<'life0, 'async_trait>( &'life0 self, request: Request<ListFunctionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListFunctionsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_function_versions<'life0, 'async_trait>( &'life0 self, request: Request<ListFunctionVersionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListFunctionVersionsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn list_wasms<'life0, 'async_trait>( &'life0 self, request: Request<ListWasmsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::ListWasmsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§