cassandra

package
v0.0.0-...-e374b61 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CASS_ERROR_SOURCE_NONE = iota
	CASS_ERROR_SOURCE_LIB
	CASS_ERROR_SOURCE_SERVER
	CASS_ERROR_SOURCE_SSL
	CASS_ERROR_SOURCE_COMPRESSION
)
View Source
const (
	CASS_ERROR_LIB_BAD_PARAMS = iota
	CASS_ERROR_LIB_NO_STREAMS
	CASS_ERROR_LIB_UNABLE_TO_INIT
	CASS_ERROR_LIB_MESSAGE_ENCODE
	CASS_ERROR_LIB_HOST_RESOLUTION
	CASS_ERROR_LIB_UNEXPECTED_RESPONSE
	CASS_ERROR_LIB_REQUEST_QUEUE_FULL
	CASS_ERROR_LIB_NO_AVAILABLE_IO_THREAD
	CASS_ERROR_LIB_WRITE_ERROR
	CASS_ERROR_LIB_NO_HOSTS_AVAILABLE
	CASS_ERROR_LIB_INDEX_OUT_OF_BOUNDS
	CASS_ERROR_LIB_INVALID_ITEM_COUNT
	CASS_ERROR_LIB_INVALID_VALUE_TYPE
	CASS_ERROR_LIB_REQUEST_TIMED_OUT
	CASS_ERROR_LIB_UNABLE_TO_SET_KEYSPACE
	CASS_ERROR_LIB_CALLBACK_ALREADY_SET
	CASS_ERROR_LIB_INVALID_STATEMENT_TYPE
	CASS_ERROR_LIB_NAME_DOES_NOT_EXIST
	CASS_ERROR_LIB_UNABLE_TO_DETERMINE_PROTOCOL
	CASS_ERROR_LIB_NULL_VALUE
	CASS_ERROR_LIB_NOT_IMPLEMENTED
	CASS_ERROR_LIB_UNABLE_TO_CONNECT
	CASS_ERROR_LIB_UNABLE_TO_CLOSE
	CASS_ERROR_SERVER_SERVER_ERROR
	CASS_ERROR_SERVER_PROTOCOL_ERROR
	CASS_ERROR_SERVER_BAD_CREDENTIALS
	CASS_ERROR_SERVER_UNAVAILABLE
	CASS_ERROR_SERVER_OVERLOADED
	CASS_ERROR_SERVER_IS_BOOTSTRAPPING
	CASS_ERROR_SERVER_TRUNCATE_ERROR
	CASS_ERROR_SERVER_WRITE_TIMEOUT
	CASS_ERROR_SERVER_READ_TIMEOUT
	CASS_ERROR_SERVER_SYNTAX_ERROR
	CASS_ERROR_SERVER_UNAUTHORIZED
	CASS_ERROR_SERVER_INVALID_QUERY
	CASS_ERROR_SERVER_CONFIG_ERROR
	CASS_ERROR_SERVER_ALREADY_EXISTS
	CASS_ERROR_SERVER_UNPREPARED
	CASS_ERROR_SSL_INVALID_CERT
	CASS_ERROR_SSL_INVALID_PRIVATE_KEY
	CASS_ERROR_SSL_NO_PEER_CERT
	CASS_ERROR_SSL_INVALID_PEER_CERT
	CASS_ERROR_SSL_IDENTITY_MISMATCH
)
View Source
const (
	CASS_VALUE_TYPE_UNKNOWN   = 0xFFFF
	CASS_VALUE_TYPE_CUSTOM    = 0x0000
	CASS_VALUE_TYPE_ASCII     = 0x0001
	CASS_VALUE_TYPE_BIGINT    = 0x0002
	CASS_VALUE_TYPE_BLOB      = 0x0003
	CASS_VALUE_TYPE_BOOLEAN   = 0x0004
	CASS_VALUE_TYPE_COUNTER   = 0x0005
	CASS_VALUE_TYPE_DECIMAL   = 0x0006
	CASS_VALUE_TYPE_DOUBLE    = 0x0007
	CASS_VALUE_TYPE_FLOAT     = 0x0008
	CASS_VALUE_TYPE_INT       = 0x0009
	CASS_VALUE_TYPE_TEXT      = 0x000A
	CASS_VALUE_TYPE_TIMESTAMP = 0x000B
	CASS_VALUE_TYPE_UUID      = 0x000C
	CASS_VALUE_TYPE_VARCHAR   = 0x000D
	CASS_VALUE_TYPE_VARINT    = 0x000E
	CASS_VALUE_TYPE_TIMEUUID  = 0x000F
	CASS_VALUE_TYPE_INET      = 0x0010
	CASS_VALUE_TYPE_LIST      = 0x0020
	CASS_VALUE_TYPE_MAP       = 0x0021
	CASS_VALUE_TYPE_SET       = 0x0022
)
View Source
const (
	CASS_LOG_DISABLED = iota
	CASS_LOG_CRITICAL
	CASS_LOG_ERROR
	CASS_LOG_WARN
	CASS_LOG_INFO
	CASS_LOG_DEBUG
	CASS_LOG_TRACE
)
View Source
const (
	CASS_OK = 0
)

Variables

This section is empty.

Functions

func SetLogLevel

func SetLogLevel(level int32)

Types

type Cluster

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

func NewCluster

func NewCluster() *Cluster

func (*Cluster) Finalize

func (cluster *Cluster) Finalize()

func (*Cluster) SessionConnect

func (cluster *Cluster) SessionConnect(session *Session) *Future

func (*Cluster) SetContactPoints

func (cluster *Cluster) SetContactPoints(contactPoints string)

func (*Cluster) SetCoreConnectionsPerHost

func (cluster *Cluster) SetCoreConnectionsPerHost(size uint)

func (*Cluster) SetMaxConnectionsPerHost

func (cluster *Cluster) SetMaxConnectionsPerHost(size uint)

func (*Cluster) SetNumThreadsIo

func (cluster *Cluster) SetNumThreadsIo(size uint)

func (*Cluster) SetPendingRequestsHighWaterMark

func (cluster *Cluster) SetPendingRequestsHighWaterMark(size uint)

func (*Cluster) SetPendingRequestsLowWaterMark

func (cluster *Cluster) SetPendingRequestsLowWaterMark(size uint)

func (*Cluster) SetPort

func (cluster *Cluster) SetPort(port int64)

func (*Cluster) SetQueueSizeIo

func (cluster *Cluster) SetQueueSizeIo(size uint)

type Future

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

func (*Future) ErrorCode

func (future *Future) ErrorCode() int

func (*Future) ErrorMessage

func (future *Future) ErrorMessage() string

func (*Future) ErrorSource

func (future *Future) ErrorSource() int

func (*Future) Finalize

func (future *Future) Finalize()

func (*Future) Prepared

func (future *Future) Prepared() *Prepared

func (*Future) Ready

func (future *Future) Ready() bool

func (*Future) Result

func (future *Future) Result() *Result

func (*Future) Wait

func (future *Future) Wait()

func (*Future) WaitTimed

func (future *Future) WaitTimed(timeout uint64) bool

type Metrics

type Metrics struct {
	Requests struct {
		Min               int64
		Max               int64
		Mean              int64
		Stddev            int64
		Median            int64
		Percentile75th    int64
		Percentile95th    int64
		Percentile98th    int64
		Percentile99th    int64
		Percentile999th   int64
		MeanRate          float64
		OneMinuteRate     float64
		FiveMinuteRate    float64
		FifteenMinuteRate float64
	}

	Stats struct {
		TotalConnections                 int64
		AvailableConnections             int64
		ExceededPendingRequestsWaterMark int64
		ExceededWriteBytesWaterMark      int64
	}

	Errors struct {
		ConnectionTimeouts     int64
		PendingRequestTimeouts int64
		RequestTimeouts        int64
	}
}

type Prepared

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

func (*Prepared) Bind

func (prepared *Prepared) Bind() *Statement

func (*Prepared) Finalize

func (prepared *Prepared) Finalize()

type Result

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

func (*Result) ColumnCount

func (result *Result) ColumnCount() uint64

func (*Result) ColumnType

func (result *Result) ColumnType(index uint64) int

func (*Result) Finalize

func (result *Result) Finalize()

func (*Result) HasMorePages

func (result *Result) HasMorePages() bool

func (*Result) Next

func (result *Result) Next() bool

func (*Result) RowCount

func (result *Result) RowCount() uint64

func (*Result) Scan

func (result *Result) Scan(args ...interface{}) error

type Session

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

func NewSession

func NewSession() *Session

func (*Session) Execute

func (session *Session) Execute(statement *Statement) *Future

func (*Session) Finalize

func (session *Session) Finalize()

func (*Session) Metrics

func (session *Session) Metrics() Metrics

func (*Session) Prepare

func (session *Session) Prepare(statement string) *Future

type Statement

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

func NewStatement

func NewStatement(query string, param_count int) *Statement

func (*Statement) Bind

func (statement *Statement) Bind(args ...interface{}) error

func (*Statement) Finalize

func (statement *Statement) Finalize()

type Uuid

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

type UuidGenerator

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

func NewUuidGenerator

func NewUuidGenerator() *UuidGenerator

func NewUuidGeneratorWithNode

func NewUuidGeneratorWithNode(node uint64) *UuidGenerator

func (*UuidGenerator) Finalize

func (generator *UuidGenerator) Finalize()

func (*UuidGenerator) FromTime

func (generator *UuidGenerator) FromTime(timestamp uint64) Uuid

func (*UuidGenerator) GenRandom

func (generator *UuidGenerator) GenRandom() Uuid

func (*UuidGenerator) GenTime

func (generator *UuidGenerator) GenTime() Uuid

Jump to

Keyboard shortcuts

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