Documentation ¶
Index ¶
- Variables
- func BuildPiggyback(response *worker.ObjectResponse)
- func DataHandler(w resp.ResponseWriter, c *resp.Command)
- func DelHandler(w resp.ResponseWriter, c *resp.Command)
- func GetDefaultExtension(session *lambdaLife.Session) time.Duration
- func GetHandler(w resp.ResponseWriter, c *resp.Command)
- func MHelloHandler(w resp.ResponseWriter, c *resp.Command)
- func MigrateHandler(w resp.ResponseWriter, c *resp.Command)
- func RecoverHandler(w resp.ResponseWriter, c *resp.Command)
- func SetHandler(w resp.ResponseWriter, c *resp.CommandStream)
- func TestHandler(w resp.ResponseWriter, c *resp.Command)
- type PongError
- type PongHandler
- type ResponseError
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 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 (*PongHandler) SendToLink ¶
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
Click to show internal directories.
Click to hide internal directories.