common

package
v0.0.0-...-8d5435e Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func MustConvert

func MustConvert(from, to interface{})

func NewJaegerTracer

func NewJaegerTracer(name, hostPort string) (opentracing.Tracer, io.Closer, error)

func NewRequest

func NewRequest(ctx context.Context) *resty.Request

NewRequest returns a well configured *resty.Request opentracing.SpanContext will be injected into request header if exists

Types

type GrpcApplication

type GrpcApplication struct {
	Endpoint           string `validate:"required"`
	GatewayAddr        string `validate:"required"`
	AppName            string `validate:"required"`
	AgentHostPort      string
	RegisterGrpcServer func(srv *grpc.Server) error
	RegisterGateway    func(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) error
	RegisterVars       func() error
}

func (*GrpcApplication) Validate

func (a *GrpcApplication) Validate() error

type GrpcServer

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

func NewGrpcServer

func NewGrpcServer(app *GrpcApplication) *GrpcServer

func (*GrpcServer) Close

func (s *GrpcServer) Close() error

func (*GrpcServer) Run

func (s *GrpcServer) Run()

Jump to

Keyboard shortcuts

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