Documentation ¶
Index ¶
- Constants
- func KeepConnection(resultCode int) bool
- func ResultCodeToString(resultCode ResultCode) string
- func TTL(secsFromCitrusLeafEpoc int) int
- type AerospikeError
- func CommandRejectedErr(msgs ...string) AerospikeError
- func ConnectionErr(msgs ...string) AerospikeError
- func InvalidNodeErr(msgs ...string) AerospikeError
- func NewAerospikeError(code ResultCode, messages ...string) AerospikeError
- func ParseErr(msgs ...string) AerospikeError
- func QueryTerminatedErr(msgs ...string) AerospikeError
- func ScanTerminatedErr(msgs ...string) AerospikeError
- func SerializationErr(msgs ...string) AerospikeError
- func TimeoutErr(msgs ...string) AerospikeError
- func TypeNotSupportedErr() AerospikeError
- type Language
- type Message
- type MessageHeader
- type MessageType
- type ResultCode
Constants ¶
View Source
const ( MSG_HEADER_SIZE = 8 //sizeof(MessageHeader) MSG_INFO MessageType = 1 MSG_MESSAGE = 3 )
View Source
const (
CITRUSLEAF_EPOCH = 1262304000
)
Variables ¶
This section is empty.
Functions ¶
func KeepConnection ¶
Should connection be put back into pool.
func ResultCodeToString ¶
func ResultCodeToString(resultCode ResultCode) string
Return result code as a string.
Types ¶
type AerospikeError ¶
type AerospikeError struct {
// contains filtered or unexported fields
}
Aerospike error implements error interface for aerospike specific errors
func CommandRejectedErr ¶
func CommandRejectedErr(msgs ...string) AerospikeError
func ConnectionErr ¶
func ConnectionErr(msgs ...string) AerospikeError
func InvalidNodeErr ¶
func InvalidNodeErr(msgs ...string) AerospikeError
func NewAerospikeError ¶
func NewAerospikeError(code ResultCode, messages ...string) AerospikeError
Generator for Aerospike errors. If no message is provided, the result code will be translated into the default error message
func ParseErr ¶
func ParseErr(msgs ...string) AerospikeError
func QueryTerminatedErr ¶
func QueryTerminatedErr(msgs ...string) AerospikeError
func ScanTerminatedErr ¶
func ScanTerminatedErr(msgs ...string) AerospikeError
func SerializationErr ¶
func SerializationErr(msgs ...string) AerospikeError
func TimeoutErr ¶
func TimeoutErr(msgs ...string) AerospikeError
func TypeNotSupportedErr ¶
func TypeNotSupportedErr() AerospikeError
func (AerospikeError) ResultCode ¶
func (this AerospikeError) ResultCode() ResultCode
type Message ¶
type Message struct { MessageHeader Data []byte }
func NewMessage ¶
func NewMessage(mtype MessageType, data []byte) *Message
type MessageHeader ¶
func (*MessageHeader) Length ¶
func (this *MessageHeader) Length() int64
type MessageType ¶
type MessageType uint8
type ResultCode ¶
type ResultCode int
Database operation error codes. The positive numbers align with the server side file proto.h.
const ( // Asynchronous max concurrent database commands have been exceeded and therefore rejected. COMMAND_REJECTED ResultCode = -6 // Query was terminated by user. QUERY_TERMINATED ResultCode = -5 // Scan was terminated by user. SCAN_TERMINATED ResultCode = -4 // Chosen node is not currently active. INVALID_NODE_ERROR ResultCode = -3 // Client parse error. PARSE_ERROR ResultCode = -2 // Client serialization error. SERIALIZE_ERROR ResultCode = -1 // Operation was successful. OK ResultCode = 0 // Unknown server failure. SERVER_ERROR ResultCode = 1 // On retrieving, touching or replacing a record that doesn't exist. KEY_NOT_FOUND_ERROR ResultCode = 2 // On modifying a record with unexpected generation. GENERATION_ERROR ResultCode = 3 // Bad parameter(s) were passed in database operation call. PARAMETER_ERROR ResultCode = 4 // On create-only (write unique) operations on a record that already // exists. KEY_EXISTS_ERROR ResultCode = 5 // On create-only (write unique) operations on a bin that already // exists. BIN_EXISTS_ERROR ResultCode = 6 // Expected cluster ID was not received. CLUSTER_KEY_MISMATCH ResultCode = 7 // Server has run out of memory. SERVER_MEM_ERROR ResultCode = 8 // Client or server has timed out. TIMEOUT ResultCode = 9 // XDS product is not available. NO_XDS ResultCode = 10 // Server is not accepting requests. SERVER_NOT_AVAILABLE ResultCode = 11 // Operation is not supported with configured bin type (single-bin or // multi-bin). BIN_TYPE_ERROR ResultCode = 12 // Record size exceeds limit. RECORD_TOO_BIG ResultCode = 13 // Too many concurrent operations on the same record. KEY_BUSY ResultCode = 14 // Scan aborted by server. SCAN_ABORT ResultCode = 15 // Unsupported Server Feature (e.g. Scan + UDF) UNSUPPORTED_FEATURE ResultCode = 16 // Specified bin name does not exist in record. BIN_NOT_FOUND ResultCode = 17 // Specified bin name does not exist in record. DEVICE_OVERLOAD ResultCode = 18 // Key type mismatch. KEY_MISMATCH ResultCode = 19 // A user defined function returned an error code. UDF_BAD_RESPONSE ResultCode = 100 // Secondary index already exists. INDEX_FOUND ResultCode = 200 // Requested secondary index does not exist. INDEX_NOTFOUND ResultCode = 201 // Secondary index memory space exceeded. INDEX_OOM ResultCode = 202 // Secondary index not available. INDEX_NOTREADABLE ResultCode = 203 // Generic secondary index error. INDEX_GENERIC ResultCode = 204 // Index name maximum length exceeded. INDEX_NAME_MAXLEN ResultCode = 205 // Maximum number of indicies exceeded. INDEX_MAXCOUNT ResultCode = 206 // Secondary index query aborted. QUERY_ABORTED ResultCode = 210 // Secondary index queue full. QUERY_QUEUEFULL ResultCode = 211 // Secondary index query timed out on server. QUERY_TIMEOUT ResultCode = 212 // Generic query error. QUERY_GENERIC ResultCode = 213 )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.