Documentation ¶
Index ¶
- Variables
- type CertStorage
- type DefaultError
- type Encryption
- type EndToEndOption
- type EventTypeProcess
- type Interceptor
- type KeyStorage
- type Limiter
- type Listener
- type Method
- type MethodMultipleHandler
- type MultipleHandlerOption
- type Option
- type Options
- type Port
- type RequestContext
- func (c *RequestContext) GetData() (val interface{})
- func (c *RequestContext) GetQuery() (val func() url.Values)
- func (c *RequestContext) GetRequestID() (val string)
- func (c *RequestContext) GetUserData() (val interface{})
- func (c *RequestContext) GetUserId() string
- func (c *RequestContext) SetData(val interface{})
- func (c *RequestContext) SetQuery(val func() url.Values)
- func (c *RequestContext) SetRequestID(val string)
- func (c *RequestContext) SetUserData(val interface{})
- func (c *RequestContext) SetUserId(val string)
- type RequestContextType
- type SocketRequestContext
- type TLSCerts
- type TcpConnectionInformation
- type TcpHandler
- type TcpHandlerOnDone
- type UseAuthCallback
- type WebSocketHandler
- type WebSocketHandlerOnMsg
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CertStorage ¶
type DefaultError ¶
type DefaultError struct { Error bool `json:"error"` Message interface{} `json:"message"` }
type Encryption ¶
type EndToEndOption ¶
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 { Name() string Handler(http.Handler) http.Handler UnaryServerInterceptor() grpc.UnaryServerInterceptor StreamServerInterceptor() grpc.StreamServerInterceptor }
func SortInterceptor ¶
func SortInterceptor(req []Interceptor) []Interceptor
type KeyStorage ¶
type Listener ¶
type Listener interface { Init(opt Options, interceptor ...Interceptor) Listener //InitProcess - Without starting listener InitProcess(opt Options, interceptor ...Interceptor) Run() (err error) Close() RegisterMultipleHandler(MethodMultipleHandler) RegisterHttpHandler(path, method string, handler http.Handler) RegisterHttpPrefixHandler(path, method string, handler http.Handler) SetTracer(tracing.Tracing) UseWebSocket(pa string, onConnected WebSocketHandler, onMsg WebSocketHandlerOnMsg, onDisconnected WebSocketHandler) error GetInterceptor() (interceptor []Interceptor) GetServices() []string GetAllServices() (res []*proto.ServicesItems) GetOptions() Options GetTracer() tracing.Tracing NewMonitor() (mm interface{}) SetMonitor(interface{}) GetMonitor() (mm interface{}) GetMonitorResponse() *proto.MonitorResponse GetLimiter() *limiter.Limiter GetGrpcServer() *grpc.Server GetTLSCerts() TLSCerts GlobalContext() context.Context UseGrpcEncryption(codec encoding.Codec) UseEndToEndEncryption(opts EndToEndOption) Listener }
type MethodMultipleHandler ¶
type MethodMultipleHandler interface{}
type MultipleHandlerOption ¶
type MultipleHandlerOption interface { GetServiceDesc() []*grpc.ServiceDesc AllowMethod(string) []Method }
MultipleHandlerOption -
type Options ¶
type Options struct { ServiceName string Listen string Port Port Logger logger.Logger Pem string Vault *proto.Vault AutoReloadPemDir bool DisableSecure bool EnableEncryption bool Driver string UseAuthCallback UseAuthCallback ServiceInfo *proto.ServicesInfo DisableMonitor bool Limiter Limiter TraceLog tracingInterface.DefaultLogSpanSave }
type RequestContext ¶
type RequestContext struct {
// contains filtered or unexported fields
}
func (*RequestContext) GetData ¶ added in v1.0.1003
func (c *RequestContext) GetData() (val interface{})
func (*RequestContext) GetQuery ¶
func (c *RequestContext) GetQuery() (val func() url.Values)
func (*RequestContext) GetRequestID ¶
func (c *RequestContext) GetRequestID() (val string)
func (*RequestContext) GetUserData ¶
func (c *RequestContext) GetUserData() (val interface{})
func (*RequestContext) GetUserId ¶
func (c *RequestContext) GetUserId() string
func (*RequestContext) SetData ¶ added in v1.0.1003
func (c *RequestContext) SetData(val interface{})
func (*RequestContext) SetQuery ¶
func (c *RequestContext) SetQuery(val func() url.Values)
func (*RequestContext) SetRequestID ¶
func (c *RequestContext) SetRequestID(val string)
func (*RequestContext) SetUserData ¶
func (c *RequestContext) SetUserData(val interface{})
func (*RequestContext) SetUserId ¶
func (c *RequestContext) SetUserId(val string)
type RequestContextType ¶
type RequestContextType string
const ListenerRequestContext RequestContextType = "ListenerRequestContext"
const RequestContextWebSocket RequestContextType = "RequestContextWebSocket"
type SocketRequestContext ¶ added in v1.0.1003
type SocketRequestContext struct {
// contains filtered or unexported fields
}
func (*SocketRequestContext) GetRequest ¶ added in v1.0.1003
func (c *SocketRequestContext) GetRequest() (val *http.Request)
func (*SocketRequestContext) GetRequestID ¶ added in v1.0.1003
func (c *SocketRequestContext) GetRequestID() (val string)
func (*SocketRequestContext) SetRequest ¶ added in v1.0.1003
func (c *SocketRequestContext) SetRequest(val *http.Request)
func (*SocketRequestContext) SetRequestID ¶ added in v1.0.1003
func (c *SocketRequestContext) SetRequestID(val string)
type TcpConnectionInformation ¶
type TcpConnectionInformation struct { Secure bool ClientHello *tls.ClientHelloInfo }
type TcpHandler ¶
type TcpHandler func(conn net.Conn, info *TcpConnectionInformation, onDone TcpHandlerOnDone)
type TcpHandlerOnDone ¶
type TcpHandlerOnDone func()
type UseAuthCallback ¶
Click to show internal directories.
Click to hide internal directories.