Documentation ¶
Index ¶
- type LookupInBuilder
- func (lib *LookupInBuilder) Exists(path string) *LookupInBuilder
- func (lib *LookupInBuilder) ExistsEx(path string, flags gocb.SubdocFlag) *LookupInBuilder
- func (lib *LookupInBuilder) Get(path string) *LookupInBuilder
- func (lib *LookupInBuilder) GetCount(path string) *LookupInBuilder
- func (lib *LookupInBuilder) GetCountEx(path string, flags gocb.SubdocFlag) *LookupInBuilder
- func (lib *LookupInBuilder) GetEx(path string, flags gocb.SubdocFlag) *LookupInBuilder
- func (lib *LookupInBuilder) TryExecute() (*gocb.DocumentFragment, error)
- type MutateInBuilder
- func (mib *MutateInBuilder) ArrayAddUnique(path string, value interface{}, createParents bool) *MutateInBuilder
- func (mib *MutateInBuilder) ArrayAddUniqueEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
- func (mib *MutateInBuilder) ArrayAppend(path string, value interface{}, createParents bool) *MutateInBuilder
- func (mib *MutateInBuilder) ArrayAppendEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
- func (mib *MutateInBuilder) ArrayAppendMulti(path string, values interface{}, createParents bool) *MutateInBuilder
- func (mib *MutateInBuilder) ArrayAppendMultiEx(path string, values interface{}, flags gocb.SubdocFlag) *MutateInBuilder
- func (mib *MutateInBuilder) ArrayInsert(path string, value interface{}) *MutateInBuilder
- func (mib *MutateInBuilder) ArrayInsertEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
- func (mib *MutateInBuilder) ArrayInsertMulti(path string, values interface{}) *MutateInBuilder
- func (mib *MutateInBuilder) ArrayInsertMultiEx(path string, values interface{}, flags gocb.SubdocFlag) *MutateInBuilder
- func (mib *MutateInBuilder) ArrayPrepend(path string, value interface{}, createParents bool) *MutateInBuilder
- func (mib *MutateInBuilder) ArrayPrependEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
- func (mib *MutateInBuilder) ArrayPrependMulti(path string, values interface{}, createParents bool) *MutateInBuilder
- func (mib *MutateInBuilder) ArrayPrependMultiEx(path string, values interface{}, flags gocb.SubdocFlag) *MutateInBuilder
- func (mib *MutateInBuilder) Counter(path string, delta int64, createParents bool) *MutateInBuilder
- func (mib *MutateInBuilder) CounterEx(path string, delta int64, flags gocb.SubdocFlag) *MutateInBuilder
- func (mib *MutateInBuilder) Insert(path string, value interface{}, createParents bool) *MutateInBuilder
- func (mib *MutateInBuilder) InsertEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
- func (mib *MutateInBuilder) Remove(path string) *MutateInBuilder
- func (mib *MutateInBuilder) RemoveEx(path string, flags gocb.SubdocFlag) *MutateInBuilder
- func (mib *MutateInBuilder) Replace(path string, value interface{}) *MutateInBuilder
- func (mib *MutateInBuilder) ReplaceEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
- func (mib *MutateInBuilder) TryExecute() (*gocb.DocumentFragment, error)
- func (mib *MutateInBuilder) Upsert(path string, value interface{}, createParents bool) *MutateInBuilder
- func (mib *MutateInBuilder) UpsertEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
- type Pail
- func (p *Pail) Try(retries int, fn RetryFunc) error
- func (p *Pail) TryCounter(key string, delta, initial int64, expiry uint32) (uint64, gocb.Cas, error)
- func (p *Pail) TryDo(ops []gocb.BulkOp) error
- func (p *Pail) TryExecuteN1qlQuery(n1ql *gocb.N1qlQuery, params interface{}) (gocb.QueryResults, error)
- func (p *Pail) TryGet(key string, valuePtr interface{}) (gocb.Cas, error)
- func (p *Pail) TryInsert(key string, value interface{}, expiry uint32) (gocb.Cas, error)
- func (p *Pail) TryLookupIn(key string) *LookupInBuilder
- func (p *Pail) TryLookupInEx(key string, flags gocb.SubdocDocFlag) *LookupInBuilder
- func (p *Pail) TryMutateIn(key string, cas gocb.Cas, expiry uint32) *MutateInBuilder
- func (p *Pail) TryMutateInEx(key string, flags gocb.SubdocDocFlag, cas gocb.Cas, expiry uint32) *MutateInBuilder
- func (p *Pail) TryN1qlQueryNotBounded(query string, params ...interface{}) (gocb.QueryResults, error)
- func (p *Pail) TryN1qlQueryRequestPlus(query string, params ...interface{}) (gocb.QueryResults, error)
- func (p *Pail) TryN1qlQueryStatementPlus(query string, params ...interface{}) (gocb.QueryResults, error)
- func (p *Pail) TryN1qlQueryWithParameters(query string, consistency gocb.ConsistencyMode, params interface{}) (gocb.QueryResults, error)
- func (p *Pail) TryRemove(key string, cas gocb.Cas) (gocb.Cas, error)
- func (p *Pail) TryReplace(key string, value interface{}, cas gocb.Cas, expiry uint32) (gocb.Cas, error)
- func (p *Pail) TryTouch(key string, cas gocb.Cas, expiry uint32) (gocb.Cas, error)
- func (p *Pail) TryUpsert(key string, value interface{}, expiry uint32) (gocb.Cas, error)
- func (p *Pail) TryViewQuery(vq *gocb.ViewQuery) (gocb.ViewResults, error)
- type RetryFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LookupInBuilder ¶
type LookupInBuilder struct { *gocb.LookupInBuilder // contains filtered or unexported fields }
LookupInBuilder embeds the gocb.LookupInBuilder type, enabling retry functionality
func (*LookupInBuilder) Exists ¶
func (lib *LookupInBuilder) Exists(path string) *LookupInBuilder
Exists wraps the default couchbase Exists with retries
func (*LookupInBuilder) ExistsEx ¶
func (lib *LookupInBuilder) ExistsEx(path string, flags gocb.SubdocFlag) *LookupInBuilder
ExistsEx wraps the default couchbase ExistsEx with retries
func (*LookupInBuilder) Get ¶
func (lib *LookupInBuilder) Get(path string) *LookupInBuilder
Get wraps the default couchbase Get with retries
func (*LookupInBuilder) GetCount ¶
func (lib *LookupInBuilder) GetCount(path string) *LookupInBuilder
GetCount wraps the default couchbase GetCount with retries
func (*LookupInBuilder) GetCountEx ¶
func (lib *LookupInBuilder) GetCountEx(path string, flags gocb.SubdocFlag) *LookupInBuilder
GetCountEx wraps the default couchbase GetCountEx with retries
func (*LookupInBuilder) GetEx ¶
func (lib *LookupInBuilder) GetEx(path string, flags gocb.SubdocFlag) *LookupInBuilder
GetEx wraps the default couchbase GetEx with retries
func (*LookupInBuilder) TryExecute ¶
func (lib *LookupInBuilder) TryExecute() (*gocb.DocumentFragment, error)
TryExecute will repeatedly execute the TryLookupIn call until success, non-connection error is seen, or retries is breached
type MutateInBuilder ¶
type MutateInBuilder struct { *gocb.MutateInBuilder // contains filtered or unexported fields }
MutateInBuilder embeds the gocb.MutateInBuilder type, enabling retry functionality
func (*MutateInBuilder) ArrayAddUnique ¶
func (mib *MutateInBuilder) ArrayAddUnique(path string, value interface{}, createParents bool) *MutateInBuilder
ArrayAddUnique wraps the default couchbase ArrayAddUnique with retries
func (*MutateInBuilder) ArrayAddUniqueEx ¶
func (mib *MutateInBuilder) ArrayAddUniqueEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
ArrayAddUniqueEx wraps the default couchbase ArrayAddUniqueEx with retries
func (*MutateInBuilder) ArrayAppend ¶
func (mib *MutateInBuilder) ArrayAppend(path string, value interface{}, createParents bool) *MutateInBuilder
ArrayAppend wraps the default couchbase ArrayAppend with retries
func (*MutateInBuilder) ArrayAppendEx ¶
func (mib *MutateInBuilder) ArrayAppendEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
ArrayAppendEx wraps the default couchbase ArrayAppendEx with retries
func (*MutateInBuilder) ArrayAppendMulti ¶
func (mib *MutateInBuilder) ArrayAppendMulti(path string, values interface{}, createParents bool) *MutateInBuilder
ArrayAppendMulti wraps the default couchbase ArrayAppendMulti with retries
func (*MutateInBuilder) ArrayAppendMultiEx ¶
func (mib *MutateInBuilder) ArrayAppendMultiEx(path string, values interface{}, flags gocb.SubdocFlag) *MutateInBuilder
ArrayAppendMultiEx wraps the default couchbase ArrayAppendMultiEx with retries
func (*MutateInBuilder) ArrayInsert ¶
func (mib *MutateInBuilder) ArrayInsert(path string, value interface{}) *MutateInBuilder
ArrayInsert wraps the default couchbase ArrayInsert with retries
func (*MutateInBuilder) ArrayInsertEx ¶
func (mib *MutateInBuilder) ArrayInsertEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
ArrayInsertEx wraps the default couchbase ArrayInsertEx with retries
func (*MutateInBuilder) ArrayInsertMulti ¶
func (mib *MutateInBuilder) ArrayInsertMulti(path string, values interface{}) *MutateInBuilder
ArrayInsertMulti wraps the default couchbase ArrayInsertMulti with retries
func (*MutateInBuilder) ArrayInsertMultiEx ¶
func (mib *MutateInBuilder) ArrayInsertMultiEx(path string, values interface{}, flags gocb.SubdocFlag) *MutateInBuilder
ArrayInsertMultiEx wraps the default couchbase ArrayInsertMultiEx with retries
func (*MutateInBuilder) ArrayPrepend ¶
func (mib *MutateInBuilder) ArrayPrepend(path string, value interface{}, createParents bool) *MutateInBuilder
ArrayPrepend wraps the default couchbase ArrayPrepend with retries
func (*MutateInBuilder) ArrayPrependEx ¶
func (mib *MutateInBuilder) ArrayPrependEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
ArrayPrependEx wraps the default couchbase ArrayPrependEx with retries
func (*MutateInBuilder) ArrayPrependMulti ¶
func (mib *MutateInBuilder) ArrayPrependMulti(path string, values interface{}, createParents bool) *MutateInBuilder
ArrayPrependMulti wraps the default couchbase ArrayPrependMulti with retries
func (*MutateInBuilder) ArrayPrependMultiEx ¶
func (mib *MutateInBuilder) ArrayPrependMultiEx(path string, values interface{}, flags gocb.SubdocFlag) *MutateInBuilder
ArrayPrependMultiEx wraps the default couchbase ArrayPrependMultiEx with retries
func (*MutateInBuilder) Counter ¶
func (mib *MutateInBuilder) Counter(path string, delta int64, createParents bool) *MutateInBuilder
Counter wraps the default couchbase Counter with retries
func (*MutateInBuilder) CounterEx ¶
func (mib *MutateInBuilder) CounterEx(path string, delta int64, flags gocb.SubdocFlag) *MutateInBuilder
CounterEx wraps the default couchbase CounterEx with retries
func (*MutateInBuilder) Insert ¶
func (mib *MutateInBuilder) Insert(path string, value interface{}, createParents bool) *MutateInBuilder
Insert wraps the default couchbase Insert with retries
func (*MutateInBuilder) InsertEx ¶
func (mib *MutateInBuilder) InsertEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
InsertEx wraps the default couchbase InsertEx with retries
func (*MutateInBuilder) Remove ¶
func (mib *MutateInBuilder) Remove(path string) *MutateInBuilder
Remove wraps the default couchbase Remove with retries
func (*MutateInBuilder) RemoveEx ¶
func (mib *MutateInBuilder) RemoveEx(path string, flags gocb.SubdocFlag) *MutateInBuilder
RemoveEx wraps the default couchbase RemoveEx with retries
func (*MutateInBuilder) Replace ¶
func (mib *MutateInBuilder) Replace(path string, value interface{}) *MutateInBuilder
Replace wraps the default Couchbase Replace with retries
func (*MutateInBuilder) ReplaceEx ¶
func (mib *MutateInBuilder) ReplaceEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
ReplaceEx wraps the default Couchbase ReplaceEx with retries
func (*MutateInBuilder) TryExecute ¶
func (mib *MutateInBuilder) TryExecute() (*gocb.DocumentFragment, error)
TryExecute will attempt the TryMutateIn call repeatedly until success, non-connection error is seen, or retries is breached
func (*MutateInBuilder) Upsert ¶
func (mib *MutateInBuilder) Upsert(path string, value interface{}, createParents bool) *MutateInBuilder
Upsert wraps the default couchbase Upsert with retries
func (*MutateInBuilder) UpsertEx ¶
func (mib *MutateInBuilder) UpsertEx(path string, value interface{}, flags gocb.SubdocFlag) *MutateInBuilder
UpsertEx wraps the default couchbase UpsertEx with retries
type Pail ¶
Pail is our gocb.Bucket wrapper, providing retry goodness.
func (*Pail) Try ¶
Try will attempt to execute fn up to retries+1 times or until a non-connection-related error is seen.
func (*Pail) TryCounter ¶
func (p *Pail) TryCounter(key string, delta, initial int64, expiry uint32) (uint64, gocb.Cas, error)
TryCounter wraps bucket.Counter with a retry func
func (*Pail) TryExecuteN1qlQuery ¶
func (p *Pail) TryExecuteN1qlQuery(n1ql *gocb.N1qlQuery, params interface{}) (gocb.QueryResults, error)
TryExecuteN1qlQuery wraps bucket.ExecuteN1qlQuery with a retry func
func (*Pail) TryLookupIn ¶
func (p *Pail) TryLookupIn(key string) *LookupInBuilder
TryLookupIn wraps bucket.TryLookupIn with our own LookupInBuilder
func (*Pail) TryLookupInEx ¶
func (p *Pail) TryLookupInEx(key string, flags gocb.SubdocDocFlag) *LookupInBuilder
TryLookupInEx wraps bucket.TryLookupInEx with our own LookupInBuilder
func (*Pail) TryMutateIn ¶
TryMutateIn wraps bucket.TryMutateIn with our own MutateInBuilder
func (*Pail) TryMutateInEx ¶
func (p *Pail) TryMutateInEx(key string, flags gocb.SubdocDocFlag, cas gocb.Cas, expiry uint32) *MutateInBuilder
TryMutateInEx wraps bucket.TryMutateInEx with our own MutateInBuilder
func (*Pail) TryN1qlQueryNotBounded ¶
func (p *Pail) TryN1qlQueryNotBounded(query string, params ...interface{}) (gocb.QueryResults, error)
TryN1qlQueryNotBounded creates and executes a new N1ql query with parameters, setting the NotBounded consistency type
func (*Pail) TryN1qlQueryRequestPlus ¶
func (p *Pail) TryN1qlQueryRequestPlus(query string, params ...interface{}) (gocb.QueryResults, error)
TryN1qlQueryRequestPlus creates and executes a new N1ql query with parameters, setting the RequestPlus consistency type
func (*Pail) TryN1qlQueryStatementPlus ¶ added in v0.2.0
func (p *Pail) TryN1qlQueryStatementPlus(query string, params ...interface{}) (gocb.QueryResults, error)
TryN1qlQueryStatementPlus creates and executes a new N1ql query with parameters, setting the StatementPlus consistency type
func (*Pail) TryN1qlQueryWithParameters ¶
func (p *Pail) TryN1qlQueryWithParameters(query string, consistency gocb.ConsistencyMode, params interface{}) (gocb.QueryResults, error)
TryN1qlQueryWithParameters will create and execute a new N1qlQuery type, setting the provided consistency and parameters for you
func (*Pail) TryReplace ¶
func (p *Pail) TryReplace(key string, value interface{}, cas gocb.Cas, expiry uint32) (gocb.Cas, error)
TryReplace wraps bucket.replace with a retry func
func (*Pail) TryViewQuery ¶
TryViewQuery - ExecuteViewQuery Try() wrapper.