Skip to content

Commit 5bb2154

Browse files
docs: add missing CockroachDB docs (#234)
1 parent 798afc1 commit 5bb2154

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

src/cockroach_db/mod.rs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,33 @@ pub struct CockroachDb {
2828
}
2929

3030
impl CockroachDb {
31-
// not having docs here is currently allowed to address the missing docs problem one place at a time. Helping us by documenting just one of these places helps other devs tremendously
32-
#[allow(missing_docs)]
31+
/// Create a new instance of a CockroachDb image.
3332
pub fn new(cmd: CockroachDbCmd) -> Self {
3433
CockroachDb { cmd }
3534
}
3635
}
3736

38-
// not having docs here is currently allowed to address the missing docs problem one place at a time. Helping us by documenting just one of these places helps other devs tremendously
39-
#[allow(missing_docs)]
37+
/// Specifies the command how CockroachDb should be started
4038
#[derive(Debug, Clone, Copy)]
4139
pub enum CockroachDbCmd {
42-
StartSingleNode { insecure: bool },
40+
/// Start a single CockroachDB node
41+
StartSingleNode {
42+
/// `insecure` being set indicates that the container is intended for ***non-production
43+
/// testing only***. To run CockroachDB in production, use a secure cluster instead.
44+
///
45+
/// Start a node with all security controls disabled.
46+
/// There is no encryption, no authentication and internal security checks are also disabled.
47+
/// This makes any client able to take over the entire cluster.
48+
/// This flag is only intended for non-production testing.
49+
///
50+
/// Beware that using this flag on a public network while exposing the port is likely to
51+
/// cause the entire host container to become compromised.
52+
///
53+
/// To simply accept non-TLS connections for SQL clients while keeping the cluster secure,
54+
/// consider using `--accept-sql-without-tls` instead.
55+
/// Also see: <https://go.crdb.dev/issue-v/53404/v24.2>
56+
insecure: bool,
57+
},
4358
}
4459

4560
impl Default for CockroachDbCmd {

0 commit comments

Comments
 (0)