Crate colonyos

Crate colonyos 

Source
Expand description

ColonyOS Rust SDK

This library provides a Rust client for interacting with ColonyOS servers.

§Example

use colonyos::{core, submit, assign, close};

#[tokio::main]
async fn main() {
    let prvkey = "your_private_key";
    let spec = core::FunctionSpec::new("my_function", "cli", "my_colony");
    let process = submit(&spec, prvkey).await.unwrap();
    println!("Submitted process: {}", process.processid);
}

Re-exports§

pub use rpc::set_server_url;
pub use rpc::get_server_url;

Modules§

core
Core types for ColonyOS SDK
crypto
ColonyOS Crypto implementation Uses k256 for secp256k1 ECDSA and SHA3-256 for hashing
rpc

Functions§

add_attr
add_blueprint
add_blueprint_definition
add_colony
add_executor
add_function
add_log
approve_executor
assign
channel_append
channel_read
close
fail
get_blueprint
get_blueprint_definition
get_blueprint_definitions
get_blueprints
get_colonies
get_colony
get_executor
get_executors
get_functions
get_functions_by_executor
get_logs
get_process
get_processes
get_processgraph
get_processgraphs
get_statistics
reconcile_blueprint
reject_executor
remove_all_processes
remove_all_processgraphs
remove_blueprint
remove_blueprint_definition
remove_colony
remove_executor
remove_function
remove_process
remove_processgraph
set_output
submit
submit_workflow
subscribe_channel
Subscribe to channel messages via WebSocket.
subscribe_process
Subscribe to process lifecycle events and wait for the process to reach the specified state.
update_blueprint
update_blueprint_status