handler

package
v0.0.0-...-26c4821 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WritePkgTimeout          = 1e9
	StatusContinue           = 100
	StatusSuccess            = 200
	StatusFound              = 302
	StatusBadRequest         = 400
	StatusUnauthorized       = 401
	StatusNotFound           = 404
	StatusNotAllowed         = 405
	StatusFail               = 500
	StatusServiceUnavailable = 503
	StatusGatewayTimeout     = 504
)
View Source
const (
	EventHeartbeat uint16 = iota + 10000
	EventEcho
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultEventHandler

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

func NewDefaultEventHandler

func NewDefaultEventHandler(log getty.Logger) *DefaultEventHandler

func (*DefaultEventHandler) HandleRequest

func (h *DefaultEventHandler) HandleRequest(session getty.Session, req *model.Request) error

func (*DefaultEventHandler) HandleResponse

func (h *DefaultEventHandler) HandleResponse(session getty.Session, resp *model.Response) error

type EventHandler

type EventHandler interface {
	HandleRequest(getty.Session, *model.Request) error
	HandleResponse(getty.Session, *model.Response) error
}

Jump to

Keyboard shortcuts

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