Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DriverInterface ¶
type DriverInterface interface { NewAtomicWriter(context.Context, string) (Interface, error) Exists(context.Context, string) (bool, error) }
DriverInterface is the interface an atomic writer driver fulfills. It can be used to create atomic writers.
func NewDriver ¶
func NewDriver(ctx context.Context, dir string) (DriverInterface, error)
NewDriver returns a driver for the specified path.
func NewFileSystemDriver ¶
func NewFileSystemDriver(dir string) DriverInterface
NewFileSystemDriver returns a new atomic writer backed by the local file system.
func NewGCSDriver ¶
func NewGCSDriver(ctx context.Context, dir string, opts ...option.ClientOption) (DriverInterface, error)
NewGCSDriver returns a new atomic writer backed by Google Cloud Storage.
type Interface ¶
type Interface interface { io.Writer // CloseAtomically will attempt to close the file, atomically committing it // to storage. The file will either be fully written, or an error is // returned. // // Clients can use os.IsExist(err) to check if the error was due to a name // conflict. CloseAtomically() error }
Interface is the interface an individual atomic writer fulfills.
Click to show internal directories.
Click to hide internal directories.