Documentation ¶
Index ¶
- Constants
- func ServeConnHandlerCommonGetTextTemplatesFuncMap(c *ttconn.Connection) (map[string]interface{}, error)
- func SimpleTextServeConnHandlerCustomProcess(h SimpleTextServeConnHandler, conn *ttconn.Connection, route string, ...) (output interface{}, err error)
- func SimpleTextServeConnHandlerDefaultGetTemplatesFuncMap(conn *ttconn.Connection) (tplFunc map[string]interface{}, err error)
- func SimpleTextServeConnHandlerDefaultParseData(conn *ttconn.Connection, inbuf []byte) (route string, extraData interface{}, err error)
- func SimpleTextServeConnHandlerDefaultProcess(conn *ttconn.Connection, route string, routeExtraData interface{}, ...) (output interface{}, err error)
- func SimpleTextServeConnHandlerDefaultRead(conn *ttconn.Connection) (input []byte, err error)
- func SimpleTextServeConnHandlerDefaultRegisterMetrics() error
- func SimpleTextServeConnHandlerDefaultServeConn(h SimpleTextServeConnHandler, conn *ttconn.Connection) error
- func SimpleTextServeConnHandlerDefaultServeCrontab(h SimpleTextServeConnHandler, conn *ttconn.Connection, route string, ...) error
- func SimpleTextServeConnHandlerDefaultWrite(conn *ttconn.Connection, output interface{}) (n int64, err error)
- type IServeConnHandler
- type SimpleTextServeConnHandler
Constants ¶
View Source
const ( CRLF = "\r\n" TAB = byte('\t') )
Variables ¶
This section is empty.
Functions ¶
func ServeConnHandlerCommonGetTextTemplatesFuncMap ¶
func ServeConnHandlerCommonGetTextTemplatesFuncMap(c *ttconn.Connection) (map[string]interface{}, error)
func SimpleTextServeConnHandlerCustomProcess ¶
func SimpleTextServeConnHandlerCustomProcess( h SimpleTextServeConnHandler, conn *ttconn.Connection, route string, extraData interface{}, forceCacheUpdate bool, errCodeMap map[string][]byte) (output interface{}, err error)
func SimpleTextServeConnHandlerDefaultGetTemplatesFuncMap ¶
func SimpleTextServeConnHandlerDefaultGetTemplatesFuncMap(conn *ttconn.Connection) (tplFunc map[string]interface{}, err error)
func SimpleTextServeConnHandlerDefaultParseData ¶
func SimpleTextServeConnHandlerDefaultParseData(conn *ttconn.Connection, inbuf []byte) (route string, extraData interface{}, err error)
func SimpleTextServeConnHandlerDefaultProcess ¶
func SimpleTextServeConnHandlerDefaultProcess(conn *ttconn.Connection, route string, routeExtraData interface{}, forceCacheUpdate bool) (output interface{}, err error)
func SimpleTextServeConnHandlerDefaultRead ¶
func SimpleTextServeConnHandlerDefaultRead(conn *ttconn.Connection) (input []byte, err error)
func SimpleTextServeConnHandlerDefaultRegisterMetrics ¶
func SimpleTextServeConnHandlerDefaultRegisterMetrics() error
func SimpleTextServeConnHandlerDefaultServeConn ¶
func SimpleTextServeConnHandlerDefaultServeConn(h SimpleTextServeConnHandler, conn *ttconn.Connection) error
func SimpleTextServeConnHandlerDefaultServeCrontab ¶
func SimpleTextServeConnHandlerDefaultServeCrontab(h SimpleTextServeConnHandler, conn *ttconn.Connection, route string, routeExtraData interface{}) error
func SimpleTextServeConnHandlerDefaultWrite ¶
func SimpleTextServeConnHandlerDefaultWrite(conn *ttconn.Connection, output interface{}) (n int64, err error)
Types ¶
type IServeConnHandler ¶
type IServeConnHandler interface { // what to do with a new connection ServeConn(conn *ttconn.Connection) error // what to do with a new connection from the cron server ServeCrontab(conn *ttconn.Connection, route string, routeExtraData interface{}) error // retrieve a specifiv template functions map GetTemplatesFuncMap(conn *ttconn.Connection) (tplFunc map[string]interface{}, err error) // register new specific metrics RegisterPrometheusMetrics() error }
type SimpleTextServeConnHandler ¶
type SimpleTextServeConnHandler interface { // inherited from IServeConnHandler ServeConn(conn *ttconn.Connection) error ServeCrontab(conn *ttconn.Connection, route string, routeExtraData interface{}) error GetTemplatesFuncMap(conn *ttconn.Connection) (tplFunc map[string]interface{}, err error) RegisterPrometheusMetrics() error // specific Read(conn *ttconn.Connection) (input []byte, err error) ParseData(conn *ttconn.Connection, input []byte) (route string, routeExtraData interface{}, err error) Process(conn *ttconn.Connection, route string, routeExtraData interface{}, forceCacheUpdate bool) (output interface{}, err error) PostProcess(conn *ttconn.Connection, route string, routeExtraData interface{}, input interface{}) (output interface{}, err error) Write(conn *ttconn.Connection, output interface{}) (n int64, err error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.