ceph_async/
lib.rs

1// Copyright 2016 LambdaStack All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// NOTE: This attribute only needs to be set once.
16#![doc(
17    html_logo_url = "https://lambdastackio.github.io/static/images/lambdastack-200x200.png",
18    html_favicon_url = "https://lambdastackio.github.io/static/images/favicon.ico",
19    html_root_url = "https://lambdastackio.github.io/aws-sdk-rust/ceph-rust/ceph_rust/index.html"
20)]
21
22//! Ceph-rust is a thin layer over the librados C interface. A little higher
23//! abstraction layer will
24//! be coming next that will encapsulate all of the "C" specific features so
25//! that only pure Rust will be needed.
26//!
27//! Only works on Linux
28//! The documentation for librados can be found:
29//! http://docs.ceph.com/docs/master/rados/api/librados/
30//!
31//! By default Ceph names librados as the following for the given platforms:
32//! Hammer release:
33//! RHEL/CentOS:
34//! /usr/lib64/librados.so.2.0.0
35//!
36//! Ubuntu:
37//! /usr/lib/librados.so.2.0.0
38//!
39//! You will need to do a symlink of the above link to the following:
40//! RHEL/CentOS:
41//! sudo ln -s /usr/lib64/librados.so.2.0.0 /usr/lib64/librados.so
42//!
43//! Ubuntu:
44//! sudo ln -s /usr/lib/librados.so.2.0.0 /usr/lib/librados.so
45//!
46//! NOTE: If someone know of another way for Rust to find the librados file
47//! then please issue
48//! a PR for it. Thanks!
49//!
50//! See the /examples/ceph.rs for how to use the library.
51
52#[macro_use]
53extern crate bitflags;
54extern crate byteorder;
55extern crate libc;
56#[macro_use]
57extern crate tracing;
58#[macro_use]
59extern crate nom;
60extern crate serde;
61#[macro_use]
62extern crate serde_derive;
63#[macro_use]
64extern crate serde_json;
65extern crate uuid;
66
67pub mod admin_sockets;
68pub mod ceph;
69pub mod ceph_volume;
70pub mod cmd;
71pub mod error;
72pub mod json;
73pub mod rados;
74#[cfg(feature = "rados_striper")]
75pub mod rados_striper;
76pub mod status;
77pub mod utils;
78
79mod ceph_client;
80mod ceph_version;
81pub mod completion;
82pub mod list_stream;
83pub mod mon_command;
84pub mod read_stream;
85pub mod write_sink;
86
87pub use crate::ceph_client::CephClient;
88pub use crate::ceph_version::CephVersion;
89pub use crate::cmd::{OsdOption, PoolOption};
90pub use crate::mon_command::MonCommand;
91
92pub type JsonData = serde_json::Value;
93pub type JsonValue = serde_json::Value;