ginny

package module
Version: v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

README

Ginny

Ginny framework base on Gin, more components to improve development efficiency.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppProviderSet = wire.NewSet(NewOption, NewApp)

Functions

This section is empty.

Types

type Application

type Application struct {
	Name    string
	Version string

	Server *Server
	// contains filtered or unexported fields
}

Application

func NewApp

func NewApp(option *Option, logger *zap.Logger, serves ...Serve) (*Application, error)

NewApp

func (*Application) AwaitSignal

func (a *Application) AwaitSignal()

AwaitSignal

func (*Application) Start

func (a *Application) Start(opts ...options.ServerOptional) error

Start

type Option

type Option struct {
	Name    string
	Version string
}

Option

func NewOption

func NewOption(v *viper.Viper, logger *zap.Logger) (*Option, error)

NewOption

type Serve

type Serve func(app *Application) error

Serve

func GrpcServe

func GrpcServe(svr *grpc.Server) Serve

GrpcServe

func GrpcServeWithConsul added in v0.0.5

func GrpcServeWithConsul(svr *grpc.Server, c *consul.Client) Serve

GrpcServeWithConsul

func HttpServe

func HttpServe(svr *http.Server) Serve

HttpServe

func HttpServeWithConsul added in v0.0.5

func HttpServeWithConsul(svr *http.Server, c *consul.Client) Serve

HttpServeWithConsul

type Server added in v0.0.7

type Server struct {
	HttpServer *http.Server
	GrpcServer *grpc.Server
}

Server

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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