abstract class CryBase::Interfaces::Client

Overview

Common contract every database-specific client in CryBase must satisfy. Subtypes carry their own auth, endpoint shape, and connect semantics on top of this base.

client = CryBase::CouchBase::Client.new("couchbase://localhost")
client.is_a?(CryBase::Interfaces::Client) # => true
client.connection_string.hosts            # => ["localhost"]
client.connected?                         # => false
client.close

Direct Known Subclasses

Defined in:

crybase/interfaces/client.cr

Instance Method Summary

Instance Method Detail

abstract def close : Nil #

Releases any resources held by the client. Must be idempotent.


[View source]
abstract def connected? : Bool #

Whether the client has completed a successful connect.


[View source]
abstract def connection_string : ConnectionString #

The parsed connection string the client was constructed from.


[View source]