基于Golang模块化完整的基础设施框架,创建现代化Web应用和APIs。
创新互联公司-专业网站定制、快速模板网站建设、高性价比黄骅网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式黄骅网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖黄骅地区。费用合理售后完善,十余年实体公司更值得信赖。
使用目前最为流行的组件,并用模块化技术来提供这些组件。
框架完美支持 DDD领域驱动 的战术设计,如仓储资源库、应用层事务、领域事件、应用层动态WebAPI。
它有一个.net core[4] 成熟版本,已经使用了10多年,非常棒
不用担心框架会让你依赖过多的包,farseer-go的组件都是独立的包,不使用的包不会下载到您的应用程序中
每个组件都是单独的包,因此版本号也是单独发布的
结合FOPS[5] 项目(自动构建、链路追踪控制台、K8S集群日志收集)支持代码无侵入的全链路实时监控。
包名 |
描述 |
地址 |
fs |
基础核心包 |
https://github.com/farseer-go/fs |
collections |
数据集合 |
https://github.com/farseer-go/collections |
webapi |
web api服务 |
https://github.com/farseer-go/webapi |
async |
异步编程 |
https://github.com/farseer-go/async |
mapper |
对象转换 |
https://github.com/farseer-go/mapper |
cacheMemory |
本地缓存 |
https://github.com/farseer-go/cacheMemory |
redis |
client |
https://github.com/farseer-go/redis |
data |
数据库ORM |
https://github.com/farseer-go/data |
elasticSearch |
client |
https://github.com/farseer-go/elasticSearch |
eventBus |
事件总线 |
https://github.com/farseer-go/eventBus |
queue |
本地队列 |
https://github.com/farseer-go/queue |
tasks |
本地任务 |
https://github.com/farseer-go/tasks |
fss |
分布试调度client |
https://github.com/farseer-go/fss |
utils |
工具集 |
https://github.com/farseer-go/utils |
package main
import "github.com/farseer-go/fs"
func main() {
fs.Initialize[StartupModule]("your project Name")
}
在main函数第一行,执行fs.Initialize,开始初始化框架
运行后控制台打印加载信息:
2022-12-01 17:07:24 应用名称:your project Name
2022-12-01 17:07:24 主机名称:MacBook-Pro.local
2022-12-01 17:07:24 系统时间:2022-12-01 17:07:24
2022-12-01 17:07:24 进程ID:6123
2022-12-01 17:07:24 应用ID:193337022963818496
2022-12-01 17:07:24 应用IP:192.168.1.4
2022-12-01 17:07:24 ---------------------------------------
2022-12-01 17:07:24 加载模块...
2022-12-01 17:07:24 加载模块:webapi.Module
2022-12-01 17:07:24 加载模块:domain.Module
2022-12-01 17:07:24 加载模块:application.Module
2022-12-01 17:07:24 加载模块:interfaces.Module
2022-12-01 17:07:24 加载模块:data.Module
2022-12-01 17:07:24 加载模块:eventBus.Module
2022-12-01 17:07:24 加载模块:queue.Module
2022-12-01 17:07:24 加载模块:infrastructure.Module
2022-12-01 17:07:24 加载模块:main.StartupModule
2022-12-01 17:07:24 加载完毕,共加载 10 个模块
2022-12-01 17:07:24 ---------------------------------------
2022-12-01 17:07:24 初始化完毕,共耗时:1 ms
2022-12-01 17:07:24 ---------------------------------------
2022-12-01 17:07:24 [Info] Web服务已启动:http://localhost:8888/
[1]文档(国内): https://farseer-go.gitee.io/
[2]文档(国外): https://farseer-go.github.io/doc/
[3]开源(Github): https://github.com/farseer-go/fs
[4].net core: https://github.com/FarseerNet/Farseer.Net/
[5]FOPS: https://github.com/FarseerNet/FOPS
本文转载自微信公众号「 程序员升级打怪之旅」,作者「王中阳Go」,可以通过以下二维码关注。
转载本文请联系「 程序员升级打怪之旅」公众号。
本文标题:Farseer-Go,一个模块化的完整基础设施框架
分享地址:http://www.shufengxianlan.com/qtweb/news27/499277.html
网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联