Documentation ¶
Index ¶
- Constants
- Variables
- func CreateAgent(httpAddresses []string, bucketName string, username string, password string, ...) (*gocbcore.Agent, error)
- func CreateDocument(ctx context.Context, agent *gocbcore.Agent, scopeName string, ...) error
- func CreatePath(ctx context.Context, agent *gocbcore.Agent, scopeName string, ...) error
- func CreateSecurityConfig(username string, password string, secureConnection bool, rootCAPath string) gocbcore.SecurityConfig
- func CreateTLSRootCaProvider(rootCAPath string) func() *x509.CertPool
- func DeleteDocument(ctx context.Context, agent *gocbcore.Agent, scopeName string, ...) error
- func Get(ctx context.Context, agent *gocbcore.Agent, scopeName string, ...) (*gocbcore.GetResult, error)
- func GetXattrs(ctx context.Context, agent *gocbcore.Agent, scopeName string, ...) ([]byte, error)
- func NewCBMembership(config *config.Dcp, client Client, bus EventBus.Bus) membership.Membership
- func NewCBMetadata(client Client, config *config.Dcp) metadata.Metadata
- func UpdateDocument(ctx context.Context, agent *gocbcore.Agent, scopeName string, ...) error
- func UpsertXattrs(ctx context.Context, agent *gocbcore.Agent, scopeName string, ...) error
- type AsyncOp
- type BucketInfo
- type Client
- type HTTPClient
- type HealthCheck
- type Instance
- type Observer
- type ObserverMetric
- type PoolsResult
- type RollbackMitigation
- type Version
Constants ¶
View Source
const DefaultCollectionName = "_default"
Variables ¶
View Source
var ( SrvVer550 = &Version{5, 5, 0, 0} SrvVer650 = &Version{6, 5, 0, 0} SrvVer720 = &Version{7, 2, 0, 0} )
Functions ¶
func CreateAgent ¶ added in v0.0.64
func CreateDocument ¶
func CreatePath ¶
func CreateSecurityConfig ¶ added in v0.0.64
func CreateTLSRootCaProvider ¶ added in v0.0.64
func DeleteDocument ¶
func NewCBMembership ¶
func NewCBMembership(config *config.Dcp, client Client, bus EventBus.Bus) membership.Membership
func UpdateDocument ¶
Types ¶
type AsyncOp ¶
func NewAsyncOp ¶
type BucketInfo ¶ added in v1.1.19
type BucketInfo struct { BucketType string `json:"bucketType"` StorageBackend string `json:"storageBackend"` }
func (*BucketInfo) IsEphemeral ¶ added in v1.1.19
func (b *BucketInfo) IsEphemeral() bool
func (*BucketInfo) IsMagma ¶ added in v1.1.19
func (b *BucketInfo) IsMagma() bool
type Client ¶
type Client interface { Ping() (*models.PingResult, error) GetAgent() *gocbcore.Agent GetMetaAgent() *gocbcore.Agent Connect() error Close() DcpConnect(useExpiryOpcode bool, useChangeStreams bool) error DcpClose() GetVBucketSeqNos() (map[uint16]uint64, error) GetNumVBuckets() int GetFailoverLogs(vbID uint16) ([]gocbcore.FailoverEntry, error) OpenStream(vbID uint16, collectionIDs map[uint32]string, offset *models.Offset, observer Observer) error CloseStream(vbID uint16) error GetCollectionIDs(scopeName string, collectionNames []string) map[uint32]string GetConfigSnapshot() (*gocbcore.ConfigSnapshot, error) }
type HTTPClient ¶ added in v1.1.19
type HTTPClient interface { Connect() error GetVersion() (*Version, error) GetBucketInfo() (*BucketInfo, error) }
func NewHTTPClient ¶ added in v1.1.19
func NewHTTPClient(config *config.Dcp, client Client) HTTPClient
type HealthCheck ¶ added in v1.1.19
type HealthCheck interface { Start(ch chan struct{}) Stop() }
func NewHealthCheck ¶ added in v1.1.19
func NewHealthCheck(config *config.HealthCheck, client Client) HealthCheck
type Observer ¶
type Observer interface { SnapshotMarker(marker models.DcpSnapshotMarker) Mutation(mutation gocbcore.DcpMutation) Deletion(deletion gocbcore.DcpDeletion) Expiration(expiration gocbcore.DcpExpiration) End(dcpEnd models.DcpStreamEnd, err error) CreateCollection(creation models.DcpCollectionCreation) DeleteCollection(deletion models.DcpCollectionDeletion) FlushCollection(flush models.DcpCollectionFlush) CreateScope(creation models.DcpScopeCreation) DeleteScope(deletion models.DcpScopeDeletion) ModifyCollection(modification models.DcpCollectionModification) OSOSnapshot(snapshot models.DcpOSOSnapshot) SeqNoAdvanced(advanced gocbcore.DcpSeqNoAdvanced) GetMetrics() *wrapper.ConcurrentSwissMap[uint16, *ObserverMetric] GetPersistSeqNo() *wrapper.ConcurrentSwissMap[uint16, gocbcore.SeqNo] Listen() models.ListenerCh Close() CloseEnd() ListenEnd() models.ListenerEndCh AddCatchup(vbID uint16, seqNo gocbcore.SeqNo) SetVbUUID(vbID uint16, vbUUID gocbcore.VbUUID) }
type ObserverMetric ¶
type ObserverMetric struct { TotalMutations float64 TotalDeletions float64 TotalExpirations float64 }
func (*ObserverMetric) AddDeletion ¶
func (om *ObserverMetric) AddDeletion()
func (*ObserverMetric) AddExpiration ¶
func (om *ObserverMetric) AddExpiration()
func (*ObserverMetric) AddMutation ¶
func (om *ObserverMetric) AddMutation()
type PoolsResult ¶ added in v1.1.19
type PoolsResult struct {
ImplementationVersion string `json:"implementationVersion"`
}
type RollbackMitigation ¶
type RollbackMitigation interface { Start() Stop() }
func NewRollbackMitigation ¶
type Version ¶ added in v1.1.19
Version snippet from https://github.com/couchbase/gocbcore/blob/master/nodeversion_test.go
Click to show internal directories.
Click to hide internal directories.