snow

command module
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Language GoDoc Go Report Card

Snow

Snow是一套简单易用的Go语言业务框架,整体逻辑设计简洁,支持HTTP服务、队列调度、任务调度和和脚本任务等常用业务场景模式。

Goals

我们致力于让PHPer更方便地切入到Go语言开发,在业务框架选择上贴合PHP主流框架的设计思想,以更低的学习成本快速熟悉框架,致力于业务逻辑的开发。

Features

  • HTTP服务:基于gin进行模块化设计,简单易用、核心足够轻量;支持平滑重启;
  • 任务调度:基于cron进行模块化设计,简单易用;
  • 队列调度:基于自研的高性能队列调度服务worker,通用的Queue接口化,解耦队列调度与底层队列驱动;支持平滑关闭;
  • Cache: 通用的缓存接口化设计,核心组件实现了插件式的redis驱动支持,可扩展;
  • Database: 使用成熟的ORM库,有丰富的数据库驱动支持和特性;
  • Queue: 通用的接口化设计,框架实现了redis、alimns作为队列底层驱动,支持可扩展;
  • Config: 采用toml语义化的配置文件格式,简单易用;
  • Logger: 基于logrus进行封装,内嵌上下文通用数据采集和trace_id追踪;
  • Request and Response:定义输入和输出数据实体格式;
  • Curl: 简单易用的Curl请求库;
  • 脚手架:方便快捷的创建新项目,可一键升级;

Quick start

Requirements

  • Go version >= 1.12
  • Global environment configure (Linux/Mac)
export GO111MODULE=on
export GOPROXY=https://goproxy.io

Installation

go get github.com/qit-team/snow/tool/snow
cd $GOPATH/src
snow new snow-demo

Build & Run

cd snow-demo
go mod vendor
sh build/shell/build.sh
build/bin/snow

Test demo

curl "http://127.0.0.1:8080/hello"

Documents

Contributors

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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