bcclient

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: GPL-3.0, MPL-2.0 Imports: 8 Imported by: 2

Documentation

Overview

Package bcclient provides a client for the Blobcache API.

Index

Constants

View Source
const (
	// EnvBlobcacheAPI is the name of the environment variable used
	// as the endpoint for the BLOBCACHE_API
	EnvBlobcacheAPI    = "BLOBCACHE_API"
	EnvBlobcacheNSRoot = "BLOBCACHE_NS_ROOT"
)
View Source
const DefaultEndpoint = "unix:///run/blobcache/blobcache.sock"

DefaultEndpoint is the endpoint assumed if the environment variable defined by EnvBlobcacheAPI (BLOBCACHE_API) is not set.

Variables

This section is empty.

Functions

func EnvNSRoot added in v0.4.0

func EnvNSRoot() (bcns.ObjectExpr, error)

EnvNSRoot parses a handle or OID read from the BLOBCACHE_NS_ROOT environment variable into a bcns.ObjectExpr If the environment variable does not exist, then it returns the root OID If the variable cannot be parsed into an ObjectExpr than an error is returned.

func NewClient

func NewClient(endpoint string) blobcache.Service

NewClient creates a Client backed by the server at endpoint

func NewClientFromEnv

func NewClientFromEnv() blobcache.Service

NewClientFromEnv creates a new client from environment variables

func OpenNSRoot added in v0.4.0

func OpenNSRoot(ctx context.Context, bc blobcache.Service) (rootVol *blobcache.Handle, ncs *bcns.Client, _ error)

OpenNSRoot calls EnvNSRoot to get the NS Root from the environment Then it uses the Service to find and open the root namespace volume, and setup a namespace Client to view and modify the namespace.

Types

This section is empty.

Jump to

Keyboard shortcuts

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