manager

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 20 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 {
	pg.PoolConn
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, pool pg.PoolConn, queue *queuemanager.Manager, opts ...Opt) (result *Manager, err error)

New creates a new filer manager.

func (*Manager) Backend

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) CreateObject

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

func (*Manager) DeleteObject

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

func (*Manager) DeleteObjects

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

func (*Manager) GetObject

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

func (*Manager) ListObjects

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

func (*Manager) QueueIndexTask

func (manager *Manager) QueueIndexTask(ctx context.Context, objects ...schema.Object) error

func (*Manager) ReadObject

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

func (*Manager) Run

func (manager *Manager) Run(ctx context.Context) (err error)

Run all backends

func (*Manager) RunIndexer

func (manager *Manager) RunIndexer(ctx context.Context, payload json.RawMessage) (any, error)

func (*Manager) Tracer

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

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

type Opt

type Opt func(*opt) error

Opt is a functional option for filer manager configuration.

func WithBackend

func WithBackend(ctx context.Context, url string, blobOpts ...blob.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, blobOpts ...blob.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