FunctionService

Trait FunctionService 

Source
pub trait FunctionService: Send + Sync {
    // Required methods
    fn publish<'life0, 'async_trait>(
        &'life0 self,
        wasm_file: Vec<u8>,
        name: String,
        github_auth_token: String,
    ) -> Pin<Box<dyn Future<Output = Result<FunctionResult<String>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_functions<'life0, 'async_trait>(
        &'life0 self,
        github_auth_token: String,
    ) -> Pin<Box<dyn Future<Output = Result<FunctionResult<Vec<FunctionInfo>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn unpublish<'life0, 'async_trait>(
        &'life0 self,
        name: String,
        github_auth_token: String,
    ) -> Pin<Box<dyn Future<Output = Result<FunctionResult<()>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_metrics<'life0, 'async_trait>(
        &'life0 self,
        github_auth_token: String,
    ) -> Pin<Box<dyn Future<Output = Result<FunctionResult<Metrics>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Service interface for managing functions via bitrpc.

Required Methods§

Source

fn publish<'life0, 'async_trait>( &'life0 self, wasm_file: Vec<u8>, name: String, github_auth_token: String, ) -> Pin<Box<dyn Future<Output = Result<FunctionResult<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Publish a new function

Source

fn list_functions<'life0, 'async_trait>( &'life0 self, github_auth_token: String, ) -> Pin<Box<dyn Future<Output = Result<FunctionResult<Vec<FunctionInfo>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all functions for the authenticated user

Source

fn unpublish<'life0, 'async_trait>( &'life0 self, name: String, github_auth_token: String, ) -> Pin<Box<dyn Future<Output = Result<FunctionResult<()>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Unpublish a function

Source

fn get_metrics<'life0, 'async_trait>( &'life0 self, github_auth_token: String, ) -> Pin<Box<dyn Future<Output = Result<FunctionResult<Metrics>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get metrics for all functions

Implementors§