Git Product home page Git Product logo

gin-pro's Introduction

gin-project

原文详解地址[https://book.eddycjy.com/golang/gin/jwt.html] ##日志服务

优雅的重启

> ctrl + c 	SIGINT	强制进程结束

> ctrl + z	SIGTSTP	任务中断,进程挂起

> ctrl + \	SIGQUIT	进程结束 和 dump core

> ctrl + d		EOF

> 终止收到该信号的进程。若程序中没有捕捉该信号,当收到该信号时,进程就会退出(常用于 重启、重新加载进程)

实现优雅的重启

**endless**
Zero downtime restarts for golang HTTP and HTTPS servers. (for golang 1.3+)

我们借助 fvbock/endless <https://github.com/fvbock/endless>来实现
Golang HTTP/HTTPS 服务重新启动的零停机
endless server 监听以下几种信号量:
- syscall.SIGHUP:触发 fork 子进程和重新启动
- syscall.SIGUSR1/syscall.SIGTSTP:被监听,但不会触发任何动作
- syscall.SIGUSR2:触发 hammerTime
- syscall.SIGINT/syscall.SIGTERM:触发服务器关闭(会完成正在运行的请求)
- endless 正正是依靠监听这些信号量,完成管控的一系列动作

添加Swagger

修改Grom CallBack

添加定时任务

重构

优化conf 读取配置

[Golang]学习网站

https://www.qfgolang.com/?special=bingfagoroutinechannel

gin-pro's People

Contributors

zyyawin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.