Documentation ¶
Index ¶
- Variables
- func CreateDiscoveryRequest(id string, driver string) *global.DiscoveryRequest
- func CreatePushRequest(id string, r *http.Request) *global.PushRequest
- func CreatePushResponse(id string, statusCode int, endOfStreams bool, h http.Header, body []byte) *global.PushResponse
- type EventTypeProcess
- type Interceptor
- type Listener
- type Method
- type MethodMultipleHandler
- type MultipleHandlerOption
- type OnPushMessage
- type OnPushMessageResponse
- type Options
- type Port
- type RequestContext
- type RequestContextType
- type TLSCerts
- type TcpConnectionInformation
- type TcpHandler
- type TcpHandlerOnDone
- type UseAuthCallback
- type WebSocketHandler
- type WebSocketHandlerOnMsg
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CreateDiscoveryRequest ¶
func CreateDiscoveryRequest(id string, driver string) *global.DiscoveryRequest
func CreatePushRequest ¶
func CreatePushRequest(id string, r *http.Request) *global.PushRequest
func CreatePushResponse ¶
Types ¶
type EventTypeProcess ¶
type EventTypeProcess string
const ( EventTypeProcessSplitter EventTypeProcess = "http.splitter" EventTypeProcessHttpHandler EventTypeProcess = "http.handler" EventTypeProcessHttpController EventTypeProcess = "http.controller" EventTypeProcessGRPCWebController EventTypeProcess = "grpc.web.controller" EventTypeProcessGRPCController EventTypeProcess = "grpc.controller" EventTypeProcessHttpMiddlewareCompress EventTypeProcess = "http.middleware.compress" )
type Interceptor ¶
type Interceptor interface { Handler(http.Handler) http.Handler UnaryServerInterceptor() grpc.UnaryServerInterceptor StreamServerInterceptor() grpc.StreamServerInterceptor }
type Listener ¶
type Listener interface { Init(opt Options, interceptor ...Interceptor) Run() (err error) RunRouter() (err error) RegisterMultipleHandler(MethodMultipleHandler) RegisterHttpHandler(path, method string, handler http.Handler) PushRouterListener(*listener.RouterListener, http.HandlerFunc) PushRouterHProxyListener(l *listener.RouterListener, h http.HandlerFunc) PushRouterTcpListener(*listener.RouterListener, TcpHandler) RemoveRouterListener(name string) error RemoveRouterTcpListener(name string) error SetTracer(tracing.Tracing) UseWebSocket(pa string, onConnected WebSocketHandler, onMsg WebSocketHandlerOnMsg, onDisconnected WebSocketHandler) error GetInterceptor() (interceptor []Interceptor) GetServices() []string GetAllServices() (res []*listener.ServicesItems) GetOptions() Options GetTracer() tracing.Tracing NewMonitor() (mm interface{}) SetMonitor(interface{}) GetMonitor() (mm interface{}) GetMonitorResponse() *listener.MonitorResponse GetLimiter() *limiter.Limiter GetGrpcServer() *grpc.Server GetTLSCerts() TLSCerts }
type MethodMultipleHandler ¶
type MethodMultipleHandler interface{}
type MultipleHandlerOption ¶
type MultipleHandlerOption interface { GetServiceDesc() []*grpc.ServiceDesc AllowMethod(string) []Method }
MultipleHandlerOption -
type OnPushMessage ¶
type OnPushMessage func(data *global.PushRequest, onMsg OnPushMessageResponse)
type OnPushMessageResponse ¶
type OnPushMessageResponse func(*global.PushResponse)
type Options ¶
type Options struct { ServiceName string Listen string Port Port Logger logger.Logger Pem string AutoReloadPemDir bool DisableSecure bool IsRouter bool EnableEncryption bool Database database.Database Discover *listener.Discovery MaxRequest int64 Driver string UseAuthCallback UseAuthCallback ServiceInfo *listener.ServicesInfo DisableMonitor bool }
type RequestContext ¶ added in v0.0.10
type RequestContext struct {
// contains filtered or unexported fields
}
func (*RequestContext) GetQuery ¶ added in v0.0.11
func (c *RequestContext) GetQuery() (val func() url.Values)
func (*RequestContext) GetRequestID ¶ added in v0.0.10
func (c *RequestContext) GetRequestID() (val string)
func (*RequestContext) SetQuery ¶ added in v0.0.11
func (c *RequestContext) SetQuery(val func() url.Values)
func (*RequestContext) SetRequestID ¶ added in v0.0.10
func (c *RequestContext) SetRequestID(val string)
type RequestContextType ¶ added in v0.0.10
type RequestContextType string
const RequestContexWebSocket RequestContextType = "RequestContexWebSocket"
type TcpConnectionInformation ¶ added in v1.1.3
type TcpConnectionInformation struct { Secure bool ClientHello *tls.ClientHelloInfo }
type TcpHandler ¶ added in v1.1.2
type TcpHandler func(conn net.Conn, info *TcpConnectionInformation, onDone TcpHandlerOnDone)
type TcpHandlerOnDone ¶ added in v1.1.3
type TcpHandlerOnDone func()
type UseAuthCallback ¶
type WebSocketHandler ¶ added in v0.0.10
Click to show internal directories.
Click to hide internal directories.