nodeid-service

module
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0

README

node id service

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

参考配置文件:config_all.yaml


# 查看帮助
make help

# 运行服务
make run-service
# or
make run-nodeid-service
# or
go run ./app/nodeid-service/cmd/nodeid-service/... -conf=./app/nodeid-service/configs

# 测试服务
make testing-service
# or
make testing-nodeid-service

服务配置

示例如下:

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

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

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

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

文档

生成文档:make protoc-api-protobuf

流程图

节点ID颁发流程图

Directories

Path Synopsis
api
app
nodeid-service/internal/data/data
Package data Code generated by ikaiguang.
Package data Code generated by ikaiguang.
nodeid-service/internal/data/repo
Package datarepos Code generated by ikaiguang.
Package datarepos Code generated by ikaiguang.
nodeid-service/internal/data/schema/node_id
Package schemas Code generated by ikaiguang.
Package schemas Code generated by ikaiguang.
nodeid-service/internal/data/schema/node_serial
Package schemas Code generated by ikaiguang.
Package schemas Code generated by ikaiguang.

Jump to

Keyboard shortcuts

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