Documentation
¶
Overview ¶
(c) Copyright IBM Corp. 2023 Package Instagocb provides instrumentation for the gocb package
Index ¶
Constants ¶
View Source
const Version = "1.15.1"
Version is the instrumentation module semantic version
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryCollection ¶
type BinaryCollection interface { Append(id string, val []byte, opts *gocb.AppendOptions) (mutOut *gocb.MutationResult, errOut error) Prepend(id string, val []byte, opts *gocb.PrependOptions) (mutOut *gocb.MutationResult, errOut error) Increment(id string, opts *gocb.IncrementOptions) (countOut *gocb.CounterResult, errOut error) Decrement(id string, opts *gocb.DecrementOptions) (countOut *gocb.CounterResult, errOut error) Unwrap() *gocb.BinaryCollection }
type Bucket ¶
type Bucket interface { Name() string Scope(scopeName string) Scope DefaultScope() Scope Collection(collectionName string) Collection DefaultCollection() Collection ViewIndexes() *gocb.ViewIndexManager Collections() CollectionManager WaitUntilReady(timeout time.Duration, opts *gocb.WaitUntilReadyOptions) error ViewQuery(designDoc string, viewName string, opts *gocb.ViewOptions) (*gocb.ViewResult, error) Ping(opts *gocb.PingOptions) (*gocb.PingResult, error) Internal() *gocb.InternalBucket Unwrap() *gocb.Bucket }
type BucketManager ¶
type BucketManager interface { GetBucket(bucketName string, opts *gocb.GetBucketOptions) (*gocb.BucketSettings, error) GetAllBuckets(opts *gocb.GetAllBucketsOptions) (map[string]gocb.BucketSettings, error) CreateBucket(settings gocb.CreateBucketSettings, opts *gocb.CreateBucketOptions) error UpdateBucket(settings gocb.BucketSettings, opts *gocb.UpdateBucketOptions) error DropBucket(name string, opts *gocb.DropBucketOptions) error FlushBucket(name string, opts *gocb.FlushBucketOptions) error Unwrap() *gocb.BucketManager }
type Cluster ¶
type Cluster interface { Bucket(bucketName string) Bucket WaitUntilReady(timeout time.Duration, opts *gocb.WaitUntilReadyOptions) error Close(opts *gocb.ClusterCloseOptions) error Users() *gocb.UserManager Buckets() BucketManager AnalyticsIndexes() *gocb.AnalyticsIndexManager QueryIndexes() *gocb.QueryIndexManager SearchIndexes() *gocb.SearchIndexManager EventingFunctions() *gocb.EventingFunctionManager Transactions() Transactions SearchQuery(indexName string, query cbsearch.Query, opts *gocb.SearchOptions) (*gocb.SearchResult, error) Query(statement string, opts *gocb.QueryOptions) (*gocb.QueryResult, error) Ping(opts *gocb.PingOptions) (*gocb.PingResult, error) Internal() *gocb.InternalCluster Diagnostics(opts *gocb.DiagnosticsOptions) (*gocb.DiagnosticsResult, error) AnalyticsQuery(statement string, opts *gocb.AnalyticsOptions) (*gocb.AnalyticsResult, error) // These methods are only available in Cluster interface, not available in gocb.Cluster instance Unwrap() *gocb.Cluster WrapTransactionAttemptContext(tac *gocb.TransactionAttemptContext, parentSpan gocb.RequestSpan) TransactionAttemptContext }
type Collection ¶
type Collection interface { Bucket() Bucket Name() string QueryIndexes() *gocb.CollectionQueryIndexManager Do(ops []gocb.BulkOp, opts *gocb.BulkOpOptions) error Insert(id string, val interface{}, opts *gocb.InsertOptions) (mutOut *gocb.MutationResult, errOut error) Upsert(id string, val interface{}, opts *gocb.UpsertOptions) (mutOut *gocb.MutationResult, errOut error) Replace(id string, val interface{}, opts *gocb.ReplaceOptions) (mutOut *gocb.MutationResult, errOut error) Get(id string, opts *gocb.GetOptions) (docOut *gocb.GetResult, errOut error) Exists(id string, opts *gocb.ExistsOptions) (docOut *gocb.ExistsResult, errOut error) GetAllReplicas(id string, opts *gocb.GetAllReplicaOptions) (docOut *gocb.GetAllReplicasResult, errOut error) GetAnyReplica(id string, opts *gocb.GetAnyReplicaOptions) (docOut *gocb.GetReplicaResult, errOut error) Remove(id string, opts *gocb.RemoveOptions) (mutOut *gocb.MutationResult, errOut error) GetAndTouch(id string, expiry time.Duration, opts *gocb.GetAndTouchOptions) (docOut *gocb.GetResult, errOut error) GetAndLock(id string, lockTime time.Duration, opts *gocb.GetAndLockOptions) (docOut *gocb.GetResult, errOut error) Unlock(id string, cas gocb.Cas, opts *gocb.UnlockOptions) (errOut error) Touch(id string, expiry time.Duration, opts *gocb.TouchOptions) (mutOut *gocb.MutationResult, errOut error) Binary() BinaryCollection List(id string) CouchbaseList Map(id string) CouchbaseMap Set(id string) CouchbaseSet Queue(id string) CouchbaseQueue LookupIn(id string, ops []gocb.LookupInSpec, opts *gocb.LookupInOptions) (docOut *gocb.LookupInResult, errOut error) MutateIn(id string, ops []gocb.MutateInSpec, opts *gocb.MutateInOptions) (mutOut *gocb.MutateInResult, errOut error) ScopeName() string Unwrap() *gocb.Collection }
type CollectionManager ¶
type CollectionManager interface { GetAllScopes(opts *gocb.GetAllScopesOptions) ([]gocb.ScopeSpec, error) CreateCollection(spec gocb.CollectionSpec, opts *gocb.CreateCollectionOptions) error DropCollection(spec gocb.CollectionSpec, opts *gocb.DropCollectionOptions) error CreateScope(scopeName string, opts *gocb.CreateScopeOptions) error DropScope(scopeName string, opts *gocb.DropScopeOptions) error Unwrap() *gocb.CollectionManager }
type CouchbaseList ¶
type CouchbaseMap ¶
type CouchbaseMap interface { Iterator() (map[string]interface{}, error) At(id string, valuePtr interface{}) error Add(id string, val interface{}) error Remove(id string) error Exists(id string) (bool, error) Size() (int, error) Keys() ([]string, error) Values() ([]interface{}, error) Clear() error Unwrap() *gocb.CouchbaseMap }
type CouchbaseQueue ¶
type CouchbaseSet ¶
type Span ¶
type Span struct {
// contains filtered or unexported fields
}
Instana span
func GetParentSpanFromContext ¶
Getting parent span from current context. Users need to pass this parent span to the options (eg : gocb.QueryOptions)
func (*Span) SetAttribute ¶
Setting attributes in span
type Tracer ¶
type Tracer struct {
// contains filtered or unexported fields
}
Instana tracer
func (*Tracer) RequestSpan ¶
func (t *Tracer) RequestSpan(parentContext gocb.RequestSpanContext, operationType string) gocb.RequestSpan
Request span will create a new span
type TransactionAttemptContext ¶
type TransactionAttemptContext interface { Query(statement string, options *gocb.TransactionQueryOptions) (*gocb.TransactionQueryResult, error) Get(collection *gocb.Collection, id string) (*gocb.TransactionGetResult, error) Replace(collection *gocb.Collection, doc *gocb.TransactionGetResult, value interface{}) (*gocb.TransactionGetResult, error) Insert(collection *gocb.Collection, id string, value interface{}) (*gocb.TransactionGetResult, error) Remove(collection *gocb.Collection, doc *gocb.TransactionGetResult) error Unwrap() *gocb.TransactionAttemptContext }
type Transactions ¶
type Transactions interface { Run(logicFn gocb.AttemptFunc, perConfig *gocb.TransactionOptions) (*gocb.TransactionResult, error) Unwrap() *gocb.Transactions }
Click to show internal directories.
Click to hide internal directories.