spop

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: Apache-2.0 Imports: 14 Imported by: 2

README

Documentation

Index

Constants

View Source
const (
	ErrorNone errorCode = iota
	ErrorIO
	ErrorTimeout
	ErrorTooBig
	ErrorInvalid
	ErrorNoVSN
	ErrorNoFrameSize
	ErrorNoCap
	ErrorBadVsn
	ErrorBadFrameSize
	ErrorFragNotSupported
	ErrorInterlacedFrames
	ErrorFrameIDNotfound
	ErrorRes
	ErrorUnknown errorCode = 99
)

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(addr string, handler Handler) error

Types

type AckFrame

type AckFrame struct {
	ActionWriterCallback func(*encoding.ActionWriter) error
	FrameID              uint64
	StreamID             uint64
}

func (*AckFrame) WriteTo

func (a *AckFrame) WriteTo(w io.Writer) (int64, error)

type Agent

type Agent struct {
	Handler     Handler
	BaseContext context.Context
	Addr        string
}

func (*Agent) ListenAndServe

func (a *Agent) ListenAndServe() error

func (*Agent) Serve

func (a *Agent) Serve(l net.Listener) error

type AgentDisconnectFrame

type AgentDisconnectFrame struct {
	ErrCode errorCode
}

func (*AgentDisconnectFrame) WriteTo

func (a *AgentDisconnectFrame) WriteTo(w io.Writer) (int64, error)

type AgentHelloFrame

type AgentHelloFrame struct {
	Version      string
	Capabilities []string
	MaxFrameSize uint32
}

func (*AgentHelloFrame) WriteTo

func (a *AgentHelloFrame) WriteTo(w io.Writer) (int64, error)

type Handler

type Handler interface {
	HandleSPOE(context.Context, *encoding.ActionWriter, *encoding.Message)
}

type HandlerFunc

type HandlerFunc func(context.Context, *encoding.ActionWriter, *encoding.Message)

func (HandlerFunc) HandleSPOE

func (h HandlerFunc) HandleSPOE(ctx context.Context, w *encoding.ActionWriter, m *encoding.Message)

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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