Documentation
¶
Overview ¶
Package bcclient provides a client for the Blobcache API.
Index ¶
Constants ¶
const ( // EnvBlobcacheAPI is the name of the environment variable used // as the endpoint for the BLOBCACHE_API EnvBlobcacheAPI = "BLOBCACHE_API" EnvBlobcacheNSRoot = "BLOBCACHE_NS_ROOT" )
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 NewClientFromEnv ¶
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.