abstract struct CryBase::Interfaces::ConnectionString

Overview

Common contract every database-specific connection string in CryBase must satisfy. Subtypes provide their own parse and any extra fields (ports, buckets, paths, credentials) on top of this base.

cs = CryBase::CouchBase::ConnectionString.parse("couchbases://h1,h2")
cs.is_a?(CryBase::Interfaces::ConnectionString) # => true
cs.hosts                                        # => ["h1", "h2"]
cs.tls?                                         # => true

Direct Known Subclasses

Defined in:

crybase/interfaces/connection_string.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

abstract def hosts : Array(String) #

The cluster nodes parsed from the connection string.


[View source]
def initialize #

[View source]
abstract def tls? : Bool #

Whether the connection should be made over TLS.


[View source]