Documentation ¶
Overview ¶
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
GENERATED BY 'T'ransport 'G'enerator. DO NOT EDIT.
Index ¶
- Constants
- Variables
- func ExitOnError(log zerolog.Logger, err error, msg string)
- func NewExampleRPC(svcExampleRPC interfaces.ExampleRPC) (srv *httpExampleRPC)
- func NewUser(svcUser interfaces.User) (srv *httpUser)
- type ErrorHandler
- type ExampleRPCTest
- type ExampleRPCTest2
- type Handler
- type Header
- type HeaderHandler
- type MethodCallMeta
- type MiddlewareExampleRPC
- type MiddlewareExampleRPCTest
- type MiddlewareExampleRPCTest2
- type MiddlewareSetExampleRPC
- type MiddlewareSetUser
- type MiddlewareUser
- type MiddlewareUserCustomHandler
- type MiddlewareUserCustomResponse
- type MiddlewareUserGetUser
- type Option
- func ExampleRPC(svc *httpExampleRPC) Option
- func MaxBatchSize(size int) Option
- func MaxBatchWorkers(size int) Option
- func MaxBodySize(max int) Option
- func ReadTimeout(timeout time.Duration) Option
- func Service(svc ServiceRoute) Option
- func SetFiberCfg(cfg fiber.Config) Option
- func SetReadBufferSize(size int) Option
- func SetWriteBufferSize(size int) Option
- func Use(args ...interface{}) Option
- func User(svc *httpUser) Option
- func WithHeader(headerName string, handler HeaderHandler) Option
- func WithRequestID(headerName string) Option
- func WriteTimeout(timeout time.Duration) Option
- type Server
- func (srv *Server) ExampleRPC() *httpExampleRPC
- func (srv *Server) Fiber() *fiber.App
- func (srv *Server) ServeHealth(address string, response interface{})
- func (srv *Server) ServeMetrics(log zerolog.Logger, path string, address string)
- func (srv *Server) Shutdown()
- func (srv *Server) User() *httpUser
- func (srv *Server) WithLog() *Server
- func (srv *Server) WithMetrics() *Server
- func (srv *Server) WithTrace(ctx context.Context, appName string, endpoint string, ...) *Server
- type ServiceRoute
- type UserCustomHandler
- type UserCustomResponse
- type UserGetUser
Constants ¶
const (
// Version defines the version of the JSON RPC implementation
Version = "2.0"
)
const VersionTg = "v2.3.71"
Variables ¶
var RequestCount *prometheus.CounterVec
var RequestCountAll *prometheus.CounterVec
var RequestLatency *prometheus.HistogramVec
var VersionGauge *prometheus.GaugeVec
Functions ¶
func NewExampleRPC ¶
func NewExampleRPC(svcExampleRPC interfaces.ExampleRPC) (srv *httpExampleRPC)
func NewUser ¶
func NewUser(svcUser interfaces.User) (srv *httpUser)
Types ¶
type ErrorHandler ¶
type ExampleRPCTest ¶
type ExampleRPCTest2 ¶ added in v2.2.3
type HeaderHandler ¶ added in v2.1.4
type MethodCallMeta ¶ added in v2.3.69
type MiddlewareExampleRPC ¶
type MiddlewareExampleRPC func(next interfaces.ExampleRPC) interfaces.ExampleRPC
type MiddlewareExampleRPCTest ¶
type MiddlewareExampleRPCTest func(next ExampleRPCTest) ExampleRPCTest
type MiddlewareExampleRPCTest2 ¶ added in v2.2.3
type MiddlewareExampleRPCTest2 func(next ExampleRPCTest2) ExampleRPCTest2
type MiddlewareSetExampleRPC ¶
type MiddlewareSetExampleRPC interface { Wrap(m MiddlewareExampleRPC) WrapTest(m MiddlewareExampleRPCTest) WrapTest2(m MiddlewareExampleRPCTest2) WithTrace() WithMetrics() WithLog() }
type MiddlewareSetUser ¶
type MiddlewareSetUser interface { Wrap(m MiddlewareUser) WrapGetUser(m MiddlewareUserGetUser) WrapCustomResponse(m MiddlewareUserCustomResponse) WrapCustomHandler(m MiddlewareUserCustomHandler) WithTrace() WithMetrics() WithLog() }
type MiddlewareUser ¶
type MiddlewareUser func(next interfaces.User) interfaces.User
type MiddlewareUserCustomHandler ¶
type MiddlewareUserCustomHandler func(next UserCustomHandler) UserCustomHandler
type MiddlewareUserCustomResponse ¶
type MiddlewareUserCustomResponse func(next UserCustomResponse) UserCustomResponse
type MiddlewareUserGetUser ¶
type MiddlewareUserGetUser func(next UserGetUser) UserGetUser
type Option ¶
type Option func(srv *Server)
func ExampleRPC ¶
func ExampleRPC(svc *httpExampleRPC) Option
func MaxBatchSize ¶ added in v2.3.18
func MaxBatchWorkers ¶ added in v2.3.18
func MaxBodySize ¶
func ReadTimeout ¶
func Service ¶
func Service(svc ServiceRoute) Option
func SetFiberCfg ¶ added in v2.1.4
func SetFiberCfg(cfg fiber.Config) Option
func SetReadBufferSize ¶ added in v2.1.4
func SetWriteBufferSize ¶ added in v2.3.69
func WithHeader ¶ added in v2.1.4
func WithHeader(headerName string, handler HeaderHandler) Option
func WithRequestID ¶ added in v2.1.4
func WriteTimeout ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ExampleRPC ¶
func (srv *Server) ExampleRPC() *httpExampleRPC
func (*Server) ServeHealth ¶
func (*Server) ServeMetrics ¶ added in v2.3.69
func (*Server) WithMetrics ¶
type ServiceRoute ¶
type ServiceRoute interface {
SetRoutes(route *fiber.App)
}
type UserCustomHandler ¶
type UserCustomResponse ¶
Source Files ¶
- context.go
- errors.go
- examplerpc-exchange.go
- examplerpc-http.go
- examplerpc-jsonrpc.go
- examplerpc-logger.go
- examplerpc-metrics.go
- examplerpc-middleware.go
- examplerpc-server.go
- examplerpc-trace.go
- fiber.go
- header.go
- http.go
- jsonrpc.go
- metrics.go
- options.go
- server.go
- user-exchange.go
- user-http.go
- user-logger.go
- user-metrics.go
- user-middleware.go
- user-rest.go
- user-server.go
- user-trace.go
- version.go