rados

package
v0.0.0-...-a26ad45 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2016 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRadosConfig

func RegisterRadosConfig(configPath string) error

Register Rados client with a specific configuration file as context.

Types

type RadosReadCloser

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

RadosReadCloser is a simple ReadCloser for Rados files. It will track its current position in the Rados file and start reading from it.

func NewRadosReadCloser

func NewRadosReadCloser(obj *rados.Object) *RadosReadCloser

NewRadosReadCloser creates a new RadosReadCloser for the given Rados object "obj".

func (*RadosReadCloser) Close

func (r *RadosReadCloser) Close() error

Close doesn't do a lot since Rados doesn't have that notion.

func (*RadosReadCloser) Read

func (r *RadosReadCloser) Read(p []byte) (n int, err error)

Read fetches the next few bytes from the wrapped Rados object and puts them into the buffer "p". Up to len(p) bytes will be read at a time.

func (*RadosReadCloser) Seek

func (r *RadosReadCloser) Seek(offset int64, whence int) (int64, error)

Seek changes the current position in the file as specified in the parameters. See the io.Seeker interface.

type RadosWriteCloser

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

RadosWriteCloser is a simple WriteCloser for Rados files. It will append any data to the wrapped Rados object, and closing won't do anything.

func NewRadosWriteCloser

func NewRadosWriteCloser(obj *rados.Object) *RadosWriteCloser

NewRadosWriteCloser creates a new RadosWriteCloser for the given Rados object "obj".

func (*RadosWriteCloser) Close

func (*RadosWriteCloser) Close() error

Close does absolutely nothing because why would it?

func (*RadosWriteCloser) Seek

func (w *RadosWriteCloser) Seek(offset int64, whence int) (int64, error)

Seek on appending writers only supports determining the current position, anything else will yield an error.

func (*RadosWriteCloser) Write

func (w *RadosWriteCloser) Write(p []byte) (n int, err error)

Write appends the bytes in "p" to the wrapped Rados object.

Jump to

Keyboard shortcuts

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