Crates.io | k8s_apiserver |
lib.rs | k8s_apiserver |
version | 0.1.4 |
source | src |
created_at | 2024-10-19 10:20:39.981085 |
updated_at | 2024-10-26 12:15:03.270193 |
description | Kubernetes apiserver |
homepage | |
repository | https://gitee.com/iscas-system/apiserver |
max_upload_size | |
id | 1415239 |
size | 582,150 |
提供多种控制容器生命周期的apiserver参考实现。
cargo add k8s_apiserver
use k8s_apiserver::cores::apiserver::ApiServer;
use k8s_apiserver::cores::config::DefaultConfig;
use k8s_apiserver::cores::handlers::DefaultHandler;
use std::sync::Arc;
use env_logger;
#[actix_web::main]
async fn main()
{
env_logger::init();
let config = DefaultConfig::new();
let server = ApiServer::new(config);
Arc::new(server).start("0.0.0.0:8080", DefaultHandler::new()).await;
}