Documentation ¶
Overview ¶
Package gocbcore implements methods for low-level communication with a Couchbase Server cluster.
Index ¶
- Constants
- Variables
- func AcquireTimer(d time.Duration) *time.Timer
- func ControlledBackoff(retryAttempts uint32) time.Duration
- func DecodeCommonFlags(flags uint32) (DataType, CompressionType)
- func EncodeCommonFlags(valueType DataType, compression CompressionType) uint32
- func ReleaseTimer(t *time.Timer, wasRead bool)
- func SaslAuthPlain(username, password string, client AuthClient, deadline time.Time, ...) error
- func SaslAuthScramSha1(username, password string, client AuthClient, deadline time.Time, ...) error
- func SaslAuthScramSha256(username, password string, client AuthClient, deadline time.Time, ...) error
- func SaslAuthScramSha512(username, password string, client AuthClient, deadline time.Time, ...) error
- func SetLogRedactionLevel(level LogRedactLevel)
- func SetLogger(logger Logger)
- func Version() string
- type AddOptions
- type AdjoinCallback
- type AdjoinOptions
- type AdjoinResult
- type Agent
- func (agent *Agent) Add(opts AddOptions, cb StoreCallback) (PendingOp, error)
- func (agent *Agent) AnalyticsQuery(opts AnalyticsQueryOptions, cb AnalyticsQueryCallback) (PendingOp, error)
- func (agent *Agent) Append(opts AdjoinOptions, cb AdjoinCallback) (PendingOp, error)
- func (agent *Agent) BackupEps() []string
- func (agent *Agent) BucketName() string
- func (agent *Agent) CapiEps() []string
- func (agent *Agent) CbasEps() []string
- func (agent *Agent) ClientID() string
- func (agent *Agent) Close() error
- func (agent *Agent) ConfigSnapshot() (*ConfigSnapshot, error)
- func (agent *Agent) Decrement(opts CounterOptions, cb CounterCallback) (PendingOp, error)
- func (agent *Agent) Delete(opts DeleteOptions, cb DeleteCallback) (PendingOp, error)
- func (agent *Agent) DeleteMeta(opts DeleteMetaOptions, cb DeleteMetaCallback) (PendingOp, error)
- func (agent *Agent) Diagnostics(opts DiagnosticsOptions) (*DiagnosticInfo, error)
- func (agent *Agent) DoHTTPRequest(req *HTTPRequest, cb DoHTTPRequestCallback) (PendingOp, error)
- func (agent *Agent) EventingEps() []string
- func (agent *Agent) ForceReconnect()
- func (agent *Agent) FtsEps() []string
- func (agent *Agent) GSIEps() []string
- func (agent *Agent) Get(opts GetOptions, cb GetCallback) (PendingOp, error)
- func (agent *Agent) GetAllCollectionManifests(opts GetAllCollectionManifestsOptions, cb GetAllCollectionManifestsCallback) (PendingOp, error)
- func (agent *Agent) GetAndLock(opts GetAndLockOptions, cb GetAndLockCallback) (PendingOp, error)
- func (agent *Agent) GetAndTouch(opts GetAndTouchOptions, cb GetAndTouchCallback) (PendingOp, error)
- func (agent *Agent) GetCollectionID(scopeName string, collectionName string, opts GetCollectionIDOptions, ...) (PendingOp, error)
- func (agent *Agent) GetCollectionManifest(opts GetCollectionManifestOptions, cb GetCollectionManifestCallback) (PendingOp, error)
- func (agent *Agent) GetMeta(opts GetMetaOptions, cb GetMetaCallback) (PendingOp, error)
- func (agent *Agent) GetOneReplica(opts GetOneReplicaOptions, cb GetReplicaCallback) (PendingOp, error)
- func (agent *Agent) GetRandom(opts GetRandomOptions, cb GetRandomCallback) (PendingOp, error)
- func (agent *Agent) HTTPClient() *http.Client
- func (agent *Agent) HasCollectionsSupport() bool
- func (agent *Agent) HasSeenConfig() (bool, error)
- func (agent *Agent) Increment(opts CounterOptions, cb CounterCallback) (PendingOp, error)
- func (agent *Agent) Internal() *AgentInternal
- func (agent *Agent) IsSecure() bool
- func (agent *Agent) LookupIn(opts LookupInOptions, cb LookupInCallback) (PendingOp, error)
- func (agent *Agent) MaybeRetryRequest(req RetryRequest, reason RetryReason) (bool, time.Time)
- func (agent *Agent) MemdEps() []string
- func (agent *Agent) MgmtEps() []string
- func (agent *Agent) MutateIn(opts MutateInOptions, cb MutateInCallback) (PendingOp, error)
- func (agent *Agent) N1QLQuery(opts N1QLQueryOptions, cb N1QLQueryCallback) (PendingOp, error)
- func (agent *Agent) N1qlEps() []string
- func (agent *Agent) Observe(opts ObserveOptions, cb ObserveCallback) (PendingOp, error)
- func (agent *Agent) ObserveVb(opts ObserveVbOptions, cb ObserveVbCallback) (PendingOp, error)
- func (agent *Agent) Ping(opts PingOptions, cb PingCallback) (PendingOp, error)
- func (agent *Agent) PreparedN1QLQuery(opts N1QLQueryOptions, cb N1QLQueryCallback) (PendingOp, error)
- func (agent *Agent) Prepend(opts AdjoinOptions, cb AdjoinCallback) (PendingOp, error)
- func (agent *Agent) ReconfigureSecurity(opts ReconfigureSecurityOptions) error
- func (agent *Agent) Replace(opts ReplaceOptions, cb StoreCallback) (PendingOp, error)
- func (agent *Agent) SearchQuery(opts SearchQueryOptions, cb SearchQueryCallback) (PendingOp, error)
- func (agent *Agent) Set(opts SetOptions, cb StoreCallback) (PendingOp, error)
- func (agent *Agent) SetMeta(opts SetMetaOptions, cb SetMetaCallback) (PendingOp, error)
- func (agent *Agent) Stats(opts StatsOptions, cb StatsCallback) (PendingOp, error)
- func (agent *Agent) Touch(opts TouchOptions, cb TouchCallback) (PendingOp, error)
- func (agent *Agent) Unlock(opts UnlockOptions, cb UnlockCallback) (PendingOp, error)
- func (agent *Agent) UsingGCCCP() bool
- func (agent *Agent) ViewQuery(opts ViewQueryOptions, cb ViewQueryCallback) (PendingOp, error)
- func (agent *Agent) WaitUntilReady(deadline time.Time, opts WaitUntilReadyOptions, cb WaitUntilReadyCallback) (PendingOp, error)
- type AgentConfig
- type AgentGroup
- func (ag *AgentGroup) AnalyticsQuery(opts AnalyticsQueryOptions, cb AnalyticsQueryCallback) (PendingOp, error)
- func (ag *AgentGroup) Close() error
- func (ag *AgentGroup) Diagnostics(opts DiagnosticsOptions) (*DiagnosticInfo, error)
- func (ag *AgentGroup) DoHTTPRequest(req *HTTPRequest, cb DoHTTPRequestCallback) (PendingOp, error)
- func (ag *AgentGroup) GetAgent(bucketName string) *Agent
- func (ag *AgentGroup) N1QLQuery(opts N1QLQueryOptions, cb N1QLQueryCallback) (PendingOp, error)
- func (ag *AgentGroup) OpenBucket(bucketName string) error
- func (ag *AgentGroup) Ping(opts PingOptions, cb PingCallback) (PendingOp, error)
- func (ag *AgentGroup) PreparedN1QLQuery(opts N1QLQueryOptions, cb N1QLQueryCallback) (PendingOp, error)
- func (ag *AgentGroup) SearchQuery(opts SearchQueryOptions, cb SearchQueryCallback) (PendingOp, error)
- func (ag *AgentGroup) WaitUntilReady(deadline time.Time, opts WaitUntilReadyOptions, cb WaitUntilReadyCallback) (PendingOp, error)
- type AgentGroupConfig
- type AgentInternal
- type AnalyticsError
- type AnalyticsErrorDesc
- type AnalyticsQueryCallback
- type AnalyticsQueryOptions
- type AnalyticsRowReader
- type AuthCertRequest
- type AuthClient
- type AuthCredsRequest
- type AuthFunc
- type AuthMechanism
- type AuthProvider
- type BackoffCalculator
- type BestEffortRetryStrategy
- type BucketCapability
- type BucketCapabilityStatus
- type BytesAndError
- type Cas
- type CircuitBreakerCallback
- type CircuitBreakerConfig
- type CloseStreamCallback
- type CloseStreamOptions
- type CloseStreamStreamOptions
- type ClusterCapability
- type ClusterState
- type CompressionConfig
- type CompressionType
- type ConfigPollerConfig
- type ConfigSnapshot
- func (pi ConfigSnapshot) BucketUUID() string
- func (pi ConfigSnapshot) KeyToServer(key []byte, replicaIdx uint32) (int, error)
- func (pi ConfigSnapshot) KeyToVbucket(key []byte) (uint16, error)
- func (pi ConfigSnapshot) NumReplicas() (int, error)
- func (pi ConfigSnapshot) NumServers() (int, error)
- func (pi ConfigSnapshot) NumVbuckets() (int, error)
- func (pi ConfigSnapshot) RevID() int64
- func (pi ConfigSnapshot) VbucketToServer(vbID uint16, replicaIdx uint32) (int, error)
- func (pi ConfigSnapshot) VbucketsOnServer(index int) ([]uint16, error)
- type Counter
- type CounterCallback
- type CounterOptions
- type CounterResult
- type DCPAgent
- func (agent *DCPAgent) Close() error
- func (agent *DCPAgent) CloseStream(vbID uint16, opts CloseStreamOptions, cb CloseStreamCallback) (PendingOp, error)
- func (agent *DCPAgent) ConfigSnapshot() (*ConfigSnapshot, error)
- func (agent *DCPAgent) ForceReconnect()
- func (agent *DCPAgent) GetFailoverLog(vbID uint16, cb GetFailoverLogCallback) (PendingOp, error)
- func (agent *DCPAgent) GetVbucketSeqnos(serverIdx int, state memd.VbucketState, opts GetVbucketSeqnoOptions, ...) (PendingOp, error)
- func (agent *DCPAgent) HasCollectionsSupport() bool
- func (agent *DCPAgent) IsSecure() bool
- func (agent *DCPAgent) OpenStream(vbID uint16, flags memd.DcpStreamAddFlag, vbUUID VbUUID, ...) (PendingOp, error)
- func (agent *DCPAgent) ReconfigureSecurity(opts ReconfigureSecurityOptions) error
- func (agent *DCPAgent) WaitUntilReady(deadline time.Time, opts WaitUntilReadyOptions, cb WaitUntilReadyCallback) (PendingOp, error)
- type DCPAgentConfig
- type DCPBackfillOrder
- type DCPConfig
- type DataType
- type DcpAgentPriority
- type DcpCollectionCreation
- type DcpCollectionDeletion
- type DcpCollectionFlush
- type DcpCollectionModification
- type DcpDeletion
- type DcpExpiration
- type DcpMutation
- type DcpOSOSnapshot
- type DcpScopeCreation
- type DcpScopeDeletion
- type DcpSeqNoAdvanced
- type DcpSnapshotMarker
- type DcpStreamEnd
- type DeleteCallback
- type DeleteMetaCallback
- type DeleteMetaOptions
- type DeleteMetaResult
- type DeleteOptions
- type DeleteResult
- type DiagnosticInfo
- type DiagnosticsOptions
- type DoHTTPRequestCallback
- type EndpointPingResult
- type EndpointState
- type ExecHelloResponse
- type FailoverEntry
- type GetAllCollectionManifestsCallback
- type GetAllCollectionManifestsOptions
- type GetAllCollectionManifestsResult
- type GetAndLockCallback
- type GetAndLockOptions
- type GetAndLockResult
- type GetAndTouchCallback
- type GetAndTouchOptions
- type GetAndTouchResult
- type GetAnyReplicaOptions
- type GetCallback
- type GetCollectionIDCallback
- type GetCollectionIDOptions
- type GetCollectionIDResult
- type GetCollectionManifestCallback
- type GetCollectionManifestOptions
- type GetCollectionManifestResult
- type GetFailoverLogCallback
- type GetMetaCallback
- type GetMetaOptions
- type GetMetaResult
- type GetOneReplicaOptions
- type GetOptions
- type GetRandomCallback
- type GetRandomOptions
- type GetRandomResult
- type GetReplicaCallback
- type GetReplicaResult
- type GetResult
- type GetVBucketSeqnosCallback
- type GetVbucketSeqnoFilterOptions
- type GetVbucketSeqnoOptions
- type HTTPConfig
- type HTTPError
- type HTTPRequest
- type HTTPResponse
- type IoConfig
- type KVConfig
- type KeyValueError
- type LogLevel
- type LogRedactLevel
- type Logger
- type LookupInCallback
- type LookupInOptions
- type LookupInResult
- type Manifest
- type ManifestCollection
- type ManifestScope
- type MemdConnInfo
- type Meter
- type MeterConfig
- type MutateInCallback
- type MutateInOptions
- type MutateInResult
- type MutationToken
- type N1QLError
- type N1QLErrorDesc
- type N1QLQueryCallback
- type N1QLQueryOptions
- type N1QLRowReader
- type NoRetryRetryAction
- type ObserveCallback
- type ObserveOptions
- type ObserveResult
- type ObserveVbCallback
- type ObserveVbOptions
- type ObserveVbResult
- type OpenStreamCallback
- type OpenStreamFilterOptions
- type OpenStreamManifestOptions
- type OpenStreamOptions
- type OpenStreamStreamOptions
- type OrphanReporterConfig
- type PasswordAuthProvider
- type PendingOp
- type PingCallback
- type PingOptions
- type PingResult
- type PingState
- type ReconfigureSecurityOptions
- type ReplaceOptions
- type RequestSpan
- type RequestSpanContext
- type RequestTracer
- type RetryAction
- type RetryReason
- type RetryRequest
- type RetryStrategy
- type SaslListMechsCompleted
- type SearchError
- type SearchQueryCallback
- type SearchQueryOptions
- type SearchRowReader
- type SecurityConfig
- type SeedConfig
- type SeqNo
- type ServiceType
- type SetMetaCallback
- type SetMetaOptions
- type SetMetaResult
- type SetOptions
- type SingleServerManifestResult
- type SingleServerStats
- type SnapshotState
- type SpanStatus
- type StatsCallback
- type StatsOptions
- type StatsResult
- type StatsTarget
- type StoreCallback
- type StoreResult
- type StreamObserver
- type SubDocOp
- type SubDocResult
- type SubDocumentError
- type TimeoutError
- type TouchCallback
- type TouchOptions
- type TouchResult
- type TracerConfig
- type UnlockCallback
- type UnlockOptions
- type UnlockResult
- type UserPassPair
- type VBucketIDStatsTarget
- type ValueRecorder
- type VbSeqNoEntry
- type VbUUID
- type ViewError
- type ViewQueryCallback
- type ViewQueryErrorDesc
- type ViewQueryOptions
- type ViewQueryRowReader
- type WaitUntilReadyCallback
- type WaitUntilReadyOptions
- type WaitUntilReadyResult
- type WithDurationRetryAction
Constants ¶
const ( // PlainAuthMechanism represents that PLAIN auth should be performed. PlainAuthMechanism = AuthMechanism("PLAIN") // ScramSha1AuthMechanism represents that SCRAM SHA1 auth should be performed. ScramSha1AuthMechanism = AuthMechanism("SCRAM-SHA1") // ScramSha256AuthMechanism represents that SCRAM SHA256 auth should be performed. ScramSha256AuthMechanism = AuthMechanism("SCRAM-SHA256") // ScramSha512AuthMechanism represents that SCRAM SHA512 auth should be performed. ScramSha512AuthMechanism = AuthMechanism("SCRAM-SHA512") )
const ( // UnknownType indicates the values type is unknown. UnknownType = DataType(0) // JSONType indicates the value is JSON data. JSONType = DataType(1) // BinaryType indicates the value is binary data. BinaryType = DataType(2) // StringType indicates the value is string data. StringType = DataType(3) )
const ( // UnknownCompression indicates that the compression type is unknown. UnknownCompression = CompressionType(0) // NoCompression indicates that no compression is being used. NoCompression = CompressionType(1) )
const ( // MemdService represents a memcached service. MemdService = ServiceType(1) // MgmtService represents a management service (typically ns_server). MgmtService = ServiceType(2) // CapiService represents a CouchAPI service (typically for views). CapiService = ServiceType(3) // N1qlService represents a N1QL service (typically for query). N1qlService = ServiceType(4) // FtsService represents a full-text-search service. FtsService = ServiceType(5) // CbasService represents an analytics service. CbasService = ServiceType(6) // EventingService represents the eventing service. EventingService = ServiceType(7) // GSIService represents the indexing service. GSIService = ServiceType(8) // BackupService represents the backup service. BackupService = ServiceType(9) )
const ( // DcpAgentPriorityLow sets the priority for the dcp stream to low DcpAgentPriorityLow = DcpAgentPriority(0) // DcpAgentPriorityMed sets the priority for the dcp stream to medium DcpAgentPriorityMed = DcpAgentPriority(1) // DcpAgentPriorityHigh sets the priority for the dcp stream to high DcpAgentPriorityHigh = DcpAgentPriority(2) )
const ( // ClusterStateOnline specifies that all nodes and their sockets are reachable. ClusterStateOnline = ClusterState(1) // ClusterStateDegraded specifies that at least one socket per service is reachable. ClusterStateDegraded = ClusterState(2) // ClusterStateOffline is used to specify that not even one socker per service is reachable. ClusterStateOffline = ClusterState(3) )
const ( // ClusterCapabilityEnhancedPreparedStatements represents that the cluster supports enhanced prepared statements. ClusterCapabilityEnhancedPreparedStatements = ClusterCapability(0x01) )
Variables ¶
var ( // ErrNoSupportedMechanisms occurs when the server does not support any of the // authentication methods that the client finds suitable. ErrNoSupportedMechanisms = errors.New("no supported authentication mechanisms") // ErrBadHosts occurs when the list of hosts specified cannot be contacted. ErrBadHosts = errors.New("failed to connect to any of the specified hosts") // ErrProtocol occurs when the server responds with unexpected or unparseable data. ErrProtocol = errors.New("failed to parse server response") // ErrNoReplicas occurs when no replicas respond in time ErrNoReplicas = errors.New("no replicas responded in time") // ErrCliInternalError indicates an internal error occurred within the client. ErrCliInternalError = errors.New("client internal error") // ErrInvalidCredentials is returned when an invalid set of credentials is provided for a service. ErrInvalidCredentials = errors.New("an invalid set of credentials was provided") // ErrInvalidServer occurs when an explicit, but invalid server index is specified. ErrInvalidServer = errors.New("specific server index is invalid") // ErrInvalidVBucket occurs when an explicit, but invalid vbucket index is specified. ErrInvalidVBucket = errors.New("specific vbucket index is invalid") // ErrInvalidReplica occurs when an explicit, but invalid replica index is specified. ErrInvalidReplica = errors.New("specific server index is invalid") // ErrInvalidService occurs when an explicit but invalid service type is specified ErrInvalidService = errors.New("invalid service") // ErrInvalidCertificate occurs when a certificate that is not useable is passed to an Agent. ErrInvalidCertificate = errors.New("certificate is invalid") // ErrCollectionsUnsupported occurs when collections are used but either server does not support them or the agent // was created without them enabled. ErrCollectionsUnsupported = errors.New("collections are not enabled") // ErrBucketAlreadySelected occurs when SelectBucket is called when a bucket is already selected.. ErrBucketAlreadySelected = errors.New("bucket already selected") // ErrShutdown occurs when operations are performed on a previously closed Agent. ErrShutdown = errors.New("connection shut down") // ErrOverload occurs when too many operations are dispatched and all queues are full. ErrOverload = errors.New("queue overflowed") // ErrSocketClosed occurs when a socket closes while an operation is in flight. ErrSocketClosed = io.EOF // ErrGCCCPInUse occurs when an operation dis performed whilst the client is connect via GCCCP. ErrGCCCPInUse = errors.New("connected via gcccp, kv operations are not supported, open a bucket first") // ErrNotMyVBucket occurs when an operation is sent to a node which does not own the vbucket. ErrNotMyVBucket = errors.New("not my vbucket") // ErrForcedReconnect occurs when an operation is in flight during a forced reconnect. ErrForcedReconnect = errors.New("forced reconnect") )
var ( // ErrTimeout occurs when an operation does not receive a response in a timely manner. ErrTimeout = errors.New("operation has timed out") ErrRequestCanceled = errors.New("request canceled") ErrInvalidArgument = errors.New("invalid argument") ErrServiceNotAvailable = errors.New("service not available") ErrInternalServerFailure = errors.New("internal server failure") ErrAuthenticationFailure = errors.New("authentication failure") ErrTemporaryFailure = errors.New("temporary failure") ErrParsingFailure = errors.New("parsing failure") ErrMemdClientClosed = errors.New("memdclient closed") ErrRequestAlreadyDispatched = errors.New("request already dispatched") ErrCasMismatch = errors.New("cas mismatch") ErrBucketNotFound = errors.New("bucket not found") ErrCollectionNotFound = errors.New("collection not found") ErrEncodingFailure = errors.New("encoding failure") ErrDecodingFailure = errors.New("decoding failure") ErrUnsupportedOperation = errors.New("unsupported operation") ErrAmbiguousTimeout = &dwError{ErrTimeout, "ambiguous timeout"} ErrUnambiguousTimeout = &dwError{ErrTimeout, "unambiguous timeout"} // ErrFeatureNotAvailable occurs when an operation is performed on a bucket which does not support it. ErrFeatureNotAvailable = errors.New("feature is not available") ErrScopeNotFound = errors.New("scope not found") ErrIndexNotFound = errors.New("index not found") ErrIndexExists = errors.New("index exists") ErrRateLimitingFailure = errors.New("rate limiting failure") ErrQuotaLimitingFailure = errors.New("quota limiting failure") )
Shared Error Definitions RFC#58@15
var ( ErrDocumentNotFound = errors.New("document not found") ErrDocumentUnretrievable = errors.New("document unretrievable") ErrDocumentLocked = errors.New("document locked") ErrValueTooLarge = errors.New("value too large") ErrDocumentExists = errors.New("document exists") ErrValueNotJSON = errors.New("value not json") ErrDurabilityLevelNotAvailable = errors.New("durability level not available") ErrDurabilityImpossible = errors.New("durability impossible") ErrDurabilityAmbiguous = errors.New("durability ambiguous") ErrDurableWriteInProgress = errors.New("durable write in progress") ErrDurableWriteReCommitInProgress = errors.New("durable write recommit in progress") ErrMutationLost = errors.New("mutation lost") ErrPathNotFound = errors.New("path not found") ErrPathMismatch = errors.New("path mismatch") ErrPathInvalid = errors.New("path invalid") ErrPathTooBig = errors.New("path too big") ErrPathTooDeep = errors.New("path too deep") ErrValueTooDeep = errors.New("value too deep") ErrValueInvalid = errors.New("value invalid") ErrDocumentNotJSON = errors.New("document not json") ErrNumberTooBig = errors.New("number too big") ErrDeltaInvalid = errors.New("delta invalid") ErrPathExists = errors.New("path exists") ErrXattrUnknownMacro = errors.New("xattr unknown macro") ErrXattrInvalidFlagCombo = errors.New("xattr invalid flag combination") ErrXattrInvalidKeyCombo = errors.New("xattr invalid key combination") ErrXattrUnknownVirtualAttribute = errors.New("xattr unknown virtual attribute") ErrXattrCannotModifyVirtualAttribute = errors.New("xattr cannot modify virtual attribute") ErrXattrInvalidOrder = errors.New("xattr invalid order") )
Key Value Error Definitions RFC#58@15
var ( ErrPlanningFailure = errors.New("planning failure") ErrIndexFailure = errors.New("index failure") ErrPreparedStatementFailure = errors.New("prepared statement failure") ErrDMLFailure = errors.New("data service returned an error during execution of DML statement") )
Query Error Definitions RFC#58@15
var ( ErrCompilationFailure = errors.New("compilation failure") ErrJobQueueFull = errors.New("job queue full") ErrDatasetNotFound = errors.New("dataset not found") ErrDataverseNotFound = errors.New("dataverse not found") ErrDatasetExists = errors.New("dataset exists") ErrDataverseExists = errors.New("dataverse exists") ErrLinkNotFound = errors.New("link not found") )
Analytics Error Definitions RFC#58@15
var ( ErrViewNotFound = errors.New("view not found") ErrDesignDocumentNotFound = errors.New("design document not found") )
View Error Definitions RFC#58@15
var ( ErrCollectionExists = errors.New("collection exists") ErrScopeExists = errors.New("scope exists") ErrUserNotFound = errors.New("user not found") ErrGroupNotFound = errors.New("group not found") ErrBucketExists = errors.New("bucket exists") ErrUserExists = errors.New("user exists") ErrBucketNotFlushable = errors.New("bucket not flushable") ErrEventingFunctionNotFound = errors.New("eventing function not found") ErrEventingFunctionNotDeployed = errors.New("eventing function not deployed") ErrEventingFunctionCompilationFailure = errors.New("eventing function compilation failure") ErrEventingFunctionIdenticalKeyspace = errors.New("eventing function identical keyspace") ErrEventingFunctionNotBootstrapped = errors.New("eventing function not bootstrapped") ErrEventingFunctionNotUndeployed = errors.New("eventing function not undeployed") )
Management Error Definitions RFC#58@15
var ( // ErrDCPStreamClosed occurs when a DCP stream is closed gracefully. ErrDCPStreamClosed = makeStreamEndStatusError(memd.StreamEndClosed) // ErrDCPStreamStateChanged occurs when a DCP stream is interrupted by failover. ErrDCPStreamStateChanged = makeStreamEndStatusError(memd.StreamEndStateChanged) // ErrDCPStreamDisconnected occurs when a DCP stream is disconnected. ErrDCPStreamDisconnected = makeStreamEndStatusError(memd.StreamEndDisconnected) // ErrDCPStreamTooSlow occurs when a DCP stream is cancelled due to the application // not keeping up with the rate of flow of DCP events sent by the server. ErrDCPStreamTooSlow = makeStreamEndStatusError(memd.StreamEndTooSlow) // ErrDCPBackfillFailed occurs when there was an issue starting the backfill on // the server e.g. the requested start seqno was behind the purge seqno. ErrDCPBackfillFailed = makeStreamEndStatusError(memd.StreamEndBackfillFailed) // ErrDCPStreamFilterEmpty occurs when all of the collections for a DCP stream are // dropped. ErrDCPStreamFilterEmpty = makeStreamEndStatusError(memd.StreamEndFilterEmpty) // ErrStreamIDNotEnabled occurs when dcp operations are performed using a stream ID when stream IDs are not enabled. ErrStreamIDNotEnabled = errors.New("stream IDs have not been enabled on this stream") )
var ( // ErrMemdKeyNotFound occurs when an operation is performed on a key that does not exist. ErrMemdKeyNotFound = makeKvStatusError(memd.StatusKeyNotFound) // ErrMemdKeyExists occurs when an operation is performed on a key that could not be found. ErrMemdKeyExists = makeKvStatusError(memd.StatusKeyExists) // ErrMemdTooBig occurs when an operation attempts to store more data in a single document // than the server is capable of storing (by default, this is a 20MB limit). ErrMemdTooBig = makeKvStatusError(memd.StatusTooBig) // ErrMemdInvalidArgs occurs when the server receives invalid arguments for an operation. ErrMemdInvalidArgs = makeKvStatusError(memd.StatusInvalidArgs) // ErrMemdNotStored occurs when the server fails to store a key. ErrMemdNotStored = makeKvStatusError(memd.StatusNotStored) // ErrMemdBadDelta occurs when an invalid delta value is specified to a counter operation. ErrMemdBadDelta = makeKvStatusError(memd.StatusBadDelta) // ErrMemdNotMyVBucket occurs when an operation is dispatched to a server which is // non-authoritative for a specific vbucket. ErrMemdNotMyVBucket = makeKvStatusError(memd.StatusNotMyVBucket) // ErrMemdNoBucket occurs when no bucket was selected on a connection. ErrMemdNoBucket = makeKvStatusError(memd.StatusNoBucket) // ErrMemdLocked occurs when a document is already locked. ErrMemdLocked = makeKvStatusError(memd.StatusLocked) // ErrMemdAuthStale occurs when authentication credentials have become invalidated. ErrMemdAuthStale = makeKvStatusError(memd.StatusAuthStale) // ErrMemdAuthError occurs when the authentication information provided was not valid. ErrMemdAuthError = makeKvStatusError(memd.StatusAuthError) // ErrMemdAuthContinue occurs in multi-step authentication when more authentication // work needs to be performed in order to complete the authentication process. ErrMemdAuthContinue = makeKvStatusError(memd.StatusAuthContinue) // ErrMemdRangeError occurs when the range specified to the server is not valid. ErrMemdRangeError = makeKvStatusError(memd.StatusRangeError) // ErrMemdRollback occurs when a DCP stream fails to open due to a rollback having // previously occurred since the last time the stream was opened. ErrMemdRollback = makeKvStatusError(memd.StatusRollback) // ErrMemdAccessError occurs when an access error occurs. ErrMemdAccessError = makeKvStatusError(memd.StatusAccessError) // ErrMemdNotInitialized is sent by servers which are still initializing, and are not // yet ready to accept operations on behalf of a particular bucket. ErrMemdNotInitialized = makeKvStatusError(memd.StatusNotInitialized) // ErrMemdUnknownCommand occurs when an unknown operation is sent to a server. ErrMemdUnknownCommand = makeKvStatusError(memd.StatusUnknownCommand) // ErrMemdOutOfMemory occurs when the server cannot service a request due to memory // limitations. ErrMemdOutOfMemory = makeKvStatusError(memd.StatusOutOfMemory) // ErrMemdNotSupported occurs when an operation is understood by the server, but that // operation is not supported on this server (occurs for a variety of reasons). ErrMemdNotSupported = makeKvStatusError(memd.StatusNotSupported) // ErrMemdInternalError occurs when internal errors prevent the server from processing // your request. ErrMemdInternalError = makeKvStatusError(memd.StatusInternalError) // ErrMemdBusy occurs when the server is too busy to process your request right away. // Attempting the operation at a later time will likely succeed. ErrMemdBusy = makeKvStatusError(memd.StatusBusy) // ErrMemdTmpFail occurs when a temporary failure is preventing the server from // processing your request. ErrMemdTmpFail = makeKvStatusError(memd.StatusTmpFail) // ErrMemdCollectionNotFound occurs when a Collection cannot be found. ErrMemdCollectionNotFound = makeKvStatusError(memd.StatusCollectionUnknown) // ErrMemdScopeNotFound occurs when a Collection cannot be found. ErrMemdScopeNotFound = makeKvStatusError(memd.StatusScopeUnknown) // ErrMemdDurabilityInvalidLevel occurs when an invalid durability level was requested. ErrMemdDurabilityInvalidLevel = makeKvStatusError(memd.StatusDurabilityInvalidLevel) // ErrMemdDurabilityImpossible occurs when a request is performed with impossible // durability level requirements. ErrMemdDurabilityImpossible = makeKvStatusError(memd.StatusDurabilityImpossible) // ErrMemdSyncWriteInProgess occurs when an attempt is made to write to a key that has // a SyncWrite pending. ErrMemdSyncWriteInProgess = makeKvStatusError(memd.StatusSyncWriteInProgress) // ErrMemdSyncWriteAmbiguous occurs when an SyncWrite does not complete in the specified // time and the result is ambiguous. ErrMemdSyncWriteAmbiguous = makeKvStatusError(memd.StatusSyncWriteAmbiguous) // ErrMemdSyncWriteReCommitInProgress occurs when an SyncWrite is being recommitted. ErrMemdSyncWriteReCommitInProgress = makeKvStatusError(memd.StatusSyncWriteReCommitInProgress) // ErrMemdSubDocPathNotFound occurs when a sub-document operation targets a path // which does not exist in the specifie document. ErrMemdSubDocPathNotFound = makeKvStatusError(memd.StatusSubDocPathNotFound) // ErrMemdSubDocPathMismatch occurs when a sub-document operation specifies a path // which does not match the document structure (field access on an array). ErrMemdSubDocPathMismatch = makeKvStatusError(memd.StatusSubDocPathMismatch) // ErrMemdSubDocPathInvalid occurs when a sub-document path could not be parsed. ErrMemdSubDocPathInvalid = makeKvStatusError(memd.StatusSubDocPathInvalid) // ErrMemdSubDocPathTooBig occurs when a sub-document path is too big. ErrMemdSubDocPathTooBig = makeKvStatusError(memd.StatusSubDocPathTooBig) // ErrMemdSubDocDocTooDeep occurs when an operation would cause a document to be // nested beyond the depth limits allowed by the sub-document specification. ErrMemdSubDocDocTooDeep = makeKvStatusError(memd.StatusSubDocDocTooDeep) // ErrMemdSubDocCantInsert occurs when a sub-document operation could not insert. ErrMemdSubDocCantInsert = makeKvStatusError(memd.StatusSubDocCantInsert) // ErrMemdSubDocNotJSON occurs when a sub-document operation is performed on a // document which is not JSON. ErrMemdSubDocNotJSON = makeKvStatusError(memd.StatusSubDocNotJSON) // ErrMemdSubDocBadRange occurs when a sub-document operation is performed with // a bad range. ErrMemdSubDocBadRange = makeKvStatusError(memd.StatusSubDocBadRange) // ErrMemdSubDocBadDelta occurs when a sub-document counter operation is performed // and the specified delta is not valid. ErrMemdSubDocBadDelta = makeKvStatusError(memd.StatusSubDocBadDelta) // ErrMemdSubDocPathExists occurs when a sub-document operation expects a path not // to exists, but the path was found in the document. ErrMemdSubDocPathExists = makeKvStatusError(memd.StatusSubDocPathExists) // ErrMemdSubDocValueTooDeep occurs when a sub-document operation specifies a value // which is deeper than the depth limits of the sub-document specification. ErrMemdSubDocValueTooDeep = makeKvStatusError(memd.StatusSubDocValueTooDeep) // ErrMemdSubDocBadCombo occurs when a multi-operation sub-document operation is // performed and operations within the package of ops conflict with each other. ErrMemdSubDocBadCombo = makeKvStatusError(memd.StatusSubDocBadCombo) // ErrMemdSubDocBadMulti occurs when a multi-operation sub-document operation is // performed and operations within the package of ops conflict with each other. ErrMemdSubDocBadMulti = makeKvStatusError(memd.StatusSubDocBadMulti) // ErrMemdSubDocSuccessDeleted occurs when a multi-operation sub-document operation // is performed on a soft-deleted document. ErrMemdSubDocSuccessDeleted = makeKvStatusError(memd.StatusSubDocSuccessDeleted) // ErrMemdSubDocXattrInvalidFlagCombo occurs when an invalid set of // extended-attribute flags is passed to a sub-document operation. ErrMemdSubDocXattrInvalidFlagCombo = makeKvStatusError(memd.StatusSubDocXattrInvalidFlagCombo) // ErrMemdSubDocXattrInvalidKeyCombo occurs when an invalid set of key operations // are specified for a extended-attribute sub-document operation. ErrMemdSubDocXattrInvalidKeyCombo = makeKvStatusError(memd.StatusSubDocXattrInvalidKeyCombo) // ErrMemdSubDocXattrUnknownMacro occurs when an invalid macro value is specified. ErrMemdSubDocXattrUnknownMacro = makeKvStatusError(memd.StatusSubDocXattrUnknownMacro) // ErrMemdSubDocXattrUnknownVAttr occurs when an invalid virtual attribute is specified. ErrMemdSubDocXattrUnknownVAttr = makeKvStatusError(memd.StatusSubDocXattrUnknownVAttr) // ErrMemdSubDocXattrCannotModifyVAttr occurs when a mutation is attempted upon // a virtual attribute (which are immutable by definition). ErrMemdSubDocXattrCannotModifyVAttr = makeKvStatusError(memd.StatusSubDocXattrCannotModifyVAttr) // ErrMemdSubDocMultiPathFailureDeleted occurs when a Multi Path Failure occurs on // a soft-deleted document. ErrMemdSubDocMultiPathFailureDeleted = makeKvStatusError(memd.StatusSubDocMultiPathFailureDeleted) // ErrMemdRateLimitedNetworkIngress occurs when the server rate limits due to network ingress. ErrMemdRateLimitedNetworkIngress = makeKvStatusError(memd.StatusRateLimitedNetworkIngress) // ErrMemdRateLimitedNetworkEgress occurs when the server rate limits due to network egress. ErrMemdRateLimitedNetworkEgress = makeKvStatusError(memd.StatusRateLimitedNetworkEgress) // ErrMemdRateLimitedMaxConnections occurs when the server rate limits due to the application reaching the maximum // number of allowed connections. ErrMemdRateLimitedMaxConnections = makeKvStatusError(memd.StatusRateLimitedMaxConnections) // ErrMemdRateLimitedMaxCommands occurs when the server rate limits due to the application reaching the maximum // number of allowed operations. ErrMemdRateLimitedMaxCommands = makeKvStatusError(memd.StatusRateLimitedMaxCommands) // ErrMemdRateLimitedScopeSizeLimitExceeded occurs when the server rate limits due to the application reaching the maximum // data size allowed for the scope. ErrMemdRateLimitedScopeSizeLimitExceeded = makeKvStatusError(memd.StatusRateLimitedScopeSizeLimitExceeded) )
var ( // UnknownRetryReason indicates that the operation failed for an unknown reason. UnknownRetryReason = retryReason{/* contains filtered or unexported fields */} // SocketNotAvailableRetryReason indicates that the operation failed because the underlying socket was not available. SocketNotAvailableRetryReason = retryReason{/* contains filtered or unexported fields */} // ServiceNotAvailableRetryReason indicates that the operation failed because the requested service was not available. ServiceNotAvailableRetryReason = retryReason{/* contains filtered or unexported fields */} // NodeNotAvailableRetryReason indicates that the operation failed because the requested node was not available. NodeNotAvailableRetryReason = retryReason{/* contains filtered or unexported fields */} // KVNotMyVBucketRetryReason indicates that the operation failed because it was sent to the wrong node for the vbucket. KVNotMyVBucketRetryReason = retryReason{/* contains filtered or unexported fields */} // KVCollectionOutdatedRetryReason indicates that the operation failed because the collection ID on the request is outdated. KVCollectionOutdatedRetryReason = retryReason{/* contains filtered or unexported fields */} // KVErrMapRetryReason indicates that the operation failed for an unsupported reason but the KV error map indicated // that the operation can be retried. KVErrMapRetryReason = retryReason{/* contains filtered or unexported fields */} // KVLockedRetryReason indicates that the operation failed because the document was locked. KVLockedRetryReason = retryReason{/* contains filtered or unexported fields */} // KVTemporaryFailureRetryReason indicates that the operation failed because of a temporary failure. KVTemporaryFailureRetryReason = retryReason{/* contains filtered or unexported fields */} // KVSyncWriteInProgressRetryReason indicates that the operation failed because a sync write is in progress. KVSyncWriteInProgressRetryReason = retryReason{/* contains filtered or unexported fields */} // KVSyncWriteRecommitInProgressRetryReason indicates that the operation failed because a sync write recommit is in progress. KVSyncWriteRecommitInProgressRetryReason = retryReason{/* contains filtered or unexported fields */} // ServiceResponseCodeIndicatedRetryReason indicates that the operation failed and the service responded stating that // the request should be retried. ServiceResponseCodeIndicatedRetryReason = retryReason{/* contains filtered or unexported fields */} // SocketCloseInFlightRetryReason indicates that the operation failed because the socket was closed whilst the operation // was in flight. SocketCloseInFlightRetryReason = retryReason{/* contains filtered or unexported fields */} // PipelineOverloadedRetryReason indicates that the operation failed because the pipeline queue was full. PipelineOverloadedRetryReason = retryReason{/* contains filtered or unexported fields */} // CircuitBreakerOpenRetryReason indicates that the operation failed because the circuit breaker for the underlying socket was open. CircuitBreakerOpenRetryReason = retryReason{/* contains filtered or unexported fields */} // QueryIndexNotFoundRetryReason indicates that the operation failed to to a missing query index QueryIndexNotFoundRetryReason = retryReason{/* contains filtered or unexported fields */} // QueryPreparedStatementFailureRetryReason indicates that the operation failed due to a prepared statement failure QueryPreparedStatementFailureRetryReason = retryReason{/* contains filtered or unexported fields */} // AnalyticsTemporaryFailureRetryReason indicates that an analytics operation failed due to a temporary failure AnalyticsTemporaryFailureRetryReason = retryReason{/* contains filtered or unexported fields */} // SearchTooManyRequestsRetryReason indicates that a search operation failed due to too many requests SearchTooManyRequestsRetryReason = retryReason{/* contains filtered or unexported fields */} // NotReadyRetryReason indicates that the WaitUntilReady operation is not ready NotReadyRetryReason = retryReason{/* contains filtered or unexported fields */} // NoPipelineSnapshotRetryReason indicates that there was no pipeline snapshot available NoPipelineSnapshotRetryReason = retryReason{/* contains filtered or unexported fields */} // BucketNotReadyReason indicates that the user has priviledges to access the bucket but the bucket doesn't exist // or is in warm up. // Uncommitted: This API may change in the future. BucketNotReadyReason = retryReason{/* contains filtered or unexported fields */} // ConnectionErrorRetryReason indicates that there were errors reported by underlying connections. // Check server ports and cluster encryption setting. ConnectionErrorRetryReason = retryReason{/* contains filtered or unexported fields */} // MemdWriteFailure indicates that the operation failed because the write failed on the connection. MemdWriteFailure = retryReason{/* contains filtered or unexported fields */} )
Functions ¶
func AcquireTimer ¶
AcquireTimer acquires a time from a global pool of timers maintained by the library.
func ControlledBackoff ¶
ControlledBackoff calculates a backoff time duration from the retry attempts on a given request.
func DecodeCommonFlags ¶
func DecodeCommonFlags(flags uint32) (DataType, CompressionType)
DecodeCommonFlags decodes a flags value into a data type and compression type using the common flags specification.
func EncodeCommonFlags ¶
func EncodeCommonFlags(valueType DataType, compression CompressionType) uint32
EncodeCommonFlags encodes a data type and compression type into a flags value using the common flags specification.
func ReleaseTimer ¶
ReleaseTimer returns a timer to the global pool of timers maintained by the library.
func SaslAuthPlain ¶
func SaslAuthPlain(username, password string, client AuthClient, deadline time.Time, cb func(err error)) error
SaslAuthPlain performs PLAIN SASL authentication against an AuthClient.
func SaslAuthScramSha1 ¶
func SaslAuthScramSha1(username, password string, client AuthClient, deadline time.Time, continueCb func(), completedCb func(err error)) error
SaslAuthScramSha1 performs SCRAM-SHA1 SASL authentication against an AuthClient.
func SaslAuthScramSha256 ¶
func SaslAuthScramSha256(username, password string, client AuthClient, deadline time.Time, continueCb func(), completedCb func(err error)) error
SaslAuthScramSha256 performs SCRAM-SHA256 SASL authentication against an AuthClient.
func SaslAuthScramSha512 ¶
func SaslAuthScramSha512(username, password string, client AuthClient, deadline time.Time, continueCb func(), completedCb func(err error)) error
SaslAuthScramSha512 performs SCRAM-SHA512 SASL authentication against an AuthClient.
func SetLogRedactionLevel ¶
func SetLogRedactionLevel(level LogRedactLevel)
SetLogRedactionLevel specifies the level with which logs should be redacted.
Types ¶
type AddOptions ¶
type AddOptions struct { Key []byte CollectionName string ScopeName string RetryStrategy RetryStrategy Value []byte Flags uint32 Datatype uint8 Expiry uint32 DurabilityLevel memd.DurabilityLevel DurabilityLevelTimeout time.Duration CollectionID uint32 Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
AddOptions encapsulates the parameters for a AddEx operation.
type AdjoinCallback ¶
type AdjoinCallback func(*AdjoinResult, error)
AdjoinCallback is invoked upon completion of a Append or Prepend operation.
type AdjoinOptions ¶
type AdjoinOptions struct { Key []byte Value []byte CollectionName string ScopeName string RetryStrategy RetryStrategy Cas Cas DurabilityLevel memd.DurabilityLevel DurabilityLevelTimeout time.Duration CollectionID uint32 Deadline time.Time PreserveExpiry bool // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
AdjoinOptions encapsulates the parameters for a AppendEx or PrependEx operation.
type AdjoinResult ¶
type AdjoinResult struct { Cas Cas MutationToken MutationToken }
AdjoinResult encapsulates the result of a AppendEx or PrependEx operation.
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent represents the base client handling connections to a Couchbase Server. This is used internally by the higher level classes for communicating with the cluster, it can also be used to perform more advanced operations with a cluster.
func CreateAgent ¶
func CreateAgent(config *AgentConfig) (*Agent, error)
CreateAgent creates an agent for performing normal operations.
func (*Agent) Add ¶
func (agent *Agent) Add(opts AddOptions, cb StoreCallback) (PendingOp, error)
Add stores a document as long as it does not already exist.
func (*Agent) AnalyticsQuery ¶
func (agent *Agent) AnalyticsQuery(opts AnalyticsQueryOptions, cb AnalyticsQueryCallback) (PendingOp, error)
AnalyticsQuery executes an analytics query
func (*Agent) Append ¶
func (agent *Agent) Append(opts AdjoinOptions, cb AdjoinCallback) (PendingOp, error)
Append appends some bytes to a document.
func (*Agent) BackupEps ¶
BackupEps returns all the available endpoints for managing/interacting with the Backup Service.
func (*Agent) BucketName ¶
BucketName returns the name of the bucket that the agent is using, if any. Uncommitted: This API may change in the future.
func (*Agent) CapiEps ¶
CapiEps returns all the available endpoints for performing map-reduce queries.
func (*Agent) Close ¶
Close shuts down the agent, disconnecting from all servers and failing any outstanding operations with ErrShutdown.
func (*Agent) ConfigSnapshot ¶
func (agent *Agent) ConfigSnapshot() (*ConfigSnapshot, error)
ConfigSnapshot returns a snapshot of the underlying configuration currently in use.
func (*Agent) Decrement ¶
func (agent *Agent) Decrement(opts CounterOptions, cb CounterCallback) (PendingOp, error)
Decrement decrements the unsigned integer value in a document.
func (*Agent) Delete ¶
func (agent *Agent) Delete(opts DeleteOptions, cb DeleteCallback) (PendingOp, error)
Delete removes a document.
func (*Agent) DeleteMeta ¶
func (agent *Agent) DeleteMeta(opts DeleteMetaOptions, cb DeleteMetaCallback) (PendingOp, error)
DeleteMeta deletes a document along with setting some internal Couchbase meta-data.
func (*Agent) Diagnostics ¶
func (agent *Agent) Diagnostics(opts DiagnosticsOptions) (*DiagnosticInfo, error)
Diagnostics returns diagnostics information about the client. Mainly containing a list of open connections and their current states.
func (*Agent) DoHTTPRequest ¶
func (agent *Agent) DoHTTPRequest(req *HTTPRequest, cb DoHTTPRequestCallback) (PendingOp, error)
DoHTTPRequest will perform an HTTP request against one of the HTTP services which are available within the SDK.
func (*Agent) EventingEps ¶
EventingEps returns all the available endpoints for managing/interacting with the Eventing Service.
func (*Agent) ForceReconnect ¶ added in v10.0.2
func (agent *Agent) ForceReconnect()
ForceReconnect gracefully rebuilds all connections being used by the agent. Any persistent in flight requests (e.g. DCP) will be terminated with ErrForcedReconnect.
Internal: This should never be used and is not supported.
func (*Agent) GSIEps ¶
GSIEps returns all the available endpoints for managing/interacting with the GSI Service.
func (*Agent) Get ¶
func (agent *Agent) Get(opts GetOptions, cb GetCallback) (PendingOp, error)
Get retrieves a document.
func (*Agent) GetAllCollectionManifests ¶
func (agent *Agent) GetAllCollectionManifests(opts GetAllCollectionManifestsOptions, cb GetAllCollectionManifestsCallback) (PendingOp, error)
GetAllCollectionManifests fetches the collection manifest from each server in the cluster, note that it's possible for one or mode nodes to be slightly behind when creating scopes/collections. This function will not update the client's collection id cache.
func (*Agent) GetAndLock ¶
func (agent *Agent) GetAndLock(opts GetAndLockOptions, cb GetAndLockCallback) (PendingOp, error)
GetAndLock retrieves a document and locks it.
func (*Agent) GetAndTouch ¶
func (agent *Agent) GetAndTouch(opts GetAndTouchOptions, cb GetAndTouchCallback) (PendingOp, error)
GetAndTouch retrieves a document and updates its expiry.
func (*Agent) GetCollectionID ¶
func (agent *Agent) GetCollectionID(scopeName string, collectionName string, opts GetCollectionIDOptions, cb GetCollectionIDCallback) (PendingOp, error)
GetCollectionID fetches the collection id and manifest id that the collection belongs to, given a scope name and collection name. This function will also prime the client's collection id cache.
func (*Agent) GetCollectionManifest ¶
func (agent *Agent) GetCollectionManifest(opts GetCollectionManifestOptions, cb GetCollectionManifestCallback) (PendingOp, error)
GetCollectionManifest fetches the current server manifest. This function will not update the client's collection id cache.
func (*Agent) GetMeta ¶
func (agent *Agent) GetMeta(opts GetMetaOptions, cb GetMetaCallback) (PendingOp, error)
GetMeta retrieves a document along with some internal Couchbase meta-data.
func (*Agent) GetOneReplica ¶
func (agent *Agent) GetOneReplica(opts GetOneReplicaOptions, cb GetReplicaCallback) (PendingOp, error)
GetOneReplica retrieves a document from a replica server.
func (*Agent) GetRandom ¶
func (agent *Agent) GetRandom(opts GetRandomOptions, cb GetRandomCallback) (PendingOp, error)
GetRandom retrieves the key and value of a random document stored within Couchbase Server.
func (*Agent) HTTPClient ¶
HTTPClient returns a pre-configured HTTP Client for communicating with Couchbase Server. You must still specify authentication information for any dispatched requests.
func (*Agent) HasCollectionsSupport ¶
HasCollectionsSupport verifies whether or not collections are available on the agent.
func (*Agent) HasSeenConfig ¶
HasSeenConfig returns whether or not the Agent has seen a valid cluster config. This does not mean that the agent currently has active connections. Volatile: This API is subject to change at any time.
func (*Agent) Increment ¶
func (agent *Agent) Increment(opts CounterOptions, cb CounterCallback) (PendingOp, error)
Increment increments the unsigned integer value in a document.
func (*Agent) Internal ¶
func (agent *Agent) Internal() *AgentInternal
Internal creates a new AgentInternal. Internal: This should never be used and is not supported.
func (*Agent) LookupIn ¶
func (agent *Agent) LookupIn(opts LookupInOptions, cb LookupInCallback) (PendingOp, error)
LookupIn performs a multiple-lookup sub-document operation on a document.
func (*Agent) MaybeRetryRequest ¶
func (agent *Agent) MaybeRetryRequest(req RetryRequest, reason RetryReason) (bool, time.Time)
MaybeRetryRequest will possibly retry a request according to the strategy belonging to the request. It will use the reason to determine whether or not the failure reason is one that can be retried.
func (*Agent) MemdEps ¶
MemdEps returns all the available endpoints for performing KV/DCP operations (using the memcached binary protocol). As apposed to other endpoints, these will have the 'couchbase(s)://' scheme prefix.
func (*Agent) MgmtEps ¶
MgmtEps returns all the available endpoints for performing management queries.
func (*Agent) MutateIn ¶
func (agent *Agent) MutateIn(opts MutateInOptions, cb MutateInCallback) (PendingOp, error)
MutateIn performs a multiple-mutation sub-document operation on a document.
func (*Agent) N1QLQuery ¶
func (agent *Agent) N1QLQuery(opts N1QLQueryOptions, cb N1QLQueryCallback) (PendingOp, error)
N1QLQuery executes a N1QL query
func (*Agent) Observe ¶
func (agent *Agent) Observe(opts ObserveOptions, cb ObserveCallback) (PendingOp, error)
Observe retrieves the current CAS and persistence state for a document.
func (*Agent) ObserveVb ¶
func (agent *Agent) ObserveVb(opts ObserveVbOptions, cb ObserveVbCallback) (PendingOp, error)
ObserveVb retrieves the persistence state sequence numbers for a particular VBucket and includes additional details not included by the basic version.
func (*Agent) Ping ¶
func (agent *Agent) Ping(opts PingOptions, cb PingCallback) (PendingOp, error)
Ping pings all of the servers we are connected to and returns a report regarding the pings that were performed.
func (*Agent) PreparedN1QLQuery ¶
func (agent *Agent) PreparedN1QLQuery(opts N1QLQueryOptions, cb N1QLQueryCallback) (PendingOp, error)
PreparedN1QLQuery executes a prepared N1QL query
func (*Agent) Prepend ¶
func (agent *Agent) Prepend(opts AdjoinOptions, cb AdjoinCallback) (PendingOp, error)
Prepend prepends some bytes to a document.
func (*Agent) ReconfigureSecurity ¶ added in v10.0.5
func (agent *Agent) ReconfigureSecurity(opts ReconfigureSecurityOptions) error
ReconfigureSecurity updates the security configuration being used by the agent. This includes the ability to toggle TLS on and off.
Calling this function will cause all underlying connections to be reconnected. The exception to this is the connection to the seed node (usually localhost), which will only be reconnected if the AuthProvider is provided on the options.
This function can only be called when the seed poller is in use i.e. when the ns_server scheme is used. Internal: This should never be used and is not supported.
func (*Agent) Replace ¶
func (agent *Agent) Replace(opts ReplaceOptions, cb StoreCallback) (PendingOp, error)
Replace replaces the value of a Couchbase document with another value.
func (*Agent) SearchQuery ¶
func (agent *Agent) SearchQuery(opts SearchQueryOptions, cb SearchQueryCallback) (PendingOp, error)
SearchQuery executes a Search query
func (*Agent) Set ¶
func (agent *Agent) Set(opts SetOptions, cb StoreCallback) (PendingOp, error)
Set stores a document.
func (*Agent) SetMeta ¶
func (agent *Agent) SetMeta(opts SetMetaOptions, cb SetMetaCallback) (PendingOp, error)
SetMeta stores a document along with setting some internal Couchbase meta-data.
func (*Agent) Stats ¶
func (agent *Agent) Stats(opts StatsOptions, cb StatsCallback) (PendingOp, error)
Stats retrieves statistics information from the server. Note that as this function is an aggregator across numerous servers, there are no guarantees about the consistency of the results. Occasionally, some nodes may not be represented in the results, or there may be conflicting information between multiple nodes (a vbucket active on two separate nodes at once).
func (*Agent) Touch ¶
func (agent *Agent) Touch(opts TouchOptions, cb TouchCallback) (PendingOp, error)
Touch updates the expiry for a document.
func (*Agent) Unlock ¶
func (agent *Agent) Unlock(opts UnlockOptions, cb UnlockCallback) (PendingOp, error)
Unlock unlocks a locked document.
func (*Agent) UsingGCCCP ¶
UsingGCCCP returns whether or not the Agent is currently using GCCCP polling.
func (*Agent) ViewQuery ¶
func (agent *Agent) ViewQuery(opts ViewQueryOptions, cb ViewQueryCallback) (PendingOp, error)
ViewQuery executes a view query
func (*Agent) WaitUntilReady ¶
func (agent *Agent) WaitUntilReady(deadline time.Time, opts WaitUntilReadyOptions, cb WaitUntilReadyCallback) (PendingOp, error)
WaitUntilReady returns whether or not the Agent has seen a valid cluster config.
type AgentConfig ¶
type AgentConfig struct { BucketName string UserAgent string SeedConfig SeedConfig SecurityConfig SecurityConfig CompressionConfig CompressionConfig ConfigPollerConfig ConfigPollerConfig IoConfig IoConfig KVConfig KVConfig HTTPConfig HTTPConfig DefaultRetryStrategy RetryStrategy CircuitBreakerConfig CircuitBreakerConfig OrphanReporterConfig OrphanReporterConfig TracerConfig TracerConfig MeterConfig MeterConfig }
AgentConfig specifies the configuration options for creation of an Agent.
func (*AgentConfig) FromConnStr ¶
func (config *AgentConfig) FromConnStr(connStr string) error
FromConnStr populates the AgentConfig with information from a Couchbase Connection String. Supported options are:
bootstrap_on (bool) - Specifies what protocol to bootstrap on (cccp, http). ca_cert_path (string) - Specifies the path to a CA certificate. network (string) - The network type to use. kv_connect_timeout (duration) - Maximum period to attempt to connect to cluster in ms. config_poll_interval (duration) - Period to wait between CCCP config polling in ms. config_poll_timeout (duration) - Maximum period of time to wait for a CCCP request. compression (bool) - Whether to enable network-wise compression of documents. compression_min_size (int) - The minimal size of the document in bytes to consider compression. compression_min_ratio (float64) - The minimal compress ratio (compressed / original) for the document to be sent compressed. enable_server_durations (bool) - Whether to enable fetching server operation durations. max_idle_http_connections (int) - Maximum number of idle http connections in the pool. max_perhost_idle_http_connections (int) - Maximum number of idle http connections in the pool per host. idle_http_connection_timeout (duration) - Maximum length of time for an idle connection to stay in the pool in ms. orphaned_response_logging (bool) - Whether to enable orphaned response logging. orphaned_response_logging_interval (duration) - How often to print the orphan log records. orphaned_response_logging_sample_size (int) - The maximum number of orphan log records to track. dcp_priority (int) - Specifies the priority to request from the Cluster when connecting for DCP. enable_dcp_expiry (bool) - Whether to enable the feature to distinguish between explicit delete and expired delete on DCP. http_redial_period (duration) - The maximum length of time for the HTTP poller to stay connected before reconnecting. http_retry_delay (duration) - The length of time to wait between HTTP poller retries if connecting fails. kv_pool_size (int) - The number of connections to create to each kv node. max_queue_size (int) - The maximum number of requests that can be queued for sending per connection. unordered_execution_enabled (bool) - Whether to enabled the "out of order responses" feature.
type AgentGroup ¶
type AgentGroup struct {
// contains filtered or unexported fields
}
AgentGroup represents a collection of agents that can be used for performing operations against a cluster. It holds an internal special agent type which does not create its own memcached connections but registers itself for cluster config updates on all agents that are created through it.
func CreateAgentGroup ¶
func CreateAgentGroup(config *AgentGroupConfig) (*AgentGroup, error)
CreateAgentGroup will return a new AgentGroup with a base config of the config provided. Volatile: AgentGroup is subject to change or removal.
func (*AgentGroup) AnalyticsQuery ¶
func (ag *AgentGroup) AnalyticsQuery(opts AnalyticsQueryOptions, cb AnalyticsQueryCallback) (PendingOp, error)
AnalyticsQuery executes an analytics query against a random connected agent. If no agent is connected then this will block until one is available or the deadline is reached.
func (*AgentGroup) Close ¶
func (ag *AgentGroup) Close() error
Close will close all underlying agents.
func (*AgentGroup) Diagnostics ¶
func (ag *AgentGroup) Diagnostics(opts DiagnosticsOptions) (*DiagnosticInfo, error)
Diagnostics returns diagnostics information about the client. Mainly containing a list of open connections and their current states.
func (*AgentGroup) DoHTTPRequest ¶
func (ag *AgentGroup) DoHTTPRequest(req *HTTPRequest, cb DoHTTPRequestCallback) (PendingOp, error)
DoHTTPRequest will perform an HTTP request against one of the HTTP services which are available within the SDK, using a random connected agent. If no agent is connected then this will block until one is available or the deadline is reached.
func (*AgentGroup) GetAgent ¶
func (ag *AgentGroup) GetAgent(bucketName string) *Agent
GetAgent will return the agent, if any, corresponding to the bucket name specified.
func (*AgentGroup) N1QLQuery ¶
func (ag *AgentGroup) N1QLQuery(opts N1QLQueryOptions, cb N1QLQueryCallback) (PendingOp, error)
N1QLQuery executes a N1QL query against a random connected agent. If no agent is connected then this will block until one is available or the deadline is reached.
func (*AgentGroup) OpenBucket ¶
func (ag *AgentGroup) OpenBucket(bucketName string) error
OpenBucket will attempt to open a new bucket against the cluster. If an agent using the specified bucket name already exists then this will not open a new connection.
func (*AgentGroup) Ping ¶
func (ag *AgentGroup) Ping(opts PingOptions, cb PingCallback) (PendingOp, error)
Ping pings all of the servers we are connected to and returns a report regarding the pings that were performed.
func (*AgentGroup) PreparedN1QLQuery ¶
func (ag *AgentGroup) PreparedN1QLQuery(opts N1QLQueryOptions, cb N1QLQueryCallback) (PendingOp, error)
PreparedN1QLQuery executes a prepared N1QL query against a random connected agent. If no agent is connected then this will block until one is available or the deadline is reached.
func (*AgentGroup) SearchQuery ¶
func (ag *AgentGroup) SearchQuery(opts SearchQueryOptions, cb SearchQueryCallback) (PendingOp, error)
SearchQuery executes a Search query against a random connected agent. If no agent is connected then this will block until one is available or the deadline is reached.
func (*AgentGroup) WaitUntilReady ¶
func (ag *AgentGroup) WaitUntilReady(deadline time.Time, opts WaitUntilReadyOptions, cb WaitUntilReadyCallback) (PendingOp, error)
WaitUntilReady returns whether or not the AgentGroup can ping the requested services. This can only be used when no bucket has been opened, if a bucket has been opened then you *must* use the agent belonging to that bucket.
type AgentGroupConfig ¶
type AgentGroupConfig struct {
AgentConfig
}
AgentGroupConfig specifies the configuration options for creation of an AgentGroup.
func (*AgentGroupConfig) FromConnStr ¶
func (config *AgentGroupConfig) FromConnStr(connStr string) error
FromConnStr populates the AgentGroupConfig with information from a Couchbase Connection String. See AgentConfig for supported options.
type AgentInternal ¶
type AgentInternal struct {
// contains filtered or unexported fields
}
AgentInternal is a set of internal only functionality. Internal: This should never be used and is not supported.
func (*AgentInternal) BucketCapabilityStatus ¶
func (ai *AgentInternal) BucketCapabilityStatus(cap BucketCapability) BucketCapabilityStatus
BucketCapabilityStatus returns the current status for a given bucket capability.
type AnalyticsError ¶
type AnalyticsError struct { InnerError error Statement string ClientContextID string Errors []AnalyticsErrorDesc Endpoint string RetryReasons []RetryReason RetryAttempts uint32 }
AnalyticsError represents an error returned from an analytics query.
func (AnalyticsError) Error ¶
func (e AnalyticsError) Error() string
Error returns the string representation of this error.
func (AnalyticsError) MarshalJSON ¶
func (e AnalyticsError) MarshalJSON() ([]byte, error)
MarshalJSON implements the Marshaler interface.
func (AnalyticsError) Unwrap ¶
func (e AnalyticsError) Unwrap() error
Unwrap returns the underlying reason for the error
type AnalyticsErrorDesc ¶
AnalyticsErrorDesc represents specific analytics error data.
type AnalyticsQueryCallback ¶
type AnalyticsQueryCallback func(*AnalyticsRowReader, error)
AnalyticsQueryCallback is invoked upon completion of a AnalyticsQuery operation.
type AnalyticsQueryOptions ¶
type AnalyticsQueryOptions struct { Payload []byte Priority int RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
AnalyticsQueryOptions represents the various options available for an analytics query.
type AnalyticsRowReader ¶
type AnalyticsRowReader struct {
// contains filtered or unexported fields
}
AnalyticsRowReader providers access to the rows of a analytics query
func (*AnalyticsRowReader) Close ¶
func (q *AnalyticsRowReader) Close() error
Close immediately shuts down the connection
func (AnalyticsRowReader) Err ¶
func (q AnalyticsRowReader) Err() error
Err returns any errors that occurred during streaming.
func (*AnalyticsRowReader) MetaData ¶
func (q *AnalyticsRowReader) MetaData() ([]byte, error)
MetaData fetches the non-row bytes streamed in the response.
func (*AnalyticsRowReader) NextRow ¶
func (q *AnalyticsRowReader) NextRow() []byte
NextRow reads the next rows bytes from the stream
type AuthCertRequest ¶
type AuthCertRequest struct { Service ServiceType Endpoint string }
AuthCertRequest represents a certificate details request from the agent.
type AuthClient ¶
type AuthClient interface { Address() string SupportsFeature(feature memd.HelloFeature) bool SaslListMechs(deadline time.Time, cb func(mechs []AuthMechanism, err error)) error SaslAuth(k, v []byte, deadline time.Time, cb func(b []byte, err error)) error SaslStep(k, v []byte, deadline time.Time, cb func(err error)) error }
AuthClient exposes an interface for performing authentication on a connected Couchbase K/V client.
type AuthCredsRequest ¶
type AuthCredsRequest struct { Service ServiceType Endpoint string }
AuthCredsRequest represents an authentication details request from the agent.
type AuthFunc ¶
type AuthFunc func(client AuthClient, deadline time.Time, continueCb func(), completedCb func(error)) error
AuthFunc is invoked by the agent to authenticate a client. This function returns two channels to allow for for multi-stage authentication processes (such as SCRAM). The continue callback should be called when further asynchronous bootstrapping requests (such as select bucket) can be sent. The completed callback should be called when authentication is completed, or failed. It should contain any error that occurred. If completed is called before continue then continue will be called first internally, the success value will be determined by whether or not an error is present.
type AuthMechanism ¶
type AuthMechanism string
AuthMechanism represents a type of auth that can be performed.
type AuthProvider ¶
type AuthProvider interface { SupportsTLS() bool SupportsNonTLS() bool Certificate(req AuthCertRequest) (*tls.Certificate, error) Credentials(req AuthCredsRequest) ([]UserPassPair, error) }
AuthProvider is an interface to allow the agent to fetch authentication credentials on-demand from the application.
type BackoffCalculator ¶
BackoffCalculator is used by retry strategies to calculate backoff durations.
func ExponentialBackoff ¶
func ExponentialBackoff(min, max time.Duration, backoffFactor float64) BackoffCalculator
ExponentialBackoff calculates a backoff time duration from the retry attempts on a given request.
type BestEffortRetryStrategy ¶
type BestEffortRetryStrategy struct {
// contains filtered or unexported fields
}
BestEffortRetryStrategy represents a strategy that will keep retrying until it succeeds (or the caller times out the request).
func NewBestEffortRetryStrategy ¶
func NewBestEffortRetryStrategy(calculator BackoffCalculator) *BestEffortRetryStrategy
NewBestEffortRetryStrategy returns a new BestEffortRetryStrategy which will use the supplied calculator function to calculate retry durations. If calculator is nil then ControlledBackoff will be used.
func (*BestEffortRetryStrategy) RetryAfter ¶
func (rs *BestEffortRetryStrategy) RetryAfter(req RetryRequest, reason RetryReason) RetryAction
RetryAfter calculates and returns a RetryAction describing how long to wait before retrying an operation.
type BucketCapability ¶
type BucketCapability uint32
const ( BucketCapabilityDurableWrites BucketCapability = 0x00 BucketCapabilityCreateAsDeleted BucketCapability = 0x01 BucketCapabilityReplaceBodyWithXattr BucketCapability = 0x02 )
type BucketCapabilityStatus ¶
type BucketCapabilityStatus uint32
const ( BucketCapabilityStatusUnknown BucketCapabilityStatus = 0x00 BucketCapabilityStatusSupported BucketCapabilityStatus = 0x01 BucketCapabilityStatusUnsupported BucketCapabilityStatus = 0x02 )
type BytesAndError ¶
BytesAndError contains the raw bytes of the result of an operation, and/or the error that occurred.
type Cas ¶
type Cas uint64
Cas represents a unique revision of a document. This can be used to perform optimistic locking.
type CircuitBreakerCallback ¶
CircuitBreakerCallback is the callback used by the circuit breaker to determine if an error should count toward the circuit breaker failure count.
type CircuitBreakerConfig ¶
type CircuitBreakerConfig struct { Enabled bool VolumeThreshold int64 ErrorThresholdPercentage float64 SleepWindow time.Duration RollingWindow time.Duration CompletionCallback CircuitBreakerCallback CanaryTimeout time.Duration }
CircuitBreakerConfig is the set of configuration settings for configuring circuit breakers. If Disabled is set to true then a noop circuit breaker will be used, otherwise a lazy circuit breaker.
type CloseStreamCallback ¶
type CloseStreamCallback func(error)
CloseStreamCallback is invoked with the results of `CloseStream` operations.
type CloseStreamOptions ¶
type CloseStreamOptions struct {
StreamOptions *CloseStreamStreamOptions
}
CloseStreamOptions are the options available to the CloseStream operation.
type CloseStreamStreamOptions ¶
type CloseStreamStreamOptions struct {
StreamID uint16
}
CloseStreamStreamOptions are the stream options available to the CloseStream operation.
type ClusterCapability ¶
type ClusterCapability uint32
ClusterCapability represents a capability that the cluster supports
type ClusterState ¶
type ClusterState uint32
ClusterState is used to describe the state of a cluster.
type CompressionConfig ¶
type CompressionConfig struct { Enabled bool DisableDecompression bool MinSize int MinRatio float64 }
CompressionConfig specifies options for controlling compression applied to documents using KV.
type CompressionType ¶
type CompressionType uint32
CompressionType indicates the type of compression for a value
type ConfigPollerConfig ¶
type ConfigPollerConfig struct { HTTPRedialPeriod time.Duration HTTPRetryDelay time.Duration HTTPMaxWait time.Duration CccpMaxWait time.Duration CccpPollPeriod time.Duration }
ConfigPollerConfig specifies options for controlling the cluster configuration pollers.
type ConfigSnapshot ¶
type ConfigSnapshot struct {
// contains filtered or unexported fields
}
ConfigSnapshot is a snapshot of the underlying configuration currently in use.
func (ConfigSnapshot) BucketUUID ¶
func (pi ConfigSnapshot) BucketUUID() string
BucketUUID returns the UUID of the bucket we are connected to.
func (ConfigSnapshot) KeyToServer ¶
func (pi ConfigSnapshot) KeyToServer(key []byte, replicaIdx uint32) (int, error)
KeyToServer translates a particular key to its assigned server index.
func (ConfigSnapshot) KeyToVbucket ¶
func (pi ConfigSnapshot) KeyToVbucket(key []byte) (uint16, error)
KeyToVbucket translates a particular key to its assigned vbucket.
func (ConfigSnapshot) NumReplicas ¶
func (pi ConfigSnapshot) NumReplicas() (int, error)
NumReplicas returns the number of replicas configured on the connected cluster.
func (ConfigSnapshot) NumServers ¶
func (pi ConfigSnapshot) NumServers() (int, error)
NumServers returns the number of servers accessible for K/V.
func (ConfigSnapshot) NumVbuckets ¶
func (pi ConfigSnapshot) NumVbuckets() (int, error)
NumVbuckets returns the number of VBuckets configured on the connected cluster.
func (ConfigSnapshot) RevID ¶
func (pi ConfigSnapshot) RevID() int64
RevID returns the config revision for this snapshot.
func (ConfigSnapshot) VbucketToServer ¶
func (pi ConfigSnapshot) VbucketToServer(vbID uint16, replicaIdx uint32) (int, error)
VbucketToServer returns the server index for a particular vbucket.
func (ConfigSnapshot) VbucketsOnServer ¶
func (pi ConfigSnapshot) VbucketsOnServer(index int) ([]uint16, error)
VbucketsOnServer returns the list of VBuckets for a server.
type Counter ¶
type Counter interface {
IncrementBy(num uint64)
}
Counter is used for incrementing a synchronous count metric.
type CounterCallback ¶
type CounterCallback func(*CounterResult, error)
CounterCallback is invoked upon completion of a Increment or Decrement operation.
type CounterOptions ¶
type CounterOptions struct { Key []byte Delta uint64 Initial uint64 Expiry uint32 CollectionName string ScopeName string RetryStrategy RetryStrategy Cas Cas DurabilityLevel memd.DurabilityLevel DurabilityLevelTimeout time.Duration CollectionID uint32 Deadline time.Time PreserveExpiry bool // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
CounterOptions encapsulates the parameters for a IncrementEx or DecrementEx operation.
type CounterResult ¶
type CounterResult struct { Value uint64 Cas Cas MutationToken MutationToken }
CounterResult encapsulates the result of a IncrementEx or DecrementEx operation.
type DCPAgent ¶
type DCPAgent struct {
// contains filtered or unexported fields
}
DCPAgent represents the base client handling DCP connections to a Couchbase Server.
func CreateDcpAgent ¶
func CreateDcpAgent(config *DCPAgentConfig, dcpStreamName string, openFlags memd.DcpOpenFlag) (*DCPAgent, error)
CreateDcpAgent creates an agent for performing DCP operations.
func (*DCPAgent) Close ¶
Close shuts down the agent, disconnecting from all servers and failing any outstanding operations with ErrShutdown.
func (*DCPAgent) CloseStream ¶
func (agent *DCPAgent) CloseStream(vbID uint16, opts CloseStreamOptions, cb CloseStreamCallback) (PendingOp, error)
CloseStream shuts down an open stream for the specified VBucket.
func (*DCPAgent) ConfigSnapshot ¶
func (agent *DCPAgent) ConfigSnapshot() (*ConfigSnapshot, error)
ConfigSnapshot returns a snapshot of the underlying configuration currently in use.
func (*DCPAgent) ForceReconnect ¶ added in v10.0.2
func (agent *DCPAgent) ForceReconnect()
ForceReconnect gracefully rebuilds all connections being used by the agent. Any persistent in flight requests (e.g. DCP) will be terminated with ErrForcedReconnect.
Internal: This should never be used and is not supported.
func (*DCPAgent) GetFailoverLog ¶
func (agent *DCPAgent) GetFailoverLog(vbID uint16, cb GetFailoverLogCallback) (PendingOp, error)
GetFailoverLog retrieves the fail-over log for a particular VBucket. This is used to resume an interrupted stream after a node fail-over has occurred.
func (*DCPAgent) GetVbucketSeqnos ¶
func (agent *DCPAgent) GetVbucketSeqnos(serverIdx int, state memd.VbucketState, opts GetVbucketSeqnoOptions, cb GetVBucketSeqnosCallback) (PendingOp, error)
GetVbucketSeqnos returns the last checkpoint for a particular VBucket. This is useful for starting a DCP stream from wherever the server currently is.
func (*DCPAgent) HasCollectionsSupport ¶
HasCollectionsSupport verifies whether or not collections are available on the agent.
func (*DCPAgent) OpenStream ¶
func (agent *DCPAgent) OpenStream(vbID uint16, flags memd.DcpStreamAddFlag, vbUUID VbUUID, startSeqNo, endSeqNo, snapStartSeqNo, snapEndSeqNo SeqNo, evtHandler StreamObserver, opts OpenStreamOptions, cb OpenStreamCallback) (PendingOp, error)
OpenStream opens a DCP stream for a particular VBucket and, optionally, filter.
func (*DCPAgent) ReconfigureSecurity ¶ added in v10.0.5
func (agent *DCPAgent) ReconfigureSecurity(opts ReconfigureSecurityOptions) error
ReconfigureSecurity updates the security configuration being used by the agent. This includes the ability to toggle TLS on and off.
Calling this function will cause all underlying connections to be reconnected. The exception to this is the connection to the seed node (usually localhost), which will only be reconnected if the AuthProvider is provided on the options.
This function can only be called when the seed poller is in use i.e. when the ns_server scheme is used. Internal: This should never be used and is not supported.
func (*DCPAgent) WaitUntilReady ¶
func (agent *DCPAgent) WaitUntilReady(deadline time.Time, opts WaitUntilReadyOptions, cb WaitUntilReadyCallback) (PendingOp, error)
WaitUntilReady returns whether or not the Agent has seen a valid cluster config.
type DCPAgentConfig ¶
type DCPAgentConfig struct { UserAgent string BucketName string SeedConfig SeedConfig SecurityConfig SecurityConfig CompressionConfig CompressionConfig ConfigPollerConfig ConfigPollerConfig IoConfig IoConfig KVConfig KVConfig HTTPConfig HTTPConfig DCPConfig DCPConfig }
DCPAgentConfig specifies the configuration options for creation of a DCPAgent.
func (*DCPAgentConfig) FromConnStr ¶
func (config *DCPAgentConfig) FromConnStr(connStr string) error
FromConnStr populates the AgentConfig with information from a Couchbase Connection String. Supported options are:
ca_cert_path (string) - Specifies the path to a CA certificate. network (string) - The network type to use. kv_connect_timeout (duration) - Maximum period to attempt to connect to cluster in ms. config_poll_interval (duration) - Period to wait between CCCP config polling in ms. config_poll_timeout (duration) - Maximum period of time to wait for a CCCP request. compression (bool) - Whether to enable network-wise compression of documents. compression_min_size (int) - The minimal size of the document in bytes to consider compression. compression_min_ratio (float64) - The minimal compress ratio (compressed / original) for the document to be sent compressed. orphaned_response_logging (bool) - Whether to enable orphaned response logging. orphaned_response_logging_interval (duration) - How often to print the orphan log records. orphaned_response_logging_sample_size (int) - The maximum number of orphan log records to track. dcp_priority (int) - Specifies the priority to request from the Cluster when connecting for DCP. enable_dcp_expiry (bool) - Whether to enable the feature to distinguish between explicit delete and expired delete on DCP. kv_pool_size (int) - The number of connections to create to each kv node. max_queue_size (int) - The maximum number of requests that can be queued for sending per connection. max_idle_http_connections (int) - Maximum number of idle http connections in the pool. max_perhost_idle_http_connections (int) - Maximum number of idle http connections in the pool per host. idle_http_connection_timeout (duration) - Maximum length of time for an idle connection to stay in the pool in ms. http_redial_period (duration) - The maximum length of time for the HTTP poller to stay connected before reconnecting. http_retry_delay (duration) - The length of time to wait between HTTP poller retries if connecting fails.
type DCPBackfillOrder ¶
type DCPBackfillOrder uint8
DCPBackfillOrder represents the order in which vBuckets will be backfilled by the cluster.
const ( // DCPBackfillOrderRoundRobin means that all the requested vBuckets will be backfilled together where each vBucket // has some data backfilled before moving on to the next. This is the default behaviour. DCPBackfillOrderRoundRobin DCPBackfillOrder = iota + 1 // DCPBackfillOrderSequential means that all the data for the first vBucket will be streamed before advancing onto // the next vBucket. DCPBackfillOrderSequential )
type DCPConfig ¶
type DCPConfig struct { AgentPriority DcpAgentPriority UseExpiryOpcode bool UseStreamID bool UseOSOBackfill bool BackfillOrder DCPBackfillOrder BufferSize int DisableBufferAcknowledgement bool }
DCPConfig specifies DCP specific configuration options.
type DcpAgentPriority ¶
type DcpAgentPriority uint8
DcpAgentPriority specifies the priority level for a dcp stream
type DcpCollectionCreation ¶
type DcpCollectionCreation struct { SeqNo uint64 Version uint8 VbID uint16 ManifestUID uint64 ScopeID uint32 CollectionID uint32 Ttl uint32 StreamID uint16 Key []byte }
DcpCollectionCreation represents a collection create DCP event from the server
type DcpCollectionDeletion ¶
type DcpCollectionDeletion struct { SeqNo uint64 ManifestUID uint64 ScopeID uint32 CollectionID uint32 StreamID uint16 VbID uint16 Version uint8 }
DcpCollectionDeleteion represents a collection delete DCP event from the server
type DcpCollectionFlush ¶
type DcpCollectionFlush struct { SeqNo uint64 Version uint8 VbID uint16 ManifestUID uint64 CollectionID uint32 StreamID uint16 }
DcpCollectionFlush represents a collection flush DCP event from the server
type DcpCollectionModification ¶
type DcpCollectionModification struct { SeqNo uint64 ManifestUID uint64 CollectionID uint32 Ttl uint32 VbID uint16 StreamID uint16 Version uint8 }
DcpCollectionModification represents a DCP collection modify event from the server
type DcpDeletion ¶
type DcpDeletion struct {
SeqNo, RevNo uint64
Cas uint64
DeleteTime uint32
CollectionID uint32
VbID uint16
StreamID uint16
Datatype uint8
Key, Value []byte
}
DcpDeletion represents a single DCP deletion from the server
type DcpExpiration ¶
type DcpExpiration struct {
SeqNo, RevNo uint64
Cas uint64
DeleteTime uint32
CollectionID uint32
VbID uint16
StreamID uint16
Key []byte
}
DcpExpiration represents a single DCP expiration from the server
type DcpMutation ¶
type DcpMutation struct {
SeqNo, RevNo uint64
Cas uint64
Flags, Expiry, LockTime uint32
CollectionID uint32
VbID uint16
StreamID uint16
Datatype uint8
Key, Value []byte
}
DcpMutation represents a single DCP mutation from the server
type DcpOSOSnapshot ¶
DcpOSOSnapshot reprensents a DCP OSSSnapshot from the server
type DcpScopeCreation ¶
type DcpScopeCreation struct { SeqNo uint64 Version uint8 VbID uint16 ManifestUID uint64 ScopeID uint32 StreamID uint16 Key []byte }
DcpScopeCreation represents a scope creation DCP event from the server
type DcpScopeDeletion ¶
type DcpScopeDeletion struct { SeqNo uint64 Version uint8 VbID uint16 ManifestUID uint64 ScopeID uint32 StreamID uint16 }
DcpScopeDeletion represents a scope Deletion DCP event from the server
type DcpSeqNoAdvanced ¶
DcpSeqNoAdvanced represents a DCP SeqNoAdvanced from the server
type DcpSnapshotMarker ¶
type DcpSnapshotMarker struct {
StartSeqNo, EndSeqNo uint64
VbID, StreamID uint16
SnapshotType SnapshotState
MaxVisibleSeqNo, HighCompletedSeqNo, SnapshotTimeStamp uint64
}
DcpSnapshotMarker represents a single response from the server
type DcpStreamEnd ¶
DcpStreamEnd represnets a DCP stream end from the server
type DeleteCallback ¶
type DeleteCallback func(*DeleteResult, error)
DeleteCallback is invoked upon completion of a Delete operation.
type DeleteMetaCallback ¶
type DeleteMetaCallback func(*DeleteMetaResult, error)
DeleteMetaCallback is invoked upon completion of a DeleteMeta operation.
type DeleteMetaOptions ¶
type DeleteMetaOptions struct { Key []byte Value []byte Extra []byte Datatype uint8 Options uint32 Flags uint32 Expiry uint32 Cas Cas RevNo uint64 CollectionName string ScopeName string CollectionID uint32 RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
DeleteMetaOptions encapsulates the parameters for a DeleteMetaEx operation.
type DeleteMetaResult ¶
type DeleteMetaResult struct { Cas Cas MutationToken MutationToken }
DeleteMetaResult encapsulates the result of a DeleteMetaEx operation.
type DeleteOptions ¶
type DeleteOptions struct { Key []byte CollectionName string ScopeName string RetryStrategy RetryStrategy Cas Cas DurabilityLevel memd.DurabilityLevel DurabilityLevelTimeout time.Duration CollectionID uint32 Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
DeleteOptions encapsulates the parameters for a DeleteEx operation.
type DeleteResult ¶
type DeleteResult struct { Cas Cas MutationToken MutationToken }
DeleteResult encapsulates the result of a DeleteEx operation.
type DiagnosticInfo ¶
type DiagnosticInfo struct { ConfigRev int64 MemdConns []MemdConnInfo State ClusterState }
DiagnosticInfo is returned by the Diagnostics method and includes information about the overall health of the clients connections.
type DiagnosticsOptions ¶
type DiagnosticsOptions struct { }
DiagnosticsOptions encapsulates the parameters for a Diagnostics operation.
type DoHTTPRequestCallback ¶
type DoHTTPRequestCallback func(*HTTPResponse, error)
DoHTTPRequestCallback is invoked upon completion of a DoHTTPRequest operation.
type EndpointPingResult ¶
type EndpointPingResult struct { Endpoint string Error error Latency time.Duration ID string Scope string State PingState }
EndpointPingResult contains the results of a ping to a single server.
type EndpointState ¶
type EndpointState uint32
EndpointState is the current connection state of an endpoint.
const ( // EndpointStateDisconnected indicates that the endpoint is disconnected. EndpointStateDisconnected EndpointState = 1 // EndpointStateConnecting indicates that the endpoint is connecting. EndpointStateConnecting EndpointState = 2 // EndpointStateConnected indicates that the endpoint is connected. EndpointStateConnected EndpointState = 3 // EndpointStateDisconnecting indicates that the endpoint is disconnecting. EndpointStateDisconnecting EndpointState = 4 )
type ExecHelloResponse ¶
type ExecHelloResponse struct { SrvFeatures []memd.HelloFeature Err error }
ExecHelloResponse contains the features and/or error from an ExecHello operation.
type FailoverEntry ¶
FailoverEntry represents a single entry in the server fail-over log.
type GetAllCollectionManifestsCallback ¶
type GetAllCollectionManifestsCallback func(*GetAllCollectionManifestsResult, error)
GetAllCollectionManifestsCallback is invoked upon completion of a GetAllCollectionManifests operation.
type GetAllCollectionManifestsOptions ¶
type GetAllCollectionManifestsOptions struct { TraceContext RequestSpanContext RetryStrategy RetryStrategy }
GetAllCollectionManifestsOptions are the options available to the GetAllCollectionManifests command.
type GetAllCollectionManifestsResult ¶
type GetAllCollectionManifestsResult struct {
Manifests map[string]SingleServerManifestResult
}
GetAllCollectionManifestsResult encapsulates the result of a GetAllCollectionManifests operation.
type GetAndLockCallback ¶
type GetAndLockCallback func(*GetAndLockResult, error)
GetAndLockCallback is invoked upon completion of a GetAndLock operation.
type GetAndLockOptions ¶
type GetAndLockOptions struct { Key []byte LockTime uint32 CollectionName string ScopeName string CollectionID uint32 RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
GetAndLockOptions encapsulates the parameters for a GetAndLockEx operation.
type GetAndLockResult ¶
GetAndLockResult encapsulates the result of a GetAndLockEx operation.
type GetAndTouchCallback ¶
type GetAndTouchCallback func(*GetAndTouchResult, error)
GetAndTouchCallback is invoked upon completion of a GetAndTouch operation.
type GetAndTouchOptions ¶
type GetAndTouchOptions struct { Key []byte Expiry uint32 CollectionName string ScopeName string CollectionID uint32 RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
GetAndTouchOptions encapsulates the parameters for a GetAndTouchEx operation.
type GetAndTouchResult ¶
GetAndTouchResult encapsulates the result of a GetAndTouchEx operation.
type GetAnyReplicaOptions ¶
type GetAnyReplicaOptions struct { Key []byte CollectionName string ScopeName string CollectionID uint32 RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
GetAnyReplicaOptions encapsulates the parameters for a GetAnyReplicaEx operation.
type GetCallback ¶
GetCallback is invoked upon completion of a Get operation.
type GetCollectionIDCallback ¶
type GetCollectionIDCallback func(*GetCollectionIDResult, error)
GetCollectionIDCallback is invoked upon completion of a GetCollectionID operation.
type GetCollectionIDOptions ¶
type GetCollectionIDOptions struct { RetryStrategy RetryStrategy TraceContext RequestSpanContext }
GetCollectionIDOptions are the options available to the GetCollectionID command.
type GetCollectionIDResult ¶
GetCollectionIDResult encapsulates the result of a GetCollectionID operation.
type GetCollectionManifestCallback ¶
type GetCollectionManifestCallback func(*GetCollectionManifestResult, error)
GetCollectionManifestCallback is invoked upon completion of a GetCollectionManifest operation.
type GetCollectionManifestOptions ¶
type GetCollectionManifestOptions struct { TraceContext RequestSpanContext RetryStrategy RetryStrategy }
GetCollectionManifestOptions are the options available to the GetCollectionManifest command.
type GetCollectionManifestResult ¶
type GetCollectionManifestResult struct {
Manifest []byte
}
GetCollectionManifestResult encapsulates the result of a GetCollectionManifest operation.
type GetFailoverLogCallback ¶
type GetFailoverLogCallback func([]FailoverEntry, error)
GetFailoverLogCallback is invoked with the results of `GetFailoverLog` operations.
type GetMetaCallback ¶
type GetMetaCallback func(*GetMetaResult, error)
GetMetaCallback is invoked upon completion of a GetMeta operation.
type GetMetaOptions ¶
type GetMetaOptions struct { Key []byte CollectionName string ScopeName string CollectionID uint32 RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
GetMetaOptions encapsulates the parameters for a GetMetaEx operation.
type GetMetaResult ¶
type GetMetaResult struct { Value []byte Flags uint32 Cas Cas Expiry uint32 SeqNo SeqNo Datatype uint8 Deleted uint32 }
GetMetaResult encapsulates the result of a GetMetaEx operation.
type GetOneReplicaOptions ¶
type GetOneReplicaOptions struct { Key []byte CollectionName string ScopeName string CollectionID uint32 RetryStrategy RetryStrategy ReplicaIdx int Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
GetOneReplicaOptions encapsulates the parameters for a GetOneReplicaEx operation.
type GetOptions ¶
type GetOptions struct { Key []byte CollectionName string ScopeName string CollectionID uint32 RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
GetOptions encapsulates the parameters for a GetEx operation.
type GetRandomCallback ¶
type GetRandomCallback func(*GetRandomResult, error)
GetRandomCallback is invoked upon completion of a GetRandom operation.
type GetRandomOptions ¶
type GetRandomOptions struct { RetryStrategy RetryStrategy Deadline time.Time CollectionName string ScopeName string CollectionID uint32 // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
GetRandomOptions encapsulates the parameters for a GetRandomEx operation.
type GetRandomResult ¶
GetRandomResult encapsulates the result of a GetRandomEx operation.
type GetReplicaCallback ¶
type GetReplicaCallback func(*GetReplicaResult, error)
GetReplicaCallback is invoked upon completion of a GetReplica operation.
type GetReplicaResult ¶
GetReplicaResult encapsulates the result of a GetReplica operation.
type GetVBucketSeqnosCallback ¶
type GetVBucketSeqnosCallback func([]VbSeqNoEntry, error)
GetVBucketSeqnosCallback is invoked with the results of `GetVBucketSeqnos` operations.
type GetVbucketSeqnoFilterOptions ¶
type GetVbucketSeqnoFilterOptions struct {
CollectionID uint32
}
GetVbucketSeqnoFilterOptions are the filter options available to the GetVbucketSeqno operation.
type GetVbucketSeqnoOptions ¶
type GetVbucketSeqnoOptions struct {
FilterOptions *GetVbucketSeqnoFilterOptions
}
GetVbucketSeqnoOptions are the options available to the GetVbucketSeqno operation.
type HTTPConfig ¶
type HTTPConfig struct { MaxIdleConns int MaxIdleConnsPerHost int IdleConnectionTimeout time.Duration }
HTTPConfig specifies http related configuration options.
type HTTPError ¶
type HTTPError struct { InnerError error UniqueID string Endpoint string RetryReasons []RetryReason RetryAttempts uint32 }
HTTPError represents an error returned from an HTTP request.
func (HTTPError) MarshalJSON ¶
MarshalJSON implements the Marshaler interface.
type HTTPRequest ¶
type HTTPRequest struct { Service ServiceType Method string Endpoint string Path string Username string Password string Body []byte Headers map[string]string ContentType string IsIdempotent bool UniqueID string Deadline time.Time RetryStrategy RetryStrategy // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
HTTPRequest contains the description of an HTTP request to perform.
type HTTPResponse ¶
type HTTPResponse struct { Endpoint string StatusCode int ContentLength int64 Body io.ReadCloser }
HTTPResponse encapsulates the response from an HTTP request.
type IoConfig ¶
type IoConfig struct { NetworkType string UseMutationTokens bool UseDurations bool UseOutOfOrderResponses bool DisableXErrorHello bool DisableJSONHello bool DisableSyncReplicationHello bool EnablePITRHello bool UseCollections bool }
IoConfig specifies IO related configuration options such as HELLO flags and the network type to use.
type KVConfig ¶
type KVConfig struct { ConnectTimeout time.Duration ServerWaitBackoff time.Duration PoolSize int MaxQueueSize int }
KVConfig specifies kv related configuration options.
type KeyValueError ¶
type KeyValueError struct { InnerError error StatusCode memd.StatusCode DocumentKey string BucketName string ScopeName string CollectionName string CollectionID uint32 ErrorName string ErrorDescription string Opaque uint32 Context string Ref string RetryReasons []RetryReason RetryAttempts uint32 LastDispatchedTo string LastDispatchedFrom string LastConnectionID string }
KeyValueError wraps key-value errors that occur within the SDK.
func (KeyValueError) Error ¶
func (e KeyValueError) Error() string
Error returns the string representation of this error.
func (KeyValueError) MarshalJSON ¶
func (e KeyValueError) MarshalJSON() ([]byte, error)
MarshalJSON implements the Marshaler interface.
func (KeyValueError) Unwrap ¶
func (e KeyValueError) Unwrap() error
Unwrap returns the underlying reason for the error
type LogRedactLevel ¶
type LogRedactLevel int
LogRedactLevel specifies the degree with which to redact the logs.
const ( // RedactNone indicates to perform no redactions RedactNone LogRedactLevel = iota // RedactPartial indicates to redact all possible user-identifying information from logs. RedactPartial // RedactFull indicates to fully redact all possible identifying information from logs. RedactFull )
type Logger ¶
type Logger interface { // Outputs logging information: // level is the verbosity level // offset is the position within the calling stack from which the message // originated. This is useful for contextual loggers which retrieve file/line // information. Log(level LogLevel, offset int, format string, v ...interface{}) error }
Logger defines a logging interface. You can either use one of the default loggers (DefaultStdioLogger(), VerboseStdioLogger()) or implement your own.
func DefaultStdioLogger ¶
func DefaultStdioLogger() Logger
DefaultStdioLogger gets the default standard I/O logger.
gocbcore.SetLogger(gocbcore.DefaultStdioLogger())
func VerboseStdioLogger ¶
func VerboseStdioLogger() Logger
VerboseStdioLogger is a more verbose level of DefaultStdioLogger(). Messages pertaining to the scheduling of ordinary commands (and their responses) will also be emitted.
gocbcore.SetLogger(gocbcore.VerboseStdioLogger())
type LookupInCallback ¶
type LookupInCallback func(*LookupInResult, error)
LookupInCallback is invoked upon completion of a LookupIn operation.
type LookupInOptions ¶
type LookupInOptions struct { Key []byte Flags memd.SubdocDocFlag Ops []SubDocOp CollectionName string ScopeName string CollectionID uint32 RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
LookupInOptions encapsulates the parameters for a LookupInEx operation.
type LookupInResult ¶
type LookupInResult struct { Cas Cas Ops []SubDocResult // Internal: This should never be used and is not supported. Internal struct { IsDeleted bool } }
LookupInResult encapsulates the result of a LookupInEx operation.
type Manifest ¶
type Manifest struct { UID uint64 Scopes []ManifestScope }
Manifest is the representation of a collections manifest.
func (*Manifest) UnmarshalJSON ¶
UnmarshalJSON is a custom implementation of json unmarshaling.
type ManifestCollection ¶
ManifestCollection is the representation of a collection within a manifest.
func (*ManifestCollection) UnmarshalJSON ¶
func (item *ManifestCollection) UnmarshalJSON(data []byte) error
UnmarshalJSON is a custom implementation of json unmarshaling.
type ManifestScope ¶
type ManifestScope struct { UID uint32 Name string Collections []ManifestCollection }
ManifestScope is the representation of a scope within a manifest.
func (*ManifestScope) UnmarshalJSON ¶
func (item *ManifestScope) UnmarshalJSON(data []byte) error
UnmarshalJSON is a custom implementation of json unmarshaling.
type MemdConnInfo ¶
type MemdConnInfo struct { LocalAddr string RemoteAddr string LastActivity time.Time Scope string ID string State EndpointState }
MemdConnInfo represents information we know about a particular memcached connection reported in a diagnostics report.
type Meter ¶
type Meter interface { Counter(name string, tags map[string]string) (Counter, error) ValueRecorder(name string, tags map[string]string) (ValueRecorder, error) }
Meter handles metrics information for SDK operations.
type MeterConfig ¶
type MeterConfig struct {
Meter Meter
}
MeterConfig specifies meter related configuration options.
type MutateInCallback ¶
type MutateInCallback func(*MutateInResult, error)
MutateInCallback is invoked upon completion of a MutateIn operation.
type MutateInOptions ¶
type MutateInOptions struct { Key []byte Flags memd.SubdocDocFlag Cas Cas Expiry uint32 Ops []SubDocOp CollectionName string ScopeName string RetryStrategy RetryStrategy DurabilityLevel memd.DurabilityLevel DurabilityLevelTimeout time.Duration CollectionID uint32 Deadline time.Time PreserveExpiry bool // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
MutateInOptions encapsulates the parameters for a MutateInEx operation.
type MutateInResult ¶
type MutateInResult struct { Cas Cas MutationToken MutationToken Ops []SubDocResult }
MutateInResult encapsulates the result of a MutateInEx operation.
type MutationToken ¶
MutationToken represents a particular mutation within the cluster.
type N1QLError ¶
type N1QLError struct { InnerError error Statement string ClientContextID string Errors []N1QLErrorDesc Endpoint string RetryReasons []RetryReason RetryAttempts uint32 ResponseBody string }
N1QLError represents an error returned from a n1ql query.
func (N1QLError) MarshalJSON ¶
MarshalJSON implements the Marshaler interface.
type N1QLErrorDesc ¶
N1QLErrorDesc represents specific n1ql error data.
type N1QLQueryCallback ¶
type N1QLQueryCallback func(*N1QLRowReader, error)
N1QLQueryCallback is invoked upon completion of a N1QLQuery operation.
type N1QLQueryOptions ¶
type N1QLQueryOptions struct { Payload []byte RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
N1QLQueryOptions represents the various options available for a n1ql query.
type N1QLRowReader ¶
type N1QLRowReader struct {
// contains filtered or unexported fields
}
N1QLRowReader providers access to the rows of a n1ql query
func (*N1QLRowReader) Close ¶
func (q *N1QLRowReader) Close() error
Close immediately shuts down the connection
func (N1QLRowReader) Err ¶
func (q N1QLRowReader) Err() error
Err returns any errors that occurred during streaming.
func (*N1QLRowReader) MetaData ¶
func (q *N1QLRowReader) MetaData() ([]byte, error)
MetaData fetches the non-row bytes streamed in the response.
func (*N1QLRowReader) NextRow ¶
func (q *N1QLRowReader) NextRow() []byte
NextRow reads the next rows bytes from the stream
func (N1QLRowReader) PreparedName ¶
func (q N1QLRowReader) PreparedName() (string, error)
PreparedName returns the name of the prepared statement created when using enhanced prepared statements. If the prepared name has not been seen on the stream then this will return an error. Volatile: This API is subject to change.
type NoRetryRetryAction ¶
type NoRetryRetryAction struct { }
NoRetryRetryAction represents an action that indicates to not retry.
func (*NoRetryRetryAction) Duration ¶
func (ra *NoRetryRetryAction) Duration() time.Duration
Duration is the length of time to wait before retrying an operation.
type ObserveCallback ¶
type ObserveCallback func(*ObserveResult, error)
ObserveCallback is invoked upon completion of a Observe operation.
type ObserveOptions ¶
type ObserveOptions struct { Key []byte ReplicaIdx int CollectionName string ScopeName string CollectionID uint32 RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
ObserveOptions encapsulates the parameters for a ObserveEx operation.
type ObserveResult ¶
ObserveResult encapsulates the result of a ObserveEx operation.
type ObserveVbCallback ¶
type ObserveVbCallback func(*ObserveVbResult, error)
ObserveVbCallback is invoked upon completion of a ObserveVb operation.
type ObserveVbOptions ¶
type ObserveVbOptions struct { VbID uint16 VbUUID VbUUID ReplicaIdx int RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
ObserveVbOptions encapsulates the parameters for a ObserveVbEx operation.
type ObserveVbResult ¶
type ObserveVbResult struct { DidFailover bool VbID uint16 VbUUID VbUUID PersistSeqNo SeqNo CurrentSeqNo SeqNo OldVbUUID VbUUID LastSeqNo SeqNo }
ObserveVbResult encapsulates the result of a ObserveVbEx operation.
type OpenStreamCallback ¶
type OpenStreamCallback func([]FailoverEntry, error)
OpenStreamCallback is invoked with the results of `OpenStream` operations.
type OpenStreamFilterOptions ¶
OpenStreamFilterOptions are the filtering options available to the OpenStream operation.
type OpenStreamManifestOptions ¶
type OpenStreamManifestOptions struct {
ManifestUID uint64
}
OpenStreamManifestOptions are the manifest options available to the OpenStream operation.
type OpenStreamOptions ¶
type OpenStreamOptions struct { FilterOptions *OpenStreamFilterOptions StreamOptions *OpenStreamStreamOptions ManifestOptions *OpenStreamManifestOptions }
OpenStreamOptions are the options available to the OpenStream operation.
type OpenStreamStreamOptions ¶
type OpenStreamStreamOptions struct {
StreamID uint16
}
OpenStreamStreamOptions are the stream options available to the OpenStream operation.
type OrphanReporterConfig ¶
OrphanReporterConfig specifies options for controlling the orphan reporter which records when the SDK receives responses for requests that are no longer in the system (usually due to being timed out).
type PasswordAuthProvider ¶
PasswordAuthProvider provides a standard AuthProvider implementation for use with a standard username/password pair (for example, RBAC).
func (PasswordAuthProvider) Certificate ¶
func (auth PasswordAuthProvider) Certificate(req AuthCertRequest) (*tls.Certificate, error)
Certificate directly returns a certificate chain to present for the connection.
func (PasswordAuthProvider) Credentials ¶
func (auth PasswordAuthProvider) Credentials(req AuthCredsRequest) ([]UserPassPair, error)
Credentials directly returns the username/password from the provider.
func (PasswordAuthProvider) SupportsNonTLS ¶
func (auth PasswordAuthProvider) SupportsNonTLS() bool
SupportsNonTLS specifies whether this authenticator supports non-TLS connections.
func (PasswordAuthProvider) SupportsTLS ¶
func (auth PasswordAuthProvider) SupportsTLS() bool
SupportsTLS specifies whether this authenticator supports TLS connections.
type PendingOp ¶
type PendingOp interface {
Cancel()
}
PendingOp represents an outstanding operation within the client. This can be used to cancel an operation before it completes. This can also be used to Get information about the operation once it has completed (cancelled or successful).
type PingCallback ¶
type PingCallback func(*PingResult, error)
PingCallback is invoked upon completion of a PingKv operation.
type PingOptions ¶
type PingOptions struct { TraceContext RequestSpanContext KVDeadline time.Time CbasDeadline time.Time N1QLDeadline time.Time FtsDeadline time.Time CapiDeadline time.Time MgmtDeadline time.Time ServiceTypes []ServiceType // Internal: This should never be used and is not supported. User string // contains filtered or unexported fields }
PingOptions encapsulates the parameters for a PingKv operation.
type PingResult ¶
type PingResult struct { ConfigRev int64 Services map[ServiceType][]EndpointPingResult }
PingResult encapsulates the result of a PingKv operation.
type PingState ¶
type PingState uint32
PingState is the current state of a endpoint used in a PingResult.
const ( // PingStateOK indicates that an endpoint is OK. PingStateOK PingState = 1 // PingStateTimeout indicates that the ping request to an endpoint timed out. PingStateTimeout PingState = 2 // PingStateError indicates that the ping request to an endpoint encountered an error. PingStateError PingState = 3 )
type ReconfigureSecurityOptions ¶ added in v10.0.5
type ReconfigureSecurityOptions struct { UseTLS bool // If is nil will default to the TLSRootCAProvider already in use by the agent. TLSRootCAProvider func() *x509.CertPool Auth AuthProvider // AuthMechanisms is the list of mechanisms that the SDK can use to attempt authentication. // Note that if you add PLAIN to the list, this will cause credential leakage on the network // since PLAIN sends the credentials in cleartext. It is disabled by default to prevent downgrade attacks. We // recommend using a TLS connection if using PLAIN. // If is nil will default to the AuthMechanisms already in use by the Agent. AuthMechanisms []AuthMechanism }
ReconfigureSecurityOptions are the options available to the ReconfigureSecurity function.
type ReplaceOptions ¶
type ReplaceOptions struct { Key []byte CollectionName string ScopeName string RetryStrategy RetryStrategy Value []byte Flags uint32 Datatype uint8 Cas Cas Expiry uint32 DurabilityLevel memd.DurabilityLevel DurabilityLevelTimeout time.Duration CollectionID uint32 Deadline time.Time PreserveExpiry bool // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
ReplaceOptions encapsulates the parameters for a ReplaceEx operation.
type RequestSpan ¶
type RequestSpan interface { End() Context() RequestSpanContext AddEvent(name string, timestamp time.Time) SetAttribute(key string, value interface{}) }
RequestSpan is the interface for spans that are created by a RequestTracer.
type RequestSpanContext ¶
type RequestSpanContext interface { }
RequestSpanContext is the interface for for external span contexts that can be passed in into the SDK option blocks.
type RequestTracer ¶
type RequestTracer interface {
RequestSpan(parentContext RequestSpanContext, operationName string) RequestSpan
}
RequestTracer describes the tracing abstraction in the SDK.
type RetryAction ¶
RetryAction is used by a RetryStrategy to calculate the duration to wait before retrying an operation. Returning a value of 0 indicates to not retry.
type RetryReason ¶
type RetryReason interface { AllowsNonIdempotentRetry() bool AlwaysRetry() bool Description() string }
RetryReason represents the reason for an operation possibly being retried.
type RetryRequest ¶
type RetryRequest interface { RetryAttempts() uint32 Identifier() string Idempotent() bool RetryReasons() []RetryReason // contains filtered or unexported methods }
RetryRequest is a request that can possibly be retried.
type RetryStrategy ¶
type RetryStrategy interface {
RetryAfter(req RetryRequest, reason RetryReason) RetryAction
}
RetryStrategy is to determine if an operation should be retried, and if so how long to wait before retrying.
type SaslListMechsCompleted ¶
type SaslListMechsCompleted struct { Err error Mechs []AuthMechanism }
SaslListMechsCompleted is used to contain the result and/or error from a SaslListMechs operation.
type SearchError ¶
type SearchError struct { InnerError error IndexName string Query interface{} ErrorText string HTTPResponseCode int Endpoint string RetryReasons []RetryReason RetryAttempts uint32 }
SearchError represents an error returned from a search query.
func (SearchError) Error ¶
func (e SearchError) Error() string
Error returns the string representation of this error.
func (SearchError) MarshalJSON ¶
func (e SearchError) MarshalJSON() ([]byte, error)
MarshalJSON implements the Marshaler interface.
func (SearchError) Unwrap ¶
func (e SearchError) Unwrap() error
Unwrap returns the underlying reason for the error
type SearchQueryCallback ¶
type SearchQueryCallback func(*SearchRowReader, error)
SearchQueryCallback is invoked upon completion of a SearchQuery operation.
type SearchQueryOptions ¶
type SearchQueryOptions struct { IndexName string Payload []byte RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
SearchQueryOptions represents the various options available for a search query.
type SearchRowReader ¶
type SearchRowReader struct {
// contains filtered or unexported fields
}
SearchRowReader providers access to the rows of a view query
func (*SearchRowReader) Close ¶
func (q *SearchRowReader) Close() error
Close immediately shuts down the connection
func (SearchRowReader) Err ¶
func (q SearchRowReader) Err() error
Err returns any errors that occurred during streaming.
func (*SearchRowReader) MetaData ¶
func (q *SearchRowReader) MetaData() ([]byte, error)
MetaData fetches the non-row bytes streamed in the response.
func (*SearchRowReader) NextRow ¶
func (q *SearchRowReader) NextRow() []byte
NextRow reads the next rows bytes from the stream
type SecurityConfig ¶
type SecurityConfig struct { UseTLS bool TLSRootCAProvider func() *x509.CertPool // NoTLSSeedNode indicates that, even with UseTLS set to true, the SDK should always connect to the seed node // over a non TLS connection. This means that the seed node should ALWAYS be localhost. // This option must be used with the ConfigPollerConfig UseSeedPoller set to true. // Internal: This should never be used and is not supported. NoTLSSeedNode bool Auth AuthProvider // AuthMechanisms is the list of mechanisms that the SDK can use to attempt authentication. // Note that if you add PLAIN to the list, this will cause credential leakage on the network // since PLAIN sends the credentials in cleartext. It is disabled by default to prevent downgrade attacks. We // recommend using a TLS connection if using PLAIN. AuthMechanisms []AuthMechanism }
SecurityConfig specifies options for controlling security related items such as TLS root certificates and verification skipping.
type SeedConfig ¶
SeedConfig specifies initial seed configuration options such as addresses.
type SeqNo ¶
type SeqNo uint64
SeqNo is a sequential mutation number indicating the order and precise position of a write that has occurred.
type SetMetaCallback ¶
type SetMetaCallback func(*SetMetaResult, error)
SetMetaCallback is invoked upon completion of a SetMeta operation.
type SetMetaOptions ¶
type SetMetaOptions struct { Key []byte Value []byte Extra []byte Datatype uint8 Options uint32 Flags uint32 Expiry uint32 Cas Cas RevNo uint64 CollectionName string ScopeName string CollectionID uint32 RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
SetMetaOptions encapsulates the parameters for a SetMetaEx operation.
type SetMetaResult ¶
type SetMetaResult struct { Cas Cas MutationToken MutationToken }
SetMetaResult encapsulates the result of a SetMetaEx operation.
type SetOptions ¶
type SetOptions struct { Key []byte CollectionName string ScopeName string RetryStrategy RetryStrategy Value []byte Flags uint32 Datatype uint8 Expiry uint32 DurabilityLevel memd.DurabilityLevel DurabilityLevelTimeout time.Duration CollectionID uint32 Deadline time.Time PreserveExpiry bool // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
SetOptions encapsulates the parameters for a SetEx operation.
type SingleServerManifestResult ¶
SingleServerManifestResult encapsulates the result from a single server when using the GetAllCollectionManifests operation.
type SingleServerStats ¶
type SingleServerStats struct { Stats map[string]string // StatsKeys and StatsChunks provide access to the raw keys and values returned on a per packet basis. // This is useful for stats keys such as connections which, unlike most stats keys, return us a complex object // per packet. Keys and chunks maintain the same ordering for indexes. StatsKeys [][]byte StatsChunks [][]byte Error error }
SingleServerStats represents the stats returned from a single server.
type SnapshotState ¶
type SnapshotState uint32
SnapshotState represents the state of a particular cluster snapshot.
func (SnapshotState) HasInMemory ¶
func (s SnapshotState) HasInMemory() bool
HasInMemory returns whether this snapshot is available in memory.
func (SnapshotState) HasOnDisk ¶
func (s SnapshotState) HasOnDisk() bool
HasOnDisk returns whether this snapshot is available on disk.
type SpanStatus ¶
type SpanStatus string
const ( SpanStatusOK SpanStatus = "Ok" SpanStatusError SpanStatus = "Error" )
type StatsCallback ¶
type StatsCallback func(*StatsResult, error)
StatsCallback is invoked upon completion of a Stats operation.
type StatsOptions ¶
type StatsOptions struct { Key string // Target indicates that something specific should be targeted by the operation. If left nil // then the stats command will be sent to all servers. Target StatsTarget RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
StatsOptions encapsulates the parameters for a Stats operation.
type StatsResult ¶
type StatsResult struct {
Servers map[string]SingleServerStats
}
StatsResult encapsulates the result of a Stats operation.
type StatsTarget ¶
type StatsTarget interface { }
StatsTarget is used for providing a specific target to the Stats operation.
type StoreCallback ¶
type StoreCallback func(*StoreResult, error)
StoreCallback is invoked upon completion of a Add, Set or Replace operation.
type StoreResult ¶
type StoreResult struct { Cas Cas MutationToken MutationToken }
StoreResult encapsulates the result of a AddEx, SetEx or ReplaceEx operation.
type StreamObserver ¶
type StreamObserver interface { SnapshotMarker(snapshotMarker DcpSnapshotMarker) Mutation(mutation DcpMutation) Deletion(deletion DcpDeletion) Expiration(expiration DcpExpiration) End(end DcpStreamEnd, err error) CreateCollection(creation DcpCollectionCreation) DeleteCollection(deletion DcpCollectionDeletion) FlushCollection(flush DcpCollectionFlush) CreateScope(creation DcpScopeCreation) DeleteScope(deletion DcpScopeDeletion) ModifyCollection(modification DcpCollectionModification) OSOSnapshot(snapshot DcpOSOSnapshot) SeqNoAdvanced(seqNoAdvanced DcpSeqNoAdvanced) }
StreamObserver provides an interface to receive events from a running DCP stream.
type SubDocOp ¶
type SubDocOp struct { Op memd.SubDocOpType Flags memd.SubdocFlag Path string Value []byte }
SubDocOp defines a per-operation structure to be passed to MutateIn or LookupIn for performing many sub-document operations.
type SubDocResult ¶
SubDocResult encapsulates the results from a single sub-document operation.
type SubDocumentError ¶
SubDocumentError provides additional contextual information to sub-document specific errors. InnerError is always a KeyValueError.
func (SubDocumentError) Error ¶
func (err SubDocumentError) Error() string
Error returns the string representation of this error.
func (SubDocumentError) Unwrap ¶
func (err SubDocumentError) Unwrap() error
Unwrap returns the underlying error for the operation failing.
type TimeoutError ¶
type TimeoutError struct { InnerError error OperationID string Opaque string TimeObserved time.Duration RetryReasons []RetryReason RetryAttempts uint32 LastDispatchedTo string LastDispatchedFrom string LastConnectionID string }
TimeoutError wraps timeout errors that occur within the SDK.
func (TimeoutError) Error ¶
func (err TimeoutError) Error() string
func (*TimeoutError) MarshalJSON ¶
func (err *TimeoutError) MarshalJSON() ([]byte, error)
MarshalJSON implements the Marshaler interface.
func (*TimeoutError) UnmarshalJSON ¶
func (err *TimeoutError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the Unmarshaler interface.
func (TimeoutError) Unwrap ¶
func (err TimeoutError) Unwrap() error
Unwrap returns the underlying reason for the error
type TouchCallback ¶
type TouchCallback func(*TouchResult, error)
TouchCallback is invoked upon completion of a Touch operation.
type TouchOptions ¶
type TouchOptions struct { Key []byte Expiry uint32 CollectionName string ScopeName string CollectionID uint32 RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
TouchOptions encapsulates the parameters for a TouchEx operation.
type TouchResult ¶
type TouchResult struct { Cas Cas MutationToken MutationToken }
TouchResult encapsulates the result of a TouchEx operation.
type TracerConfig ¶
type TracerConfig struct { Tracer RequestTracer NoRootTraceSpans bool }
TracerConfig specifies tracer related configuration options.
type UnlockCallback ¶
type UnlockCallback func(*UnlockResult, error)
UnlockCallback is invoked upon completion of a Unlock operation.
type UnlockOptions ¶
type UnlockOptions struct { Key []byte Cas Cas CollectionName string ScopeName string CollectionID uint32 RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
UnlockOptions encapsulates the parameters for a UnlockEx operation.
type UnlockResult ¶
type UnlockResult struct { Cas Cas MutationToken MutationToken }
UnlockResult encapsulates the result of a UnlockEx operation.
type UserPassPair ¶
UserPassPair represents a username and password pair.
type VBucketIDStatsTarget ¶
type VBucketIDStatsTarget struct {
VbID uint16
}
VBucketIDStatsTarget indicates that a specific vbucket should be targeted by the Stats operation.
type ValueRecorder ¶
type ValueRecorder interface {
RecordValue(val uint64)
}
ValueRecorder is used for grouping synchronous count metrics.
type VbSeqNoEntry ¶
VbSeqNoEntry represents a single GetVbucketSeqnos sequence number entry.
type VbUUID ¶
type VbUUID uint64
VbUUID represents a unique identifier for a particular vbucket history.
type ViewError ¶
type ViewError struct { InnerError error DesignDocumentName string ViewName string Errors []ViewQueryErrorDesc Endpoint string RetryReasons []RetryReason RetryAttempts uint32 }
ViewError represents an error returned from a view query.
func (ViewError) MarshalJSON ¶
MarshalJSON implements the Marshaler interface.
type ViewQueryCallback ¶
type ViewQueryCallback func(*ViewQueryRowReader, error)
ViewQueryCallback is invoked upon completion of a ViewQuery operation.
type ViewQueryErrorDesc ¶
ViewQueryErrorDesc represents specific view error data.
type ViewQueryOptions ¶
type ViewQueryOptions struct { DesignDocumentName string ViewType string ViewName string Options url.Values RetryStrategy RetryStrategy Deadline time.Time // Internal: This should never be used and is not supported. User string TraceContext RequestSpanContext }
ViewQueryOptions represents the various options available for a view query.
type ViewQueryRowReader ¶
type ViewQueryRowReader struct {
// contains filtered or unexported fields
}
ViewQueryRowReader providers access to the rows of a view query
func (*ViewQueryRowReader) Close ¶
func (q *ViewQueryRowReader) Close() error
Close immediately shuts down the connection
func (ViewQueryRowReader) Err ¶
func (q ViewQueryRowReader) Err() error
Err returns any errors that occurred during streaming.
func (*ViewQueryRowReader) MetaData ¶
func (q *ViewQueryRowReader) MetaData() ([]byte, error)
MetaData fetches the non-row bytes streamed in the response.
func (*ViewQueryRowReader) NextRow ¶
func (q *ViewQueryRowReader) NextRow() []byte
NextRow reads the next rows bytes from the stream
type WaitUntilReadyCallback ¶
type WaitUntilReadyCallback func(*WaitUntilReadyResult, error)
WaitUntilReadyCallback is invoked upon completion of a WaitUntilReady operation.
type WaitUntilReadyOptions ¶
type WaitUntilReadyOptions struct { DesiredState ClusterState // Defaults to ClusterStateOnline ServiceTypes []ServiceType // Defaults to all services // If the cluster state is offline and a connect error has been observed then fast fail and return it. RetryStrategy RetryStrategy }
WaitUntilReadyOptions encapsulates the parameters for a WaitUntilReady operation.
type WaitUntilReadyResult ¶
type WaitUntilReadyResult struct { }
WaitUntilReadyResult encapsulates the result of a WaitUntilReady operation.
type WithDurationRetryAction ¶
WithDurationRetryAction represents an action that indicates to retry with a given duration.
func (*WithDurationRetryAction) Duration ¶
func (ra *WithDurationRetryAction) Duration() time.Duration
Duration is the length of time to wait before retrying an operation.
Source Files ¶
- agent.go
- agent_config.go
- agent_internal.go
- agent_ops.go
- agentgroup.go
- agentgroup_config.go
- analyticscomponent.go
- auth.go
- authclient.go
- basehttpcfgcontroller.go
- cbcrc.go
- cccpcfgcontroller.go
- circuitbreaker.go
- clusteragent.go
- clusteragent_config.go
- collections.go
- collectionscomponent.go
- commonflags.go
- config.go
- configmanagement_component.go
- configsnapshot.go
- constants.go
- crud.go
- crud_dura.go
- crud_options.go
- crud_results.go
- crud_subdoc.go
- crudcomponent.go
- crudcomponent_subdoc.go
- dcp.go
- dcpagent.go
- dcpagent_config.go
- dcpcomponent.go
- diagnostics.go
- diagnosticscomponent.go
- dyntlsconfig.go
- errmap.go
- errmapcomponent.go
- errmapptr.go
- error.go
- error_dcp.go
- error_memd.go
- errors_internal.go
- http.go
- httpcfgcontroller.go
- httpclientmux.go
- httpcomponent.go
- httpmux.go
- ketama.go
- kvmux.go
- kvmuxstate.go
- logging.go
- memdclient.go
- memdclientdialer_component.go
- memdconn.go
- memdopmap.go
- memdopqueue.go
- memdpipeline.go
- memdpipelineclient.go
- memdqpackets.go
- memdqsorter.go
- metrics.go
- n1qlcomponent.go
- observecomponent.go
- pendingop.go
- pipelinesnapshot.go
- pollercontroller.go
- querystreamer.go
- retry.go
- routeconfig.go
- rowstreamer.go
- searchcomponent.go
- seedcfgcontroller.go
- statscomponent.go
- syncclient.go
- timerpool.go
- tracing.go
- util.go
- vbucketmap.go
- version.go
- viewscomponent.go
- zombielogger_component.go