Skip to main content

Examples

Runnable examples live under examples/ in the repository. Point them at a live cluster:

bash scripts/ci/goosefs-up.sh
export GOOSEFS_MASTER_ADDR=127.0.0.1:9200
export GOOSEFS_AUTH_TYPE=simple # or nosasl

cargo run --example metadata_crud
cargo run --example context_file_rw
cargo run --example highlevel_file_rw
cargo run --example page_cache_demo
cargo run --example short_circuit_demo
ExampleTopic
metadata_crudMaster metadata create / list / rename / delete
context_file_rwShared FileSystemContext read/write
highlevel_file_rwGoosefsFileWriter / GoosefsFileReader
seekable_file_readSeek + read_at on GoosefsFileInStream
streaming_file_readBlock-by-block streaming read
write_typesWriteType variants
ha_multi_masterMulti-master HA discovery
page_cache_demoLocal page cache cold/warm hit
short_circuit_demoLocal mmap short-circuit path
metrics_heartbeatMaster metrics heartbeat
metrics_pushgatewayPrometheus Pushgateway export
auth_demoSASL / SIMPLE auth

Or run the CI helper that executes the curated example set:

bash scripts/ci/run_rust_examples.sh