Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

open-gitlab.going-link.com/operation-sre/cplus

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

open-gitlab.going-link.com/operation-sre/cplus

  • v0.0.0-20240801030742-fc2ebe8104e7
  • Go
  • Socket score

Version published
Created
Source

cplus

cplus 管理服务(rpc)

1. 初始化项目

会根据cplus.proto文件更新项目cpluspbcplusclient

后面若更新proto文件,在项目根目录执行此命令刷新项目:

goctl rpc protoc cplus.proto --go_out=. --go-grpc_out=. --zrpc_out=. --style goZero

# 格式化proto文件(没用ide工具)
clang-format -i cplus.proto

2. 调试、部署测试

  1. 调试本地rpc服务
# 调试远程rpc服务
grpcui -plaintext 192.168.5.119:8083
# 调试本地rpc服务
grpcui -plaintext 127.0.0.1:8083
# 调试生产
grpcui -plaintext 10.2.110.138:8083
  1. 二进制部署测试
go build -o cplus
sudo nohup ./cplus &
# asynqmon命令安装
go get -u github.com/hibiken/asynq/tools/asynqmon
# !安装无效!,直接下载二进制文件,放到go bin文件夹中(全局环境变量):
https://github.com/hibiken/asynqmon/releases
# 使用
asynqmon --port=3000 --redis-addr=localhost:6379
# 指定数据库号
asynqmon --port=3000 --redis-addr=10.2.121.62:6379 --redis-db=7

http://127.0.0.1:3000/
  1. docker k8s部署
# 生成dockerfile
goctl docker -go cplus.go
# 创建cm文件
k create configmap cplus-cm --from-file=etc/cplus.yaml
# 应用deploy
k apply -f cplus.yaml
# 构建镜像
docker build -t open-registry.going-link.com/isrm-public/cplus:v1 -f ./Dockerfile .
# 仓库认证
export DOCKER_USERNAME=xxx
export DOCKER_PASSWORD="xxx"
export DOCKER_REGISTRY=open-registry.going-link.com
sudo docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD} ${DOCKER_REGISTRY}
# 推镜像
sudo docker push open-registry.going-link.com/isrm-public/cplus:v1
# 重启
k rollout restart deploy cplus

3. 项目依赖

ExtCompPreMap 内外部公司映射,规则:

只有甄云的key带@,代表内部
甄云科技@
其他外部公司都是公司名称:账号英文前缀,其中汉得信息账号不会与甄云重复,因此账号也无需前缀。
汉得信息 ""
盛迭信息 "SD"

weworkMsgTpls 企业微信消息模版

本服务只暂时用到的模版为:

wework_renewal_notify 企业微信账号到期提醒

FAQs

Package last updated on 01 Aug 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc