Documentation
¶
Index ¶
- Constants
- func GetAllocationStats() (int64, int64, int64)
- func IsConnectorError(err error) bool
- func IsDatabaseError(err error) bool
- func IsServiceUnavailable(err error) bool
- func IsTransientError(err error) bool
- func IsWriteError(err error) bool
- func NewDatabaseError(details map[string]interface{}) error
- type AccessMode
- type Config
- type Connection
- type Connector
- type ConnectorError
- type DatabaseError
- type FetchType
- type Logging
- type RequestHandle
- type UrlAddressResolver
- type ValueHandler
- type ValueHandlerError
- type ValueHandlerNotSupportedError
Constants ¶
const ( // FetchTypeRecord tells that fetched data is record FetchTypeRecord FetchType = 1 // FetchTypeMetadata tells that fetched data is metadata FetchTypeMetadata = 0 // FetchTypeError tells that fetch was not successful FetchTypeError = -1 )
Variables ¶
This section is empty.
Functions ¶
func GetAllocationStats ¶
GetAllocationStats returns statistics about seabolt (C) allocations
func IsConnectorError ¶
IsConnectorError checkes whether given err is a ConnectorError
func IsDatabaseError ¶
IsDatabaseError checkes whether given err is a DatabaseError
func IsServiceUnavailable ¶
IsServiceUnavailable checkes whether given err represents a service unavailable status
func IsTransientError ¶
IsTransientError checkes whether given err is a transient error
func IsWriteError ¶
func NewDatabaseError ¶
Types ¶
type AccessMode ¶
type AccessMode int
const ( AccessModeWrite AccessMode = 0 AccessModeRead AccessMode = 1 )
type Config ¶
type Config struct {
Encryption bool
MaxPoolSize int
Log Logging
AddressResolver UrlAddressResolver
ValueHandlers []ValueHandler
}
Config holds the available configurations options applicable to the connector
type Connection ¶
type Connection interface {
RemoteAddress() string
Server() string
Begin(bookmarks []string, txTimeout time.Duration, txMetadata map[string]interface{}) (RequestHandle, error)
Commit() (RequestHandle, error)
Rollback() (RequestHandle, error)
Run(cypher string, args map[string]interface{}, bookmarks []string, txTimeout time.Duration, txMetadata map[string]interface{}) (RequestHandle, error)
PullAll() (RequestHandle, error)
DiscardAll() (RequestHandle, error)
Reset() (RequestHandle, error)
Flush() error
Fetch(request RequestHandle) (FetchType, error) // return type ?
FetchSummary(request RequestHandle) (int, error) // return type ?
LastBookmark() string
Fields() ([]string, error)
Metadata() (map[string]interface{}, error)
Data() ([]interface{}, error)
Close() error
}
Connection represents an active seabolt connection
type Connector ¶
type Connector interface {
Acquire(mode AccessMode) (Connection, error)
Close() error
}
Connector represents an initialised seabolt connector
type ConnectorError ¶
type ConnectorError struct {
// contains filtered or unexported fields
}
ConnectorError represents errors that occur on the connector/client side, like network errors, etc.
func (*ConnectorError) Code ¶
func (failure *ConnectorError) Code() uint32
func (*ConnectorError) Description ¶
func (failure *ConnectorError) Description() string
func (*ConnectorError) Error ¶
func (failure *ConnectorError) Error() string
TODO: add some text description to the error message based on the state and error codes possibly from connector side Error returns textual representation of the connector level error
func (*ConnectorError) State ¶
func (failure *ConnectorError) State() uint32
type DatabaseError ¶
type DatabaseError struct {
// contains filtered or unexported fields
}
DatabaseError represents errors returned from the server a FAILURE messages
func (*DatabaseError) Classification ¶
func (failure *DatabaseError) Classification() string
Classification returns classification of the error returned from the database
func (*DatabaseError) Code ¶
func (failure *DatabaseError) Code() string
Code returns code of the error returned from the database
func (*DatabaseError) Error ¶
func (failure *DatabaseError) Error() string
Error returns textual representation of the error returned from the database
func (*DatabaseError) Message ¶
func (failure *DatabaseError) Message() string
Message returns message of the error returned from the database
type FetchType ¶
type FetchType int
FetchType identifies the type of the result fetched via Fetch() call
type RequestHandle ¶
type RequestHandle int64
RequestHandle identifies an individual request sent to server
type UrlAddressResolver ¶
type ValueHandler ¶
type ValueHandlerError ¶
type ValueHandlerError struct {
// contains filtered or unexported fields
}
func NewValueHandlerError ¶
func NewValueHandlerError(message string) *ValueHandlerError
func (*ValueHandlerError) Error ¶
func (ns *ValueHandlerError) Error() string
type ValueHandlerNotSupportedError ¶
type ValueHandlerNotSupportedError struct {
}
func (*ValueHandlerNotSupportedError) Error ¶
func (ns *ValueHandlerNotSupportedError) Error() string