sqp

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrChallengeMalformed  = errors.New("challenge malformed")
	ErrChallengeMismatch   = errors.New("challenge mismatch")
	ErrInvalidPacketLength = errors.New("invalid packet length")
	ErrNoChallenge         = errors.New("no challenge")
	ErrUnsupportedQuery    = errors.New("unsupported query")
)

Functions

func NewUnsupportedSQPVersionError

func NewUnsupportedSQPVersionError(version int8) error

NewUnsupportedSQPVersionError returns a new instance of UnsupportedSQPVersionError.

Types

type QueryResponder

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

QueryResponder represents a responder capable of responding to SQP-formatted queries.

func NewQueryResponder

func NewQueryResponder(state *proto.QueryState) (*QueryResponder, error)

NewQueryResponder returns creates a new responder capable of responding to SQP-formatted queries.

func (*QueryResponder) Respond

func (q *QueryResponder) Respond(clientAddress string, buf []byte) ([]byte, error)

Respond writes a query response to the requester in the SQP wire protocol.

type UnsupportedSQPVersionError

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

UnsupportedSQPVersionError is an error which represents an invalid SQP version provided to the reader.

func (*UnsupportedSQPVersionError) Error

Error returns the error string.

Jump to

Keyboard shortcuts

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