CryBase::CouchBase::ConnectionString
Inherits CryBase::Interfaces::ConnectionString < Struct < Value < Object
Parses a Couchbase connection string of the form:
couchbase://host[,host2][:port]— plaintextcouchbases://host[,host2][:port]— TLScouchbase://user:pass@host[:port]/bucket?params— credentials/options and default buckethttp(s)://host[:port]— treated as the Management URL
cs = CryBase::CouchBase::ConnectionString.parse(
"couchbases://user:pass@n1,n2:11207/default?tls_verify=false"
)
cs.hosts # => ["n1", "n2"]
cs.tls? # => true
cs.explicit_port # => 11207
cs.username # => "user"
cs.bucket # => "default"
Constructors
Instance methods
Reads a boolean query parameter. Accepted true values are true and
1; accepted false values are false and 0.
bucket
Sourceexplicit_port
Port explicitly given in the URI, or nil when none was supplied.
Endpoint.from_string uses it for the selected endpoint. The
cluster-level Client uses it only for the Management endpoint.
Returns the first value for name from the connection string query.
params
Sourcepassword
Sourceports
Sourcescheme
Sourceusername
Source