Skip to main content

Crate flux9s

Crate flux9s 

Source
Expand description

flux9s — Flux GitOps resource library

This crate provides two usage modes:

  • Full (default): flux9s = "0.7" — includes the TUI application (ratatui + crossterm) and all headless APIs.

  • Headless: flux9s = { version = "0.7", default-features = false } — excludes all TUI dependencies. Use ClusterSession as the entry point for programmatic cluster monitoring, scripting, and multi-cluster tooling.

§Headless quick start

use flux9s::services::ClusterSession;
use flux9s::config::schema::Config;

let config = Config::default();
let mut session = ClusterSession::connect_default(&config).await?;

// Drain watch events into state
session.drain_events();

// Query the current resource snapshot
for r in session.snapshot() {
    println!("{} {} ({})", r.resource_type, r.name, r.namespace);
}

Re-exports§

pub use services::ClusterSession;
pub use operations::FluxOperation;
pub use operations::OperationRegistry;
pub use kube::fetch_resource_yaml;
pub use kube::get_api_resource_with_fallback;
pub use kube::get_gvk_for_resource_type;
pub use trace::GraphEdge;
pub use trace::GraphNode;
pub use trace::NodeType;
pub use trace::RelationshipType;
pub use trace::ResourceGraph;
pub use trace::SourceRef;
pub use trace::TraceNode;
pub use trace::TraceResult;
pub use trace::TraceSpec;
pub use trace::TraceStatus;
pub use trace::trace_object;
pub use watcher::ResourceInfo;
pub use watcher::ResourceKey;
pub use watcher::ResourceState;
pub use watcher::ResourceWatcher;
pub use watcher::WatchEvent;
pub use watcher::WatchableResource;
pub use watcher::extract_status_fields;
pub use watcher::get_all_commands;
pub use watcher::resource_key;
pub use models::resource_fields::extract_resource_specific_fields;
pub use models::resource_fields::get_resource_type_columns;

Modules§

config
Configuration system for flux9s
constants
Constants used throughout flux9s
kube
Kubernetes client module
models
Flux TUI Model Layer
operations
Flux operations module
services
Service layer for business logic
trace
Flux trace functionality
tui
TUI module
watcher
Watcher module