logging

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2022 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package logging implements a store that delegates everything to a nested store, logging operations as they happen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store is the type of a logging wrapper around a given bs.Store. The nested store may optionally be an anchor.Store too.

func New

func New(s bs.Store) *Store

New produces a new Store that embeds a given bs.Store, which is optionally also an anchor.Store.

func (*Store) AnchorMapRef

func (s *Store) AnchorMapRef(ctx context.Context) (bs.Ref, error)

AnchorMapRef implements anchor.Getter. If the nested store is not an anchor.Store, this returns anchor.ErrNotAnchorStore.

func (*Store) Get

func (s *Store) Get(ctx context.Context, ref bs.Ref) (bs.Blob, error)

Get implements bs.Getter.Get.

func (*Store) ListRefs

func (s *Store) ListRefs(ctx context.Context, start bs.Ref, f func(bs.Ref) error) error

ListRefs implements bs.Getter.ListRefs.

func (*Store) Put

func (s *Store) Put(ctx context.Context, b bs.Blob) (bs.Ref, bool, error)

Put implements bs.Store.Put.

func (*Store) UpdateAnchorMap

func (s *Store) UpdateAnchorMap(ctx context.Context, f anchor.UpdateFunc) error

UpdateAnchorMap implements anchor.Store. If the nested store is not an anchor.Store, this returns anchor.ErrNotAnchorStore.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL