response

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ScyllaShard             = "SCYLLA_SHARD"
	ScyllaNrShards          = "SCYLLA_NR_SHARDS"
	ScyllaPartitioner       = "SCYLLA_PARTITIONER"
	ScyllaShardingAlgorithm = "SCYLLA_SHARDING_ALGORITHM"
	ScyllaShardingIgnoreMSB = "SCYLLA_SHARDING_IGNORE_MSB"
	ScyllaShardAwarePort    = "SCYLLA_SHARD_AWARE_PORT"
	ScyllaShardAwarePortSSL = "SCYLLA_SHARD_AWARE_PORT_SSL"
)

Variables

This section is empty.

Functions

func ParseEvent

func ParseEvent(b *frame.Buffer) frame.Response

func ParseResult

func ParseResult(b *frame.Buffer) frame.Response

Types

type CodedError

type CodedError interface {
	error
	ErrorCode() frame.ErrorCode
}

func ParseError

func ParseError(b *frame.Buffer) CodedError

type ReadFailureError

type ReadFailureError struct {
	ScyllaError
	Consistency frame.Consistency
	Received    frame.Int
	BlockFor    frame.Int
	NumFailures frame.Int
	DataPresent bool
}

ReadFailureError spec: https://github.com/apache/cassandra/blob/adcff3f630c0d07d1ba33bf23fcb11a6db1b9af1/doc/native_protocol_v4.spec#L1125

func ParseReadFailureError

func ParseReadFailureError(b *frame.Buffer, err ScyllaError) ReadFailureError

type ReadTimeoutError

type ReadTimeoutError struct {
	ScyllaError
	Consistency frame.Consistency
	Received    frame.Int
	BlockFor    frame.Int
	DataPresent bool
}

ReadTimeoutError spec: https://github.com/apache/cassandra/blob/adcff3f630c0d07d1ba33bf23fcb11a6db1b9af1/doc/native_protocol_v4.spec#L1108

func ParseReadTimeoutError

func ParseReadTimeoutError(b *frame.Buffer, err ScyllaError) ReadTimeoutError

type ResultKind

type ResultKind = frame.Int
const (
	VoidKind         ResultKind = 1
	RowsKind         ResultKind = 2
	SetKeySpaceKind  ResultKind = 3
	PreparedKind     ResultKind = 4
	SchemaChangeKind ResultKind = 5
)

type ScyllaError

type ScyllaError struct {
	Code    frame.ErrorCode
	Message string
}

ScyllaError is embedded in all error frames. ScyllaError spec: https://github.com/apache/cassandra/blob/adcff3f630c0d07d1ba33bf23fcb11a6db1b9af1/doc/native_protocol_v4.spec#L1046

func ParseScyllaError

func ParseScyllaError(b *frame.Buffer) ScyllaError

func (ScyllaError) Error

func (e ScyllaError) Error() string

func (ScyllaError) ErrorCode

func (e ScyllaError) ErrorCode() frame.ErrorCode

func (ScyllaError) String

func (e ScyllaError) String() string

type ScyllaSupported

type ScyllaSupported struct {
	Shard             uint16
	NrShards          uint16
	MsbIgnore         uint8
	Partitioner       string
	ShardingAlgorithm string
	ShardAwarePort    uint16
	ShardAwarePortSSL uint16
	LwtFlagMask       int
}

ScyllaSupported represents Scylla connection options as sent in SUPPORTED https://github.com/kulezi/scylla/blob/4bfcead2ba60072c720241cce6f42f620930c380/docs/dev/protocol-extensions.md#intranode-sharding

type WriteFailureError

type WriteFailureError struct {
	ScyllaError
	Consistency frame.Consistency
	Received    frame.Int
	BlockFor    frame.Int
	NumFailures frame.Int
	WriteType   frame.WriteType
}

WriteFailureError spec: https://github.com/apache/cassandra/blob/adcff3f630c0d07d1ba33bf23fcb11a6db1b9af1/doc/native_protocol_v4.spec#L1147

func ParseWriteFailureError

func ParseWriteFailureError(b *frame.Buffer, err ScyllaError) WriteFailureError

Jump to

Keyboard shortcuts

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