transport

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 26 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.

Index

Constants

View Source
const (

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

Variables

This section is empty.

Functions

func ExitOnError

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

func NewServerSettings

func NewServerSettings(svcServerSettings api.ServerSettings) (srv *httpServerSettings)

Types

type ErrorHandler

type ErrorHandler func(err error) 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

type HeaderHandler func(value string) Header

type MiddlewareServerSettings

type MiddlewareServerSettings func(next api.ServerSettings) api.ServerSettings

type MiddlewareServerSettingsCreateRoom

type MiddlewareServerSettingsCreateRoom func(next ServerSettingsCreateRoom) ServerSettingsCreateRoom

type MiddlewareServerSettingsHealthCheck

type MiddlewareServerSettingsHealthCheck func(next ServerSettingsHealthCheck) ServerSettingsHealthCheck

type MiddlewareSetServerSettings

type MiddlewareSetServerSettings interface {
	Wrap(m MiddlewareServerSettings)
	WrapGetConnectionsNum(m MiddlewareServerSettingsGetConnectionsNum)
	WrapHealthCheck(m MiddlewareServerSettingsHealthCheck)
	WrapGetServerSettings(m MiddlewareServerSettingsGetServerSettings)
	WrapCreateRoom(m MiddlewareServerSettingsCreateRoom)

	WithTrace()
	WithLog()
}

type Option

type Option func(srv *Server)

func MaxBatchSize

func MaxBatchSize(size int) Option

func MaxBatchWorkers

func MaxBatchWorkers(size int) Option

func MaxBodySize

func MaxBodySize(max int) Option

func ReadTimeout

func ReadTimeout(timeout time.Duration) Option

func ServerSettings

func ServerSettings(svc *httpServerSettings) Option

func Service

func Service(svc ServiceRoute) Option

func SetFiberCfg

func SetFiberCfg(cfg fiber.Config) Option

func SetReadBufferSize

func SetReadBufferSize(size int) Option

func Use

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

func WithHeader

func WithHeader(headerName string, handler HeaderHandler) Option

func WithRequestID

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) Fiber

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

func (*Server) ServeHealth

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

func (*Server) ServerSettings

func (srv *Server) ServerSettings() *httpServerSettings

func (*Server) Shutdown

func (srv *Server) Shutdown()

func (*Server) TraceJaeger

func (srv *Server) TraceJaeger(serviceName string) *Server

func (*Server) TraceZipkin

func (srv *Server) TraceZipkin(serviceName string, zipkinUrl string) *Server

func (*Server) WithLog

func (srv *Server) WithLog() *Server

func (*Server) WithTrace

func (srv *Server) WithTrace() *Server

type ServerSettingsCreateRoom

type ServerSettingsCreateRoom func(ctx context.Context, token string, createRoom types.CreateRoomRequest) (err error)

type ServerSettingsGetConnectionsNum

type ServerSettingsGetConnectionsNum func(ctx context.Context, token string) (countConn int, exists bool, err error)

type ServerSettingsGetServerSettings

type ServerSettingsGetServerSettings func(ctx context.Context, token string) (settings types.Settings, err error)

type ServerSettingsHealthCheck

type ServerSettingsHealthCheck func(ctx context.Context, token string) (exists bool, err error)

type ServiceRoute

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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