package
module
Version:
v0.2.12
Opens a new window with list of versions in this module.
Published: Apr 11, 2022
License: BSD-3-Clause
Opens a new window with license information.
Imports: 17
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
README
¶
go-sky
go-sky is a Golang micro service framework integrating several very popular packages and tools. As follows:
- github.com/go-kit/kit
- github.com/uber-go/zap
- gopkg.in/natefinch/lumberjack.v2
- github.com/opentracing/opentracing-go
- github.com/go-redis/redis/v8
- github.com/elastic/go-elasticsearch/v7
- github.com/Shopify/sarama
- github.com/prometheus
Includes this subpackages as follows:
- github.com/WiFeng/go-sky/config
- github.com/WiFeng/go-sky/database
- github.com/WiFeng/go-sky/elasticsearch
- github.com/WiFeng/go-sky/helper
- github.com/WiFeng/go-sky/http
- github.com/WiFeng/go-sky/kafka
- github.com/WiFeng/go-sky/log
- github.com/WiFeng/go-sky/metrics
- github.com/WiFeng/go-sky/redis
- github.com/WiFeng/go-sky/trace
- github.com/WiFeng/go-sky-example
- github.com/WiFeng/go-sky-helloworld
Features
- Support config.toml, and load separated config file by different runtime enviroment (config_development.toml/config_production.toml)
- Support many popular componets including sql/redis/kafka/elasticsearch.
- Support tracing (include http server and http client / redis / sql / kafka / elasticsearch)
- Support log rotating and include trace_id in all log items.
- Support promethues metric (include http server by now)
Usage
- There is a demo project in sky-example.
TODO
- Support redis/sql operation metric
- Support more custom config to make some function disabled.
Contribution
We need more cute members to make this project more robust. Believe you can!
Documentation
¶
func LoadAppConfig(conf interface{}) error
LoadAppConfig ...
func LoadConfig(name string, conf interface{}) (err error)
LoadConfig ...
func RegisterTask(f func(), df func(), sync bool)
RegisterTask ...
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.