transport

package
v2.3.74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 27 Imported by: 0

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

View Source
const (

	// Version defines the version of the JSON RPC implementation
	Version = "2.0"
)
View Source
const VersionTg = "v2.3.71"

Variables

View Source
var RequestCount *prometheus.CounterVec
View Source
var RequestCountAll *prometheus.CounterVec
View Source
var RequestLatency *prometheus.HistogramVec
View Source
var VersionGauge *prometheus.GaugeVec

Functions

func ExitOnError

func ExitOnError(log zerolog.Logger, err error, msg string)

func NewExampleRPC

func NewExampleRPC(svcExampleRPC interfaces.ExampleRPC) (srv *httpExampleRPC)

func NewUser

func NewUser(svcUser interfaces.User) (srv *httpUser)

Types

type ErrorHandler

type ErrorHandler func(err error) error

type ExampleRPCTest

type ExampleRPCTest func(ctx context.Context, arg0 int, arg1 string, opts ...interface{}) (ret1 int, ret2 string, err error)

type ExampleRPCTest2 added in v2.2.3

type ExampleRPCTest2 func(ctx context.Context, arg0 int, arg1 string, opts ...interface{}) (ret1 int, ret2 string, err error)

type Handler

type Handler = fiber.Handler
type Header struct {
	SpanKey       string
	SpanValue     interface{}
	RequestKey    string
	RequestValue  interface{}
	ResponseKey   string
	ResponseValue interface{}
	LogKey        string
	LogValue      interface{}
}

type HeaderHandler added in v2.1.4

type HeaderHandler func(value string) Header

type MethodCallMeta added in v2.3.69

type MethodCallMeta struct {
	Service  string
	Method   string
	Request  any
	Response any
	Err      error
}

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 MaxBatchSize(size int) Option

func MaxBatchWorkers added in v2.3.18

func MaxBatchWorkers(size int) Option

func MaxBodySize

func MaxBodySize(max int) Option

func ReadTimeout

func ReadTimeout(timeout time.Duration) Option

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 SetReadBufferSize(size int) Option

func SetWriteBufferSize added in v2.3.69

func SetWriteBufferSize(size int) Option

func Use

func Use(args ...interface{}) Option

func User

func User(svc *httpUser) Option

func WithHeader added in v2.1.4

func WithHeader(headerName string, handler HeaderHandler) Option

func WithRequestID added in v2.1.4

func WithRequestID(headerName string) Option

func WriteTimeout

func WriteTimeout(timeout time.Duration) Option

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(log zerolog.Logger, options ...Option) (srv *Server)

func (*Server) ExampleRPC

func (srv *Server) ExampleRPC() *httpExampleRPC

func (*Server) Fiber

func (srv *Server) Fiber() *fiber.App

func (*Server) ServeHealth

func (srv *Server) ServeHealth(address string, response interface{})

func (*Server) ServeMetrics added in v2.3.69

func (srv *Server) ServeMetrics(log zerolog.Logger, path string, address string)

func (*Server) Shutdown

func (srv *Server) Shutdown()

func (*Server) User

func (srv *Server) User() *httpUser

func (*Server) WithLog

func (srv *Server) WithLog() *Server

func (*Server) WithMetrics

func (srv *Server) WithMetrics() *Server

func (*Server) WithTrace

func (srv *Server) WithTrace(ctx context.Context, appName string, endpoint string, attributes ...attribute.KeyValue) *Server

type ServiceRoute

type ServiceRoute interface {
	SetRoutes(route *fiber.App)
}

type UserCustomHandler

type UserCustomHandler func(ctx context.Context, arg0 int, arg1 string, opts ...interface{}) (err error)

type UserCustomResponse

type UserCustomResponse func(ctx context.Context, arg0 int, arg1 string, opts ...interface{}) (err error)

type UserGetUser

type UserGetUser func(ctx context.Context, cookie string, userAgent string) (user *types.User, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL