Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GinEndpoint = func(c *gin.Context, handler gin.HandlerFunc) endpoint.Endpoint { return func(ctx context.Context, request interface{}) (interface{}, error) { handler(c) return nil, nil } }
View Source
var NilDecoder = func(c context.Context, rw http.ResponseWriter, i interface{}) error { return nil }
Functions ¶
func InstallAdapter ¶
func InstallAdapter(handler gin.HandlerFunc, adapters ...IGoKitAdapter) gin.HandlerFunc
Types ¶
type GoKitAdapter ¶
type GoKitAdapter struct{}
type IGoKitAdapter ¶
type IGoKitAdapter interface { AdapterInit(args map[string]interface{}) error // 初始化 Middleware() endpoint.Middleware // gokit的中间件,配置监控、限流等功能 // GinMiddleware() gin.HandlerFunc // 使用于gin的中间件 HandlerFunc(gin.HandlerFunc) gin.HandlerFunc // 用于包装gin的handlerfunc }
Click to show internal directories.
Click to hide internal directories.