Documentation
¶
Overview ¶
Package objstore provides ObjectStore implementations. The local-filesystem backend (FS) is the v1 default; an S3-compatible backend can be added behind the same teled.ObjectStore interface.
Index ¶
- type FS
- func (s *FS) Delete(ctx context.Context, key string) (rerr error)
- func (s *FS) Get(ctx context.Context, key string) (_ io.ReadCloser, rerr error)
- func (s *FS) GetRange(ctx context.Context, key string, offset, length int64) (_ io.ReadCloser, rerr error)
- func (s *FS) Put(ctx context.Context, key string, r io.Reader, _ int64, _ teled.PutOptions) (rerr error)
- func (s *FS) Stat(ctx context.Context, key string) (_ teled.ObjectInfo, rerr error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS is a local-filesystem ObjectStore. Objects are stored under a base directory, sharded by the first bytes of the key to avoid huge directories.
func NewFS ¶
NewFS creates an FS rooted at base, creating the directory if needed. providers supplies the OpenTelemetry tracer and meter for this layer.
func (*FS) GetRange ¶
func (s *FS) GetRange(ctx context.Context, key string, offset, length int64) (_ io.ReadCloser, rerr error)
GetRange implements teled.ObjectStore, returning length bytes from offset.
Click to show internal directories.
Click to hide internal directories.