protocol

package
v1.2.3-fred.7 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	net.Conn
	// contains filtered or unexported fields
}

Conn represent incoming client connection or ongoing connection to cassandra server. Reading and Writing Frames/Packages needs to be done sequential because Conn implementation is not thread safe. Conn package is used to intercept and preform custom Cassandra handshake and in case of connection incoming connection to provide ability to audit incoming client packages.

func NewConn

func NewConn(rawConn net.Conn) *Conn

NewConn is used to create a new connection.

func (*Conn) ReadPacket

func (c *Conn) ReadPacket() (*Packet, error)

ReadPacket is used to read packet from the connection.

func (*Conn) WriteFrame

func (c *Conn) WriteFrame(outgoing *frame.Frame) error

WriteFrame is used to write frame to the connection.

type Packet

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

Packet represent cassandra packet frame with raw unparsed packet payload.

func (*Packet) Frame

func (p *Packet) Frame() *frame.Frame

Frame returns frame.

func (*Packet) FrameBody

func (p *Packet) FrameBody() *frame.Body

FrameBody returns frame body.

func (*Packet) Header

func (p *Packet) Header() *frame.Header

Header returns frame header.

func (*Packet) Raw

func (p *Packet) Raw() []byte

Raw returns raw packet payload.

Jump to

Keyboard shortcuts

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