概述文档(国内)[1]文档(国外)[2]开源(Github)[3]什么是farseer-go基于Golang框架的模块化完整基础设施,用于创建现代Web应用程序和API。使用最流行的组件并为它们提供模块化技术。该框架完美支持存储资源库、应用层事务、领域事件、应用层动态WebAPI等DDD领域驱动战术设计。它有成熟版本的.netcore[4],已经使用了10多年。这很棒。不要担心框架会让你依赖太多包。farseer-go的组件都是独立的包,不用的包不会被下载在你的应用中,每个组件都是一个单独的包,那么版本号单独发布有什么特点呢?统一配置:所有配置都集成到./farseer.yaml优雅:所有模块都遵循开发者体验优先的原则。模块化:提供完整的模块化系统,使您能够开发可重用的应用程序模块。领域驱动:帮助您实现基于DDD的分层架构,构建可维护的代码库。Linktracking(下个版本上线):如果你在框架中使用Orm、Redis、Http、Grpc、ES、MQ、EventBus、Task、FSS,会隐式为你实现linktracking,以及API请求日志、慢查询.结合FOPS[5]项目(自动化构建、链路跟踪控制台、K8S集群日志采集),支持无代码入侵的全链路实时监控。集成组件包名称描述地址fs基础核心包https://github.com/farseer-go/fscollections数据采集https://github.com/farseer-go/collectionswebapiwebapi服务https://github.com/farseer-go/webapiasync异步编程https://github.com/farseer-go/asyncmapper对象转换https://github.com/farseer-go/mappercacheMemory本地缓存https://github.com/farseer-go/cacheMemoryredisclienthttps://github.com/farseer-go/redisdatadatabaseORMhttps://github.com/farseer-go/dataelasticSearchclienthttps:///github.com/farseer-go/elasticSearcheventBus事件总线https://github.com/farseer-go/eventBusqueue本地队列https://github.com/farseer-go/queuetasks本地任务https://github.com/farseer-go/tasksfss分发试用调度客户端https://github.com/farseer-go/fssutils工具集https://github.com/farseer-go/实用程序如何启动main.gopackagemainimport"github.com/farseer-go/fs"funcmain(){fs.Initialize[StartupModule]("yourprojectName")}在main函数的第一行,执行fs.Initialize,开始初始化框架。运行后控制台打印加载信息:2022-12-0117:07:24Applicationname:yourprojectName2022-12-0117:07:24主机名:MacBook-Pro.local2022-12-0117:07:24系统时间:2022-12-0117:07:242022-12-0117:07:24进程ID:61232022-12-0117:07:24应用ID:1933370229638184962022-12-0117:07:24应用IP:192.168.1.42022-12-0117:07:24--------------------------------------2022-12-0117:07:24正在加载模块...2022-12-0117:07:24正在加载模块:webapi.Module2022-12-0117:07:24加载模块:domain.Module2022-12-0117:07:24加载模块:application.Module2022-12-0117:07:24加载模块:interfaces.Module2022-12-0117:07:24加载模块:data.Module2022-12-0117:07:24加载模块:eventBus.Module2022-12-0117:07:24加载模块:queue.Module2022-12-0117:07:24加载模块:infrastructure.Module2022-12-0117:07:24加载模块:main.StartupModule2022-12-0117:07:24加载完成,共加载10个模块2022-12-0117:07:24--------------------------------------2022-12-0117:07:24初始化完成,总耗时:1ms2022-12-0117:07:24------------------------------------2022-12-0117:07:24[信息]Web服务启动:http://localhost:8888/Reference[1]文档(国内):https://farseer-go.gitee.io/[2]文档(国外):https://farseer-go.githubub.io/doc/[3]开源(Github):https://github.com/farseer-go/fs[4].net核心:https://github.com/FarseerNet/Farseer.Net/[5]FOPS:https://github.com/FarseerNet/FOPS本文转载自微信公众号《程序员打怪升级之旅》,作者“王中扬Go”,转载文章可通过以下方式关注二维码请联系“计划会员升级打怪之旅”公众号。
