handlers

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultPongTimeout = 50 * time.Millisecond
	DefaultAttempts    = 0 // Disable retrial for backend link intergrated retrial and reconnection.
	NoTimeout          = false

	Pong = NewPongHandler()
)

Functions

func BuildPiggyback

func BuildPiggyback(response *worker.ObjectResponse)

func DataHandler

func DataHandler(w resp.ResponseWriter, c *resp.Command)

func DelHandler

func DelHandler(w resp.ResponseWriter, c *resp.Command)

func GetDefaultExtension

func GetDefaultExtension(session *lambdaLife.Session) time.Duration

func GetHandler

func GetHandler(w resp.ResponseWriter, c *resp.Command)

func MHelloHandler

func MHelloHandler(w resp.ResponseWriter, c *resp.Command)

func MigrateHandler

func MigrateHandler(w resp.ResponseWriter, c *resp.Command)

func RecoverHandler

func RecoverHandler(w resp.ResponseWriter, c *resp.Command)

func SetHandler

func SetHandler(w resp.ResponseWriter, c *resp.CommandStream)

func TestHandler

func TestHandler(w resp.ResponseWriter, c *resp.Command)

Types

type PongError

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

func (*PongError) Flags

func (e *PongError) Flags() int64

type PongHandler

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

func NewPongHandler

func NewPongHandler() *PongHandler

func (*PongHandler) Cancel

func (p *PongHandler) Cancel()

Cancel Flag expected request is received and cancel pong retrial.

func (*PongHandler) IsCancelled

func (p *PongHandler) IsCancelled() bool

IsCancelled If the expected request has been received and pong has benn canceled.

func (*PongHandler) Issue

func (p *PongHandler) Issue(retry bool) bool

func (*PongHandler) Send

func (p *PongHandler) Send() error

Send Send ack(pong) on control link, must call Issue(bool) first. Pong will keep retrying until maximum attempts reaches or is canceled.

func (p *PongHandler) SendToLink(link *worker.Link, flags int64) error

Send Send heartbeat on specified link.

func (*PongHandler) SendWithFlags

func (p *PongHandler) SendWithFlags(flags int64, paylaod []byte) error

Send Send ack(pong) with flags on control link, must call Issue(bool) first. Pong will keep retrying until maximum attempts reaches or is canceled.

type ResponseError

type ResponseError struct {
	StatusCode int
	// contains filtered or unexported fields
}

func NewResponseError

func NewResponseError(status int, msg interface{}, args ...interface{}) *ResponseError

func (*ResponseError) Status

func (e *ResponseError) Status() string

Jump to

Keyboard shortcuts

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