Documentation ¶
Index ¶
- Constants
- Variables
- func PassThroughFactory(interface{}) api.HttpFilterFactory
- func RegisterHttpFilterConfigFactory(f api.HttpFilterConfigFactory)
- func RegisterHttpFilterConfigParser(parser api.HttpFilterConfigParser)
- func RegisterStreamingHttpFilterConfigFactory(f api.HttpFilterConfigFactory)
- func SetHttpCAPI(api HttpCAPI)
- type HttpCAPI
Constants ¶
View Source
const (
ValueRouteName = 1
)
Variables ¶
View Source
var ( ErrRequestFinished = "request has been finished" ErrFilterDestroyed = "golang filter has been destroyed" ErrNotInGo = "not proccessing Go" ErrInvalidPhase = "invalid phase, maybe headers/buffer already continued" )
panic error messages when C API return not ok
View Source
var ErrDupRequestKey = errors.New("dup request key")
View Source
var Requests = &requestMap{}
Functions ¶
func PassThroughFactory ¶
func PassThroughFactory(interface{}) api.HttpFilterFactory
func RegisterHttpFilterConfigFactory ¶
func RegisterHttpFilterConfigFactory(f api.HttpFilterConfigFactory)
func RegisterHttpFilterConfigParser ¶
func RegisterHttpFilterConfigParser(parser api.HttpFilterConfigParser)
func RegisterStreamingHttpFilterConfigFactory ¶
func RegisterStreamingHttpFilterConfigFactory(f api.HttpFilterConfigFactory)
streaming and async supported by default
Types ¶
type HttpCAPI ¶
type HttpCAPI interface { HttpContinue(r *httpRequest, status uint64) HttpSendLocalReply(r *httpRequest, responseCode int, bodyText string, headers map[string]string, grpcStatus int64, details string) // experience api, memory unsafe HttpGetHeader(r *httpRequest, key *string, value *string) HttpCopyHeaders(r *httpRequest, num uint64, bytes uint64) map[string][]string HttpSetHeader(r *httpRequest, key *string, value *string, add bool) HttpRemoveHeader(r *httpRequest, key *string) HttpGetBuffer(r *httpRequest, bufferPtr uint64, value *string, length uint64) HttpSetBufferHelper(r *httpRequest, bufferPtr uint64, value string, action api.BufferAction) HttpCopyTrailers(r *httpRequest, num uint64, bytes uint64) map[string][]string HttpSetTrailer(r *httpRequest, key *string, value *string) HttpGetRouteName(r *httpRequest) string HttpGetDynamicMetadata(r *httpRequest, filterName string) map[string]interface{} HttpSetDynamicMetadata(r *httpRequest, filterName string, key string, value interface{}) HttpFinalize(r *httpRequest, reason int) }
declare this interface in http module, since it depends on the httpRequest struct
Source Files ¶
Click to show internal directories.
Click to hide internal directories.