blobcachecmd

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: GPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const EnvVar_NSRoot = "BLOBCACHE_NS_ROOT"

EnvVar_NSRoot is the key for the environment variable that holds the root namespace

Variables

This section is empty.

Functions

func Main

func Main()

Main is the main function for the blobcache CLI. Usage is:

func main() {
    blobcachecmd.Main()
}

func NSClientForVolume added in v0.0.2

func NSClientForVolume(ctx context.Context, svc blobcache.Service, nsvolh blobcache.Handle) (schema.NSClient, error)

NSClientForVolume returns a NSClient configured with the Schema used by the given volume.

func Root

func Root() star.Command

Root returns the root command for the blobcache CLI.

func RunTest

func RunTest(t testing.TB, env map[string]string, calledAs string, args []string, stdin *bufio.Reader, stdout *bufio.Writer, stderr *bufio.Writer)

Types

type Service

type Service struct {
	APIAddr  string
	ExecPath string
}

func (*Service) Abort

func (s *Service) Abort(ctx context.Context, h blobcache.Handle) error

TxAPI

func (*Service) BeginTx

func (s *Service) BeginTx(ctx context.Context, volh blobcache.Handle, txp blobcache.TxParams) (*blobcache.Handle, error)

func (*Service) CloneVolume

func (s *Service) CloneVolume(ctx context.Context, caller *blobcache.PeerID, volh blobcache.Handle) (*blobcache.Handle, error)

func (*Service) Commit

func (s *Service) Commit(ctx context.Context, h blobcache.Handle) error

func (*Service) Copy

func (s *Service) Copy(ctx context.Context, h blobcache.Handle, srcTxns []blobcache.Handle, cids []blobcache.CID, success []bool) error

func (*Service) CreateQueue

func (s *Service) CreateQueue(ctx context.Context, host *blobcache.Endpoint, qspec blobcache.QueueSpec) (*blobcache.Handle, error)

func (*Service) CreateVolume

func (s *Service) CreateVolume(ctx context.Context, host *blobcache.Endpoint, vspec blobcache.VolumeSpec) (*blobcache.Handle, error)

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, h blobcache.Handle, cids []blobcache.CID) error

func (*Service) Drop

func (s *Service) Drop(ctx context.Context, h blobcache.Handle) error

HandleAPI

func (*Service) Endpoint

func (s *Service) Endpoint(ctx context.Context) (ep blobcache.Endpoint, _ error)

func (*Service) Exists

func (s *Service) Exists(ctx context.Context, h blobcache.Handle, cids []blobcache.CID, dst []bool) error

func (*Service) Get

func (s *Service) Get(ctx context.Context, h blobcache.Handle, cid blobcache.CID, buf []byte, opts blobcache.GetOpts) (int, error)

func (*Service) Insert

func (*Service) InspectHandle

func (s *Service) InspectHandle(ctx context.Context, h blobcache.Handle) (*blobcache.HandleInfo, error)

func (*Service) InspectTx

func (s *Service) InspectTx(ctx context.Context, h blobcache.Handle) (*blobcache.TxInfo, error)

func (*Service) InspectVolume

func (s *Service) InspectVolume(ctx context.Context, h blobcache.Handle) (*blobcache.VolumeInfo, error)

func (*Service) IsVisited

func (s *Service) IsVisited(ctx context.Context, h blobcache.Handle, cids []blobcache.CID, yesVisited []bool) error

func (*Service) KeepAlive

func (s *Service) KeepAlive(ctx context.Context, hs []blobcache.Handle) error
func (s *Service) Link(ctx context.Context, h blobcache.Handle, subvol blobcache.Handle, rights blobcache.ActionSet) error

func (*Service) Load

func (s *Service) Load(ctx context.Context, h blobcache.Handle, dst *[]byte) error

func (*Service) Next

func (*Service) OpenFiat

func (s *Service) OpenFiat(ctx context.Context, x blobcache.OID, mask blobcache.ActionSet) (*blobcache.Handle, error)

Backward-compat shim to satisfy any stale interface checks

func (*Service) OpenFrom

func (*Service) Post

func (s *Service) Post(ctx context.Context, h blobcache.Handle, data []byte, opts blobcache.PostOpts) (blobcache.CID, error)

func (*Service) Save

func (s *Service) Save(ctx context.Context, h blobcache.Handle, src []byte) error

func (*Service) Share

func (*Service) SubToVolume

func (s *Service) SubToVolume(ctx context.Context, q blobcache.Handle, vol blobcache.Handle) error
func (s *Service) Unlink(ctx context.Context, h blobcache.Handle, targets []blobcache.OID) error

func (*Service) Visit

func (s *Service) Visit(ctx context.Context, h blobcache.Handle, cids []blobcache.CID) error
func (s *Service) VisitLinks(ctx context.Context, h blobcache.Handle, targets []blobcache.OID) error

Jump to

Keyboard shortcuts

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