You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/go-micro-saas/service-layout

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/go-micro-saas/service-layout

v0.0.1
Source
Go
Version published
Created
Source

service layout

启动服务;启动请检查配置文件;如果使用配置中心,请跳过执行,先阅读服务配置部分

  • 配置文件示例:config_all.yaml
  • 创建新的项目:create-new-project

# 查看帮助
make help

# 运行服务
# 运行服务
make run-service
# or
make run-all-in-one

# 测试服务
make testing-service
# or
make testing-all-in-one

服务配置

示例如下:

# app 程序
app:
  server_name: xxx-service
  # 配置方式;值:local、consul、etcd
  config_method: consul

如果app.config_method配置是使用配置中心(consul、etcd、...),首先把配置写入配置中心:

# 执行
make store-configuration
# or
#* `conf`: 启动读取配置
#* `source_dir`: 被存储的配置文件所在文件夹
#* `store_dir`: 存储到配置中心位置
go run ./app/service-layout/cmd/store-configuration/... -conf=./app/service-layout/configs \
-source_dir=./app/service-layout/configs \
-store_dir=go-micro-saas/service-layout/develop/v1.0.0

go run ./app/service-layout/cmd/store-configuration/... -conf=./app/service-layout/configs \
-source_dir=./app/uuid-service/configs \
-store_dir=go-micro-saas/uuid-service/develop/v1.0.0

文档

生成文档:make protoc-api-protobuf

FAQs

Package last updated on 18 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts