http

package
v0.0.0-...-bba2118 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewRouter

func NewRouter(o *Options, logger *zap.Logger, tracer opentracing.Tracer) *gin.Engine

Types

type InitControllers

type InitControllers func(r *gin.Engine)

type Options

type Options struct {
	Port int
	Mode string
}

func NewOptions

func NewOptions(v *viper.Viper) (*Options, error)

type Server

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

func New

func New(o *Options, logger *zap.Logger, router *gin.Engine, consulCli *consulApi.Client) (*Server, error)

func NewWithoutDiscover

func NewWithoutDiscover(o *Options, logger *zap.Logger, router *gin.Engine) (*Server, error)

func (*Server) AddRoute

func (s *Server) AddRoute(init InitControllers)

func (*Server) Application

func (s *Server) Application(name string)

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

Directories

Path Synopsis
middlewares

Jump to

Keyboard shortcuts

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