mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
modify dictory
This commit is contained in:
parent
df6eb2e6f1
commit
15ff930661
@ -7,7 +7,7 @@ BIN_DIR=../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
@ -7,7 +7,7 @@ BIN_DIR=../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
@ -6,7 +6,7 @@ BIN_DIR=../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
@ -6,7 +6,7 @@ BIN_DIR=../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
@ -7,7 +7,7 @@ BIN_DIR=../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
@ -6,7 +6,7 @@ BIN_DIR=../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
@ -6,7 +6,7 @@ BIN_DIR=../../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
@ -6,7 +6,7 @@ BIN_DIR=../../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
@ -6,7 +6,7 @@ BIN_DIR=../../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
@ -6,7 +6,7 @@ BIN_DIR=../../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
@ -6,7 +6,7 @@ BIN_DIR=../../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
25
cmd/rpc/third/Makefile
Normal file
25
cmd/rpc/third/Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
.PHONY: all build run gotool install clean help
|
||||
|
||||
BINARY_NAME=open_im_third
|
||||
BIN_DIR=../../../bin/
|
||||
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
||||
gotool:
|
||||
go fmt ./
|
||||
go vet ./
|
||||
|
||||
install:
|
||||
make build
|
||||
mv ${BINARY_NAME} ${BIN_DIR}
|
||||
|
||||
clean:
|
||||
@if [ -f ${BINARY_NAME} ] ; then rm ${BINARY_NAME} ; fi
|
||||
|
||||
|
@ -10,7 +10,7 @@ func main() {
|
||||
if err := config.InitConfig(); err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
if err := startrpc.Start(config.Config.RpcPort.OpenImUserPort[0], config.Config.RpcRegisterName.OpenImUserName, config.Config.Prometheus.UserPrometheusPort[0], third.Start); err != nil {
|
||||
if err := startrpc.Start(config.Config.RpcPort.OpenImThirdPort[0], config.Config.RpcRegisterName.OpenImThirdName, config.Config.Prometheus.ThirdPrometheusPort[0], third.Start); err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ BIN_DIR=../../../bin/
|
||||
all: gotool build
|
||||
|
||||
build:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s" -o ${BINARY_NAME}
|
||||
|
||||
run:
|
||||
@go run ./
|
||||
|
@ -80,16 +80,6 @@ rpcRegisterIP:
|
||||
#默认即可
|
||||
listenIP: 0.0.0.0
|
||||
|
||||
# endpoints 内部组件间访问的端点host名称,访问时,可以内部直接访问 host:port 来访问
|
||||
endpoints:
|
||||
api: openim_api
|
||||
push: openim_push
|
||||
msg_gateway: openim_msg_gateway
|
||||
rpc_auth: openim_rpc_auth
|
||||
rpc_friend: openim_rpc_friend
|
||||
rpc_group: openim_rpc_group
|
||||
rpc_msg: openim_rpc_msg
|
||||
rpc_user: openim_rpc_user
|
||||
|
||||
api:
|
||||
openImApiPort: [ 10002 ] #api服务端口,默认即可,需要开放此端口或做nginx转发
|
||||
@ -149,9 +139,9 @@ rpcport: #rpc服务端口 默认即可
|
||||
openImGroupPort: [ 10150 ]
|
||||
openImAuthPort: [ 10160 ]
|
||||
openImPushPort: [ 10170 ]
|
||||
openImConversationPort: [ 10230 ]
|
||||
openImRtcPort: [ 11300 ]
|
||||
|
||||
openImConversationPort: [ 10180 ]
|
||||
openImRtcPort: [ 10190 ]
|
||||
openImThirdPort : [ 10200 ]
|
||||
|
||||
rpcregistername: #rpc注册服务名,默认即可
|
||||
openImUserName: User
|
||||
@ -163,6 +153,7 @@ rpcregistername: #rpc注册服务名,默认即可
|
||||
openImAuthName: Auth
|
||||
openImConversationName: Conversation
|
||||
openImRtcName: Rtc
|
||||
openImThirdName: Third
|
||||
|
||||
log:
|
||||
storageLocation: ../logs/
|
||||
@ -326,5 +317,5 @@ prometheus:
|
||||
authPrometheusPort: [ 20160 ]
|
||||
pushPrometheusPort: [ 20170 ]
|
||||
conversationPrometheusPort: [ 20230 ]
|
||||
RtcPrometheusPort: [ 21300 ]
|
||||
rtcPrometheusPort: [ 21300 ]
|
||||
messageTransferPrometheusPort: [ 21400, 21401, 21402, 21403 ] # 端口数量和 script/path_info.cfg msg_transfer_service_num保持一致
|
||||
|
@ -152,6 +152,7 @@ type config struct {
|
||||
OpenImConversationPort []int `yaml:"openImConversationPort"`
|
||||
OpenImCachePort []int `yaml:"openImCachePort"`
|
||||
OpenImRtcPort []int `yaml:"openImRtcPort"`
|
||||
OpenImThirdPort []int `yaml:"openImThirdPort"`
|
||||
}
|
||||
RpcRegisterName struct {
|
||||
OpenImUserName string `yaml:"openImUserName"`
|
||||
@ -301,8 +302,9 @@ type config struct {
|
||||
AuthPrometheusPort []int `yaml:"authPrometheusPort"`
|
||||
PushPrometheusPort []int `yaml:"pushPrometheusPort"`
|
||||
ConversationPrometheusPort []int `yaml:"conversationPrometheusPort"`
|
||||
RtcPrometheusPort []int `yaml:"RtcPrometheusPort"`
|
||||
RtcPrometheusPort []int `yaml:"rtcPrometheusPort"`
|
||||
MessageTransferPrometheusPort []int `yaml:"messageTransferPrometheusPort"`
|
||||
ThirdPrometheusPort []int `yaml:"thirdPrometheusPort"`
|
||||
} `yaml:"prometheus"`
|
||||
}
|
||||
|
||||
|
@ -46,6 +46,7 @@ service_source_root=(
|
||||
../cmd/rpc/group/
|
||||
../cmd/rpc/auth/
|
||||
../cmd/rpc/conversation/
|
||||
../cmd/rpc/third/
|
||||
../cmd/crontask
|
||||
../cmd/cmdutils
|
||||
# ${msg_gateway_source_root}
|
||||
@ -64,6 +65,7 @@ service_names=(
|
||||
open_im_group
|
||||
open_im_auth
|
||||
open_im_conversation
|
||||
open_im_third
|
||||
open_im_cron_task
|
||||
open_im_cmd_utils
|
||||
${msg_gateway_name}
|
||||
|
@ -15,6 +15,7 @@ service_filename=(
|
||||
open_im_auth
|
||||
${msg_name}
|
||||
open_im_conversation
|
||||
open_im_third
|
||||
)
|
||||
|
||||
#service config port name
|
||||
@ -28,6 +29,7 @@ service_port_name=(
|
||||
openImAuthPort
|
||||
openImMessagePort
|
||||
openImConversationPort
|
||||
openImThirdPort
|
||||
)
|
||||
|
||||
service_prometheus_port_name=(
|
||||
@ -40,6 +42,7 @@ service_prometheus_port_name=(
|
||||
authPrometheusPort
|
||||
messagePrometheusPort
|
||||
conversationPrometheusPort
|
||||
thirdPrometheusPort
|
||||
)
|
||||
|
||||
for ((i = 0; i < ${#service_filename[*]}; i++)); do
|
||||
|
Loading…
x
Reference in New Issue
Block a user