blob

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCS

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

func NewGCS

func NewGCS(cfg config.GCSConfig) (*GCS, error)

func (*GCS) Create

func (g *GCS) Create(name string) (io.WriteCloser, chan struct{}, error)

func (*GCS) List

func (g *GCS) List() ([]string, error)

func (*GCS) Open

func (g *GCS) Open(name string) (io.ReadCloser, error)

func (*GCS) Remove

func (g *GCS) Remove(name string) error

type MasterStoreClient

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

func NewMasterStoreClient

func NewMasterStoreClient(clientConn *grpc.ClientConn) *MasterStoreClient

func (*MasterStoreClient) Create

func (c *MasterStoreClient) Create(name string) (io.WriteCloser, chan struct{}, error)

func (*MasterStoreClient) List

func (c *MasterStoreClient) List() ([]string, error)

func (*MasterStoreClient) Open

func (c *MasterStoreClient) Open(name string) (io.ReadCloser, error)

func (*MasterStoreClient) Remove

func (c *MasterStoreClient) Remove(name string) error

type MasterStoreServer

type MasterStoreServer struct {
	protocol.UnimplementedBlobStoreServer
	// contains filtered or unexported fields
}

func NewMasterStoreServer

func NewMasterStoreServer(dir string) *MasterStoreServer

func (*MasterStoreServer) DownloadBlob

func (*MasterStoreServer) ListBlobs

func (*MasterStoreServer) RemoveBlob

type POSIX

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

func NewPOSIX

func NewPOSIX(dir string) *POSIX

func (*POSIX) Create

func (p *POSIX) Create(name string) (io.WriteCloser, chan struct{}, error)

Create a new file for writing. It returns an io.WriteCloser that can be used to write data to the file. It also returns a done channel that is closed when the writing is complete.

func (*POSIX) List

func (p *POSIX) List() ([]string, error)

List files in the directory. It returns a slice of file names.

func (*POSIX) Open

func (p *POSIX) Open(name string) (io.ReadCloser, error)

Open a file for reading. It returns an io.Reader that can be used to read the file's content.

func (*POSIX) Remove

func (p *POSIX) Remove(name string) error

Remove a file by its name. It deletes the file from the filesystem.

type S3

type S3 struct {
	*minio.Client
	// contains filtered or unexported fields
}

func NewS3

func NewS3(cfg config.S3Config) (*S3, error)

func (*S3) Create

func (s *S3) Create(name string) (io.WriteCloser, chan struct{}, error)

Create a new file in S3 for writing. This function returns an io.WriteCloser that can be used to write data to the file. It also returns a done channel that is closed when the writing is complete.

func (*S3) List

func (s *S3) List() ([]string, error)

List files in the S3 bucket with the specified prefix. This function returns a slice of file names.

func (*S3) Open

func (s *S3) Open(name string) (io.ReadCloser, error)

Open a file in S3 for reading. This function returns an io.Reader that can be used to read the file's content.

func (*S3) Remove

func (s *S3) Remove(name string) error

Remove a file from the S3 bucket by its name. This function deletes the file from S3.

type Store

type Store interface {
	Open(name string) (io.ReadCloser, error)
	Create(name string) (io.WriteCloser, chan struct{}, error)
	List() ([]string, error)
	Remove(name string) error
}

Jump to

Keyboard shortcuts

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