Skip to content

Commit 21f2f13

Browse files
committed
docs.rs updates
- documenting features, linking to kube.rs/features - adding an informer alias so that people that search for informer land on watcher - add a logo to the lhs of the docs.rs/kube page Signed-off-by: clux <[email protected]>
1 parent 15be6f1 commit 21f2f13

File tree

3 files changed

+34
-9
lines changed

3 files changed

+34
-9
lines changed

kube-runtime/src/watcher.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@ where
719719
/// that we have seen on the stream. If this is successful then the stream is simply resumed from where it left off.
720720
/// If this fails because the resource version is no longer valid then we start over with a new stream, starting with
721721
/// an [`Event::Init`]. The internals mechanics of recovery should be considered an implementation detail.
722+
#[doc(alias = "informer")]
722723
pub fn watcher<K: Resource + Clone + DeserializeOwned + Debug + Send + 'static>(
723724
api: Api<K>,
724725
watcher_config: Config,

kube/Cargo.toml

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,50 @@ categories = ["network-programming", "caching", "api-bindings", "encoding"]
1313

1414
[features]
1515
default = ["client", "rustls-tls", "ring"]
16+
#! See [kube.rs/features](https://kube.rs/features/) for more details
1617

17-
# default features
18+
## default client
1819
client = ["kube-client/client", "config"]
20+
## default config
1921
config = ["kube-client/config"]
22+
## default tls stack
2023
rustls-tls = ["kube-client/rustls-tls", "client"]
2124

22-
# alternative features
25+
## legacy tls stack (must disable rustls-tls to use)
2326
openssl-tls = ["kube-client/openssl-tls", "client"]
27+
## aws rustls provider
2428
aws-lc-rs = ["kube-client?/aws-lc-rs"]
29+
## ring rustls provider
2530
ring = ["kube-client?/ring"]
31+
## enable webpki roots in rustls
32+
webpki-roots = ["kube-client/webpki-roots", "client"]
2633

27-
# auxiliary features
34+
## enable kube-derive and proc macros
35+
derive = ["kube-derive", "kube-core/schema"]
36+
## enable runtime for controllers/watchers/reflectors
37+
runtime = ["kube-runtime"]
38+
## enable websocket client support for portforward/exec/attach
2839
ws = ["kube-client/ws", "kube-core/ws"]
29-
kubelet-debug = ["kube-client/kubelet-debug", "kube-core/kubelet-debug"]
40+
## enable client oauth support
3041
oauth = ["kube-client/oauth", "client"]
42+
## enable client oidc support
3143
oidc = ["kube-client/oidc", "client"]
44+
## enable client socks5 support
45+
socks5 = ["kube-client/socks5", "client"]
46+
## enable client http proxy support
47+
http-proxy = ["kube-client/http-proxy", "client"]
48+
## enable client gzip usage
3249
gzip = ["kube-client/gzip", "client"]
50+
## enable support for jsonpatch style patch parameters
3351
jsonpatch = ["kube-core/jsonpatch"]
52+
## enable the admission module
3453
admission = ["kube-core/admission"]
35-
derive = ["kube-derive", "kube-core/schema"]
36-
runtime = ["kube-runtime"]
54+
## enable unstable runtime features
3755
unstable-runtime = ["kube-runtime/unstable-runtime", "runtime"]
56+
## enable unstable client features
3857
unstable-client = ["kube-client/unstable-client", "client"]
39-
socks5 = ["kube-client/socks5", "client"]
40-
http-proxy = ["kube-client/http-proxy", "client"]
41-
webpki-roots = ["kube-client/webpki-roots", "client"]
58+
## enable the kubelet debug interface
59+
kubelet-debug = ["kube-client/kubelet-debug", "kube-core/kubelet-debug"]
4260

4361
[package.metadata.docs.rs]
4462
features = ["client", "rustls-tls", "openssl-tls", "derive", "ws", "oauth", "jsonpatch", "admission", "runtime", "k8s-openapi/latest", "unstable-runtime", "socks5", "http-proxy"]

kube/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#![doc(
2+
html_logo_url = "https://user-images.githubusercontent.com/639336/155115130-758a8ba9-e209-42de-bf6d-cde7be3ed86f.svg#only-light"
3+
)]
14
//! Kube is an umbrella-crate for interacting with [Kubernetes](http://kubernetes.io) in Rust.
25
//!
36
//! # Overview
@@ -103,6 +106,9 @@
103106
//!
104107
//! # Examples
105108
//! A large list of complete, runnable examples with explainations are available in the [examples folder](https://github.com/kube-rs/kube/tree/main/examples).
109+
//!
110+
//! # Features
111+
//! Documented at [kube.rs/features](https://kube.rs/features/).
106112
#![cfg_attr(docsrs, feature(doc_cfg))]
107113

108114
macro_rules! cfg_client {

0 commit comments

Comments
 (0)