Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (client *Client) BeginTx(key string, mode Mode) (*Tx, error)
- func (client *Client) Close() error
- func (client *Client) CreateIfNotExist(key string) error
- func (client *Client) CreateOrReset(key string) error
- func (client *Client) ImportFrom(deviceID string) error
- func (client *Client) Remove(key string) error
- func (client *Client) Truncate(key string) error
- type Config
- type Cursor
- type Mode
- type SubTx
- type Tx
Constants ¶
View Source
const ( // View is the mode for retreving key information without locking VIEW = Mode(iota) // RDONLY is the mode for retreving key information with locking RDONLY // WRONLY appends changes to the log of the key WRONLY )
Variables ¶
View Source
var ( // ErrMiddleware is the root of errors caused by Middleware ErrMiddleware = errors.NewClass("Middleware Error") ErrArg = ErrMiddleware.NewClass("Argument error") ErrRuntime = ErrMiddleware.NewClass("Runtime error") // Generic family errors ErrBackend = ErrMiddleware.New("Backend error") // Argument family errors ErrInvalid = ErrArg.New("Invalid argument") ErrInvalidKey = ErrArg.New("Invalid key") // Runtime family errors ErrOutOfRange = ErrRuntime.New("Out of range") ErrTooLarge = ErrRuntime.New("Too large") ErrReadOnly = ErrRuntime.New("File handle is read only") ErrWriteOnly = ErrRuntime.New("File handle is write only") ErrNotADir = ErrRuntime.New("Not a dir") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ProcessorManager *processormanager.ProcessorManager DeviceManager *devicemanager.DeviceManager CoordinatorManager *coordinatormanager.CoordinatorManager Datapath processor.Processor // contains filtered or unexported fields }
Client provides access to the backend proxies
func (*Client) CreateIfNotExist ¶
CreateIfNotExist creates the log the key from the respective Coordinator
func (*Client) CreateOrReset ¶
CreateOrReset ensures the log the key from the respective Coordinator
func (*Client) ImportFrom ¶
type Tx ¶
type Tx struct { // UpdateTx SubTxs []*SubTx `json:"SubTxs,omitempty"` Sinks map[string]string `json:"Sinks,omitempty"` // transaction identifier TID string `json:"TID,omitempty"` // contains filtered or unexported fields }
func (*Tx) Commit ¶
Commit writes all changes to the devices and updates the meta page on coordinators Returns an error if a device write error occurs, or if Commit is called on a read-only transaction.
func (*Tx) Get ¶
We want the reader to be stateless, but doing so when blocks are involved is tricky. Offset M may not be aligned with block begin at offset N. In order to navigate correctly the metadata within the block the client must position with M-N (alpabetically ordered)
Click to show internal directories.
Click to hide internal directories.