socket

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const EOL = "\r\n"
View Source
const ProtoVersion = "1.0"

Variables

View Source
var ErrComplete = errors.New("scroll complete")
View Source
var ErrFatal = errors.New("fatal error")
View Source
var ServerVersion = "Chronalys/1.0"

Functions

func ServeSocket

func ServeSocket(ctx context.Context) (func() error, error)

Types

type ErrorCode

type ErrorCode string
const (
	OK      ErrorCode = "OK"
	Info    ErrorCode = "INFO"
	Warning ErrorCode = "WARN"
	Fatal   ErrorCode = "FATAL"
)

type Execute

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

func ParseExecute

func ParseExecute(cmd commands.Command) (*Execute, error)

func (*Execute) Handle

func (e *Execute) Handle(s *Socket) error

type Prepare

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

func ParsePrepare

func ParsePrepare(query *commands.CommandString) (*Prepare, error)

func (*Prepare) Handle

func (p *Prepare) Handle(s *Socket) error

type Principal

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

func ParsePrincipal

func ParsePrincipal(cmd *commands.CommandString) (principal *Principal, err error)

func (*Principal) Handle

func (p *Principal) Handle(s *Socket) error

type Query

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

func ParseQuery

func ParseQuery(cmd *commands.CommandString) (*Query, error)

func (*Query) Handle

func (q *Query) Handle(s *Socket) (err error)

type Scanner

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

func NewScanner

func NewScanner(reader *bufio.ReadWriter) *Scanner

func (*Scanner) Scan

func (s *Scanner) Scan(ctx context.Context) (chan *commands.CommandString, chan error)

type Scroll

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

func ParseScroll

func ParseScroll(cmd *commands.CommandString) (scroll *Scroll, err error)

func (*Scroll) Handle

func (c *Scroll) Handle(s *Socket) error

type Socket

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

func (*Socket) Cleanup

func (s *Socket) Cleanup()

func (*Socket) HandleConnection

func (s *Socket) HandleConnection(conn net.Conn, ctx context.Context)

func (*Socket) PerformFinalize

func (s *Socket) PerformFinalize(cmd *commands.CommandString) (err error)

Jump to

Keyboard shortcuts

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