class
CryBase::CouchBase::Services::KV::Pool
- CryBase::CouchBase::Services::KV::Pool
- Reference
- Object
Overview
Fixed-size pool of authenticated KV clients for concurrent fibers.
Defined in:
crybase/couchbase/services/kv/pool.crConstant Summary
-
DEFAULT_SIZE =
10
Constructors
-
.from_string(uri : String, username : String | Nil = nil, password : String | Nil = nil, bucket : String | Nil = nil, size : Int32 = DEFAULT_SIZE, connect_timeout : Time::Span = 5.seconds, *, tls_verify : Bool | Nil = nil, tls_hostname : String | Nil = nil, tls_context : OpenSSL::SSL::Context::Client | Nil = nil) : Pool
Builds a KV endpoint from uri and opens a pool of authenticated clients for the first host in the connection string.
- .new(endpoint : Endpoint, username : String, password : String, bucket : String, size : Int32 = DEFAULT_SIZE, connect_timeout : Time::Span = 5.seconds, *, tls_verify : Bool = true, tls_hostname : String | Nil = nil, tls_context : OpenSSL::SSL::Context::Client | Nil = nil)
Instance Method Summary
- #bucket : String
- #checkout(& : Client -> T) : T forall T
- #close : Nil
- #closed? : Bool
- #decrement(*args, **kwargs)
- #delete(*args, **kwargs)
- #endpoint : Endpoint
- #get(*args, **kwargs)
- #get_as(*args, **kwargs)
- #increment(*args, **kwargs)
- #set(*args, **kwargs)
- #size : Int32
- #touch(*args, **kwargs)
Constructor Detail
def self.from_string(uri : String, username : String | Nil = nil, password : String | Nil = nil, bucket : String | Nil = nil, size : Int32 = DEFAULT_SIZE, connect_timeout : Time::Span = 5.seconds, *, tls_verify : Bool | Nil = nil, tls_hostname : String | Nil = nil, tls_context : OpenSSL::SSL::Context::Client | Nil = nil) : Pool
#
Builds a KV endpoint from uri and opens a pool of authenticated clients for the first host in the connection string.
username, password, and #bucket may be passed explicitly or
embedded as couchbase://user:pass@host/bucket. Query parameters
currently supported by this helper: tls_verify and tls_hostname.
pool = KV::Pool.from_string("couchbase://user:pass@node1/default")
def self.new(endpoint : Endpoint, username : String, password : String, bucket : String, size : Int32 = DEFAULT_SIZE, connect_timeout : Time::Span = 5.seconds, *, tls_verify : Bool = true, tls_hostname : String | Nil = nil, tls_context : OpenSSL::SSL::Context::Client | Nil = nil)
#