Skip to content

Commit

Permalink
added documentation surrounding the docs for CockroachDB
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Oct 15, 2024
1 parent 798afc1 commit 80481d1
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions src/cockroach_db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,33 @@ pub struct CockroachDb {
}

impl CockroachDb {
// 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
#[allow(missing_docs)]
/// Create a new instance of a CockroachDb image.
pub fn new(cmd: CockroachDbCmd) -> Self {
CockroachDb { cmd }
}
}

// 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
#[allow(missing_docs)]
/// Specifies the command how CockroachDb should be started
#[derive(Debug, Clone, Copy)]
pub enum CockroachDbCmd {
StartSingleNode { insecure: bool },
/// Start a single CockroachDB node
StartSingleNode {
/// `insecure` being set indicates that the container is intended for ***non-production
/// testing only***. To run CockroachDB in production, use a secure cluster instead.
///
/// Start a node with all security controls disabled.
/// There is no encryption, no authentication and internal security checks are also disabled.
/// This makes any client able to take over the entire cluster.
/// This flag is only intended for non-production testing.
///
/// Beware that using this flag on a public network while exposing the port is likely to
/// cause the entire host container to become compromised.
///
/// To simply accept non-TLS connections for SQL clients while keeping the cluster secure,
/// consider using `--accept-sql-without-tls` instead.
/// Also see: <https://go.crdb.dev/issue-v/53404/v24.2>
insecure: bool,
},
}

impl Default for CockroachDbCmd {
Expand Down

0 comments on commit 80481d1

Please sign in to comment.