blobfs

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package blobfs provides some wrappers around interactions with the blobfs. TODO(raggi): add support for blob garbage collection

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager wraps operations for reading and writing to blobfs, and will later tackle more complex problems such as managing reference counting and garbage collection of blobs.

func New

func New(blobDir *fdio.Directory) (*Manager, error)

New constructs a new Manager for the blobfs mount at the given root.

func (*Manager) Blobs

func (m *Manager) Blobs() ([]string, error)

func (*Manager) Channel

func (m *Manager) Channel() zx.Channel

Channel returns an the FDIO directory handle for the blobfs root

func (*Manager) HasBlob

func (m *Manager) HasBlob(root string) bool

HasBlob returns true if the requested blob is available for reading, false otherwise

func (*Manager) Open

func (m *Manager) Open(root string) (*os.File, error)

Open opens a blobfs blob for reading

func (*Manager) OpenFile

func (m *Manager) OpenFile(root string, flags int, mode uint32) (*os.File, error)

OpenFile opens a blobfs path with the given flags

func (*Manager) Sync

func (m *Manager) Sync() error

Sync flushes cached packages.

Jump to

Keyboard shortcuts

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