open-vault/vendor/github.com/couchbase/gocb/v2/bucket_internal.go

21 lines
606 B
Go

package gocb
import gocbcore "github.com/couchbase/gocbcore/v9"
// InternalBucket is used for internal functionality.
// Internal: This should never be used and is not supported.
type InternalBucket struct {
bucket *Bucket
}
// Internal returns a CollectionInternal.
// Internal: This should never be used and is not supported.
func (b *Bucket) Internal() *InternalBucket {
return &InternalBucket{bucket: b}
}
// IORouter returns the collection's internal core router.
func (ib *InternalBucket) IORouter() (*gocbcore.Agent, error) {
return ib.bucket.connectionManager.connection(ib.bucket.Name())
}