manager

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

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
}

func New

func New(ctx context.Context, opts ...Opt) (*Manager, error)

New creates a new filer manager.

func (*Manager) Backend added in v0.0.3

func (manager *Manager) Backend(name string) backend.Backend

Backend returns the named backend, or nil if it does not exist.

func (*Manager) Backends

func (manager *Manager) Backends() []string

Backends returns the list of backend names

func (*Manager) Close

func (manager *Manager) Close() error

Close all backends

func (*Manager) CreateObject

func (manager *Manager) CreateObject(ctx context.Context, name string, req schema.CreateObjectRequest) (*schema.Object, error)

func (*Manager) DeleteObject

func (manager *Manager) DeleteObject(ctx context.Context, name string, req schema.DeleteObjectRequest) (*schema.Object, error)

func (*Manager) DeleteObjects

func (manager *Manager) DeleteObjects(ctx context.Context, name string, req schema.DeleteObjectsRequest) (*schema.DeleteObjectsResponse, error)

func (*Manager) GetObject

func (manager *Manager) GetObject(ctx context.Context, name string, req schema.GetObjectRequest) (*schema.Object, error)

func (*Manager) ListObjects

func (manager *Manager) ListObjects(ctx context.Context, name string, req schema.ListObjectsRequest) (*schema.ListObjectsResponse, error)

func (*Manager) ReadObject

func (manager *Manager) ReadObject(ctx context.Context, name string, req schema.ReadObjectRequest) (io.ReadCloser, *schema.Object, error)

func (*Manager) Tracer added in v0.0.15

func (manager *Manager) Tracer() trace.Tracer

Tracer returns the tracer used by this manager, or nil if not set.

type Opt

type Opt func(*opts) error

Opt is a functional option for filer manager configuration.

func WithBackend

func WithBackend(ctx context.Context, url string, backendOpts ...backend.Opt) Opt

WithBackend adds a blob backend (mem://, file://, s3://) to the filer. The url should be in the format "scheme://bucket" (e.g., "mem://mybucket", "s3://mybucket"). Returns an error if a backend with the same name already exists.

func WithFileBackend

func WithFileBackend(ctx context.Context, name, dir string, backendOpts ...backend.Opt) Opt

WithFileBackend is a convenience option that adds a file:// backend. name must be a valid identifier; dir must be an absolute path.

func WithTracer

func WithTracer(tracer trace.Tracer) Opt

WithTracer sets the tracer used for tracing operations.

Jump to

Keyboard shortcuts

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