Documentation ¶
Index ¶
- type Cluster
- func (c *Cluster) Bucket(bucketName string) *Pail
- func (c *Cluster) QueryOptions(in *gocb.QueryOptions, fn ClusterRetryFunc) (ClusterRetryContext, *gocb.QueryOptions)
- func (c *Cluster) SearchOptions(in *gocb.SearchOptions, fn ClusterRetryFunc) (ClusterRetryContext, *gocb.SearchOptions)
- func (c *Cluster) Try(ctx ClusterRetryContext) error
- func (c *Cluster) TryQuery(statement string, opts *gocb.QueryOptions) (*gocb.QueryResult, error)
- func (c *Cluster) TryQueryIndexes() *QueryIndexManager
- func (c *Cluster) TrySearchQuery(indexName string, query cbsearch.Query, opts *gocb.SearchOptions) (*gocb.SearchResult, error)
- type ClusterRetryContext
- type ClusterRetryFunc
- type Collection
- func (c *Collection) AppendOptions(in *gocb.AppendOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.AppendOptions)
- func (c *Collection) BulkOpOptions(in *gocb.BulkOpOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.BulkOpOptions)
- func (c *Collection) DecrementOptions(in *gocb.DecrementOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.DecrementOptions)
- func (c *Collection) GetOptions(in *gocb.GetOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.GetOptions)
- func (c *Collection) IncrementOptions(in *gocb.IncrementOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.IncrementOptions)
- func (c *Collection) InsertOptions(in *gocb.InsertOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.InsertOptions)
- func (c *Collection) PrependOptions(in *gocb.PrependOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.PrependOptions)
- func (c *Collection) RemoveOptions(in *gocb.RemoveOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.RemoveOptions)
- func (c *Collection) ReplaceOptions(in *gocb.ReplaceOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.ReplaceOptions)
- func (c *Collection) TouchOptions(in *gocb.TouchOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.TouchOptions)
- func (c *Collection) Try(ctx CollectionRetryContext) error
- func (c *Collection) TryAppend(id string, value []byte, opts *gocb.AppendOptions) (*gocb.MutationResult, error)
- func (c *Collection) TryDecrement(id string, opts *gocb.DecrementOptions) (*gocb.CounterResult, error)
- func (c *Collection) TryDo(ops []gocb.BulkOp, opts *gocb.BulkOpOptions) error
- func (c *Collection) TryGet(id string, opts *gocb.GetOptions) (*gocb.GetResult, error)
- func (c *Collection) TryGetContent(id string, ptr interface{}, opts *gocb.GetOptions) (*gocb.GetResult, error)
- func (c *Collection) TryIncrement(id string, opts *gocb.IncrementOptions) (*gocb.CounterResult, error)
- func (c *Collection) TryInsert(id string, value interface{}, opts *gocb.InsertOptions) (*gocb.MutationResult, error)
- func (c *Collection) TryPrepend(id string, value []byte, opts *gocb.PrependOptions) (*gocb.MutationResult, error)
- func (c *Collection) TryRemove(id string, opts *gocb.RemoveOptions) (*gocb.MutationResult, error)
- func (c *Collection) TryReplace(id string, value interface{}, opts *gocb.ReplaceOptions) (*gocb.MutationResult, error)
- func (c *Collection) TryTouch(id string, expiry time.Duration, opts *gocb.TouchOptions) (*gocb.MutationResult, error)
- func (c *Collection) TryUpsert(id string, value interface{}, opts *gocb.UpsertOptions) (*gocb.MutationResult, error)
- func (c *Collection) UpsertOptions(in *gocb.UpsertOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.UpsertOptions)
- type CollectionRetryContext
- type CollectionRetryFunc
- type ConnectionErrorRetryAction
- type DefaultClusterRetryContext
- type Pail
- type QueryIndexManager
- func (qm *QueryIndexManager) BuildDeferredQueryIndexOptions(in *gocb.BuildDeferredQueryIndexOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.BuildDeferredQueryIndexOptions)
- func (qm *QueryIndexManager) CreatePrimaryQueryIndexOptions(in *gocb.CreatePrimaryQueryIndexOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.CreatePrimaryQueryIndexOptions)
- func (qm *QueryIndexManager) CreateQueryIndexOptions(in *gocb.CreateQueryIndexOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.CreateQueryIndexOptions)
- func (qm *QueryIndexManager) DropPrimaryQueryIndexOptions(in *gocb.DropPrimaryQueryIndexOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.DropPrimaryQueryIndexOptions)
- func (qm *QueryIndexManager) DropQueryIndexOptions(in *gocb.DropQueryIndexOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.DropQueryIndexOptions)
- func (qm *QueryIndexManager) GetAllQueryIndexesOptions(in *gocb.GetAllQueryIndexesOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.GetAllQueryIndexesOptions)
- func (qm *QueryIndexManager) Try(ctx QueryIndexManagerRetryContext) error
- func (qm *QueryIndexManager) TryBuildDeferredIndexes(bucketName string, opts *gocb.BuildDeferredQueryIndexOptions) ([]string, error)
- func (qm *QueryIndexManager) TryCreateIndex(bucketName, indexName string, fields []string, ...) error
- func (qm *QueryIndexManager) TryCreatePrimaryIndex(bucketName string, opts *gocb.CreatePrimaryQueryIndexOptions) error
- func (qm *QueryIndexManager) TryDropIndex(bucketName, indexName string, opts *gocb.DropQueryIndexOptions) error
- func (qm *QueryIndexManager) TryDropPrimaryIndex(bucketName string, opts *gocb.DropPrimaryQueryIndexOptions) error
- func (qm *QueryIndexManager) TryGetAllIndexes(bucketName string, opts *gocb.GetAllQueryIndexesOptions) ([]gocb.QueryIndex, error)
- func (qm *QueryIndexManager) WatchQueryIndexOptions(in *gocb.WatchQueryIndexOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.WatchQueryIndexOptions)
- type QueryIndexManagerRetryContext
- type QueryIndexManagerRetryFunc
- type Scope
- type SimpleCollectionRetryContext
- type SimpleQueryIndexManagerRetryContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct { *gocb.Cluster // contains filtered or unexported fields }
func (*Cluster) QueryOptions ¶
func (c *Cluster) QueryOptions(in *gocb.QueryOptions, fn ClusterRetryFunc) (ClusterRetryContext, *gocb.QueryOptions)
func (*Cluster) SearchOptions ¶
func (c *Cluster) SearchOptions(in *gocb.SearchOptions, fn ClusterRetryFunc) (ClusterRetryContext, *gocb.SearchOptions)
func (*Cluster) Try ¶
func (c *Cluster) Try(ctx ClusterRetryContext) error
func (*Cluster) TryQueryIndexes ¶ added in v2.0.1
func (c *Cluster) TryQueryIndexes() *QueryIndexManager
type ClusterRetryContext ¶
type ClusterRetryContext interface {
gocb.RetryStrategy
Try(*gocb.Cluster) error
}
type ClusterRetryFunc ¶
type ClusterRetryFunc func(*gocb.Cluster) error
type Collection ¶
type Collection struct { *gocb.Collection // contains filtered or unexported fields }
func (*Collection) AppendOptions ¶
func (c *Collection) AppendOptions(in *gocb.AppendOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.AppendOptions)
func (*Collection) BulkOpOptions ¶
func (c *Collection) BulkOpOptions(in *gocb.BulkOpOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.BulkOpOptions)
func (*Collection) DecrementOptions ¶
func (c *Collection) DecrementOptions(in *gocb.DecrementOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.DecrementOptions)
func (*Collection) GetOptions ¶
func (c *Collection) GetOptions(in *gocb.GetOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.GetOptions)
func (*Collection) IncrementOptions ¶
func (c *Collection) IncrementOptions(in *gocb.IncrementOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.IncrementOptions)
func (*Collection) InsertOptions ¶
func (c *Collection) InsertOptions(in *gocb.InsertOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.InsertOptions)
func (*Collection) PrependOptions ¶
func (c *Collection) PrependOptions(in *gocb.PrependOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.PrependOptions)
func (*Collection) RemoveOptions ¶
func (c *Collection) RemoveOptions(in *gocb.RemoveOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.RemoveOptions)
func (*Collection) ReplaceOptions ¶
func (c *Collection) ReplaceOptions(in *gocb.ReplaceOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.ReplaceOptions)
func (*Collection) TouchOptions ¶
func (c *Collection) TouchOptions(in *gocb.TouchOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.TouchOptions)
func (*Collection) Try ¶
func (c *Collection) Try(ctx CollectionRetryContext) error
Try will attempt to execute retryFunc up to retries+1 times or until a non-connection-related error is seen.
func (*Collection) TryAppend ¶
func (c *Collection) TryAppend(id string, value []byte, opts *gocb.AppendOptions) (*gocb.MutationResult, error)
func (*Collection) TryDecrement ¶
func (c *Collection) TryDecrement(id string, opts *gocb.DecrementOptions) (*gocb.CounterResult, error)
func (*Collection) TryDo ¶
func (c *Collection) TryDo(ops []gocb.BulkOp, opts *gocb.BulkOpOptions) error
func (*Collection) TryGet ¶
func (c *Collection) TryGet(id string, opts *gocb.GetOptions) (*gocb.GetResult, error)
func (*Collection) TryGetContent ¶
func (c *Collection) TryGetContent(id string, ptr interface{}, opts *gocb.GetOptions) (*gocb.GetResult, error)
func (*Collection) TryIncrement ¶
func (c *Collection) TryIncrement(id string, opts *gocb.IncrementOptions) (*gocb.CounterResult, error)
func (*Collection) TryInsert ¶
func (c *Collection) TryInsert(id string, value interface{}, opts *gocb.InsertOptions) (*gocb.MutationResult, error)
func (*Collection) TryPrepend ¶
func (c *Collection) TryPrepend(id string, value []byte, opts *gocb.PrependOptions) (*gocb.MutationResult, error)
func (*Collection) TryRemove ¶
func (c *Collection) TryRemove(id string, opts *gocb.RemoveOptions) (*gocb.MutationResult, error)
func (*Collection) TryReplace ¶
func (c *Collection) TryReplace(id string, value interface{}, opts *gocb.ReplaceOptions) (*gocb.MutationResult, error)
func (*Collection) TryTouch ¶
func (c *Collection) TryTouch(id string, expiry time.Duration, opts *gocb.TouchOptions) (*gocb.MutationResult, error)
func (*Collection) TryUpsert ¶
func (c *Collection) TryUpsert(id string, value interface{}, opts *gocb.UpsertOptions) (*gocb.MutationResult, error)
func (*Collection) UpsertOptions ¶
func (c *Collection) UpsertOptions(in *gocb.UpsertOptions, fn CollectionRetryFunc) (CollectionRetryContext, *gocb.UpsertOptions)
type CollectionRetryContext ¶
type CollectionRetryContext interface {
gocb.RetryStrategy
Try(*gocb.Collection) error
}
type CollectionRetryFunc ¶
type CollectionRetryFunc func(*gocb.Collection) error
type ConnectionErrorRetryAction ¶
func (ConnectionErrorRetryAction) Duration ¶
func (a ConnectionErrorRetryAction) Duration() time.Duration
type DefaultClusterRetryContext ¶
type DefaultClusterRetryContext struct {
// contains filtered or unexported fields
}
func NewSimpleClusterRetryContext ¶
func NewSimpleClusterRetryContext(retries uint32, delay time.Duration, baseStrategy gocb.RetryStrategy, fn ClusterRetryFunc) DefaultClusterRetryContext
func (DefaultClusterRetryContext) RetryAfter ¶
func (bc DefaultClusterRetryContext) RetryAfter(req gocb.RetryRequest, reason gocb.RetryReason) gocb.RetryAction
func (DefaultClusterRetryContext) Try ¶
func (rc DefaultClusterRetryContext) Try(c *gocb.Cluster) error
type Pail ¶
type Pail struct { *gocb.Bucket // contains filtered or unexported fields }
Pail is our gocb.Bucket wrapper, providing retry goodness.
func (*Pail) Collection ¶
func (p *Pail) Collection(collectionName string) *Collection
func (*Pail) DefaultCollection ¶
func (p *Pail) DefaultCollection() *Collection
func (*Pail) DefaultScope ¶
func (*Pail) ScopeCollection ¶
func (p *Pail) ScopeCollection(scopeName, collectionName string) *Collection
type QueryIndexManager ¶
type QueryIndexManager struct { *gocb.QueryIndexManager // contains filtered or unexported fields }
func NewQueryIndexManager ¶
func NewQueryIndexManager(queryIndexManager *gocb.QueryIndexManager, retries int, delay time.Duration) *QueryIndexManager
func (*QueryIndexManager) BuildDeferredQueryIndexOptions ¶
func (qm *QueryIndexManager) BuildDeferredQueryIndexOptions(in *gocb.BuildDeferredQueryIndexOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.BuildDeferredQueryIndexOptions)
func (*QueryIndexManager) CreatePrimaryQueryIndexOptions ¶
func (qm *QueryIndexManager) CreatePrimaryQueryIndexOptions(in *gocb.CreatePrimaryQueryIndexOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.CreatePrimaryQueryIndexOptions)
func (*QueryIndexManager) CreateQueryIndexOptions ¶
func (qm *QueryIndexManager) CreateQueryIndexOptions(in *gocb.CreateQueryIndexOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.CreateQueryIndexOptions)
func (*QueryIndexManager) DropPrimaryQueryIndexOptions ¶
func (qm *QueryIndexManager) DropPrimaryQueryIndexOptions(in *gocb.DropPrimaryQueryIndexOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.DropPrimaryQueryIndexOptions)
func (*QueryIndexManager) DropQueryIndexOptions ¶
func (qm *QueryIndexManager) DropQueryIndexOptions(in *gocb.DropQueryIndexOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.DropQueryIndexOptions)
func (*QueryIndexManager) GetAllQueryIndexesOptions ¶
func (qm *QueryIndexManager) GetAllQueryIndexesOptions(in *gocb.GetAllQueryIndexesOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.GetAllQueryIndexesOptions)
func (*QueryIndexManager) Try ¶
func (qm *QueryIndexManager) Try(ctx QueryIndexManagerRetryContext) error
func (*QueryIndexManager) TryBuildDeferredIndexes ¶ added in v2.0.1
func (qm *QueryIndexManager) TryBuildDeferredIndexes(bucketName string, opts *gocb.BuildDeferredQueryIndexOptions) ([]string, error)
func (*QueryIndexManager) TryCreateIndex ¶ added in v2.0.1
func (qm *QueryIndexManager) TryCreateIndex(bucketName, indexName string, fields []string, opts *gocb.CreateQueryIndexOptions) error
func (*QueryIndexManager) TryCreatePrimaryIndex ¶ added in v2.0.1
func (qm *QueryIndexManager) TryCreatePrimaryIndex(bucketName string, opts *gocb.CreatePrimaryQueryIndexOptions) error
func (*QueryIndexManager) TryDropIndex ¶ added in v2.0.1
func (qm *QueryIndexManager) TryDropIndex(bucketName, indexName string, opts *gocb.DropQueryIndexOptions) error
func (*QueryIndexManager) TryDropPrimaryIndex ¶ added in v2.0.1
func (qm *QueryIndexManager) TryDropPrimaryIndex(bucketName string, opts *gocb.DropPrimaryQueryIndexOptions) error
func (*QueryIndexManager) TryGetAllIndexes ¶ added in v2.0.1
func (qm *QueryIndexManager) TryGetAllIndexes(bucketName string, opts *gocb.GetAllQueryIndexesOptions) ([]gocb.QueryIndex, error)
func (*QueryIndexManager) WatchQueryIndexOptions ¶
func (qm *QueryIndexManager) WatchQueryIndexOptions(in *gocb.WatchQueryIndexOptions, fn QueryIndexManagerRetryFunc) (QueryIndexManagerRetryContext, *gocb.WatchQueryIndexOptions)
type QueryIndexManagerRetryContext ¶
type QueryIndexManagerRetryContext interface {
gocb.RetryStrategy
Try(*gocb.QueryIndexManager) error
}
type QueryIndexManagerRetryFunc ¶
type QueryIndexManagerRetryFunc func(*gocb.QueryIndexManager) error
type Scope ¶
type Scope struct { *gocb.Scope // contains filtered or unexported fields }
func (*Scope) Collection ¶
func (s *Scope) Collection(collectionName string) *Collection
func (*Scope) DefaultCollection ¶
func (s *Scope) DefaultCollection() *Collection
type SimpleCollectionRetryContext ¶
type SimpleCollectionRetryContext struct {
// contains filtered or unexported fields
}
func NewSimpleCollectionRetryContext ¶
func NewSimpleCollectionRetryContext(retries uint32, delay time.Duration, baseStrategy gocb.RetryStrategy, fn CollectionRetryFunc) SimpleCollectionRetryContext
func (SimpleCollectionRetryContext) RetryAfter ¶
func (bc SimpleCollectionRetryContext) RetryAfter(req gocb.RetryRequest, reason gocb.RetryReason) gocb.RetryAction
func (SimpleCollectionRetryContext) Try ¶
func (rc SimpleCollectionRetryContext) Try(c *gocb.Collection) error
type SimpleQueryIndexManagerRetryContext ¶
type SimpleQueryIndexManagerRetryContext struct {
// contains filtered or unexported fields
}
func NewSimpleQueryIndexManagerRetryContext ¶
func NewSimpleQueryIndexManagerRetryContext(retries uint32, delay time.Duration, baseStrategy gocb.RetryStrategy, fn QueryIndexManagerRetryFunc) SimpleQueryIndexManagerRetryContext
func (SimpleQueryIndexManagerRetryContext) RetryAfter ¶
func (bc SimpleQueryIndexManagerRetryContext) RetryAfter(req gocb.RetryRequest, reason gocb.RetryReason) gocb.RetryAction
func (SimpleQueryIndexManagerRetryContext) Try ¶
func (rc SimpleQueryIndexManagerRetryContext) Try(qm *gocb.QueryIndexManager) error
Click to show internal directories.
Click to hide internal directories.