Documentation
¶
Overview ¶
Package trace wraps a datastore where all datastore interactions are traced with open telemetry.
Index ¶
- type Datastore
- func (t *Datastore) Batch(ctx context.Context) (ds.Batch, error)
- func (t *Datastore) Check(ctx context.Context) error
- func (t *Datastore) Close() error
- func (t *Datastore) CollectGarbage(ctx context.Context) error
- func (t *Datastore) Delete(ctx context.Context, key ds.Key) error
- func (t *Datastore) DiskUsage(ctx context.Context) (uint64, error)
- func (t *Datastore) Get(ctx context.Context, key ds.Key) (value []byte, err error)
- func (t *Datastore) GetSize(ctx context.Context, key ds.Key) (int, error)
- func (t *Datastore) Has(ctx context.Context, key ds.Key) (bool, error)
- func (t *Datastore) NewTransaction(ctx context.Context, readOnly bool) (ds.Txn, error)
- func (t *Datastore) Put(ctx context.Context, key ds.Key, value []byte) error
- func (t *Datastore) Query(ctx context.Context, q dsq.Query) (dsq.Results, error)
- func (t *Datastore) Scrub(ctx context.Context) error
- func (t *Datastore) Sync(ctx context.Context, key ds.Key) error
- type Txn
- func (t *Txn) Commit(ctx context.Context) error
- func (t *Txn) Delete(ctx context.Context, key ds.Key) error
- func (t *Txn) Discard(ctx context.Context)
- func (t *Txn) Get(ctx context.Context, key ds.Key) (value []byte, err error)
- func (t *Txn) GetSize(ctx context.Context, key ds.Key) (int, error)
- func (t *Txn) Has(ctx context.Context, key ds.Key) (bool, error)
- func (t *Txn) Put(ctx context.Context, key ds.Key, value []byte) error
- func (t *Txn) Query(ctx context.Context, q dsq.Query) (dsq.Results, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
type Datastore struct {
// contains filtered or unexported fields
}
Datastore is an adapter that traces inner datastore interactions.
func (*Datastore) Close ¶
Close closes the inner datastore (if it implements the io.Closer interface).
func (*Datastore) CollectGarbage ¶
CollectGarbage implements the ds.GCDatastore interface.
func (*Datastore) NewTransaction ¶
NewTransaction implements the ds.TxnDatastore interface.
type Txn ¶
type Txn struct {
// contains filtered or unexported fields
}
Txn is an adapter that traces datastore transactions
Click to show internal directories.
Click to hide internal directories.