cache rpc

This commit is contained in:
wangchuxiao
2022-04-26 10:33:49 +08:00
parent b211a66e99
commit 7e44f7f110
8 changed files with 100 additions and 130 deletions
+24
View File
@@ -0,0 +1,24 @@
.PHONY: all build run gotool install clean help
BINARY_NAME=open_im_cache
BIN_DIR=../../../bin/
all: gotool build
build:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-w -s"
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
+16
View File
@@ -0,0 +1,16 @@
package main
import (
rpcCache "Open_IM/internal/rpc/cache"
"flag"
"fmt"
)
func main() {
rpcPort := flag.Int("port", 10600, "RpcToken default listen port 10800")
flag.Parse()
fmt.Println("start auth rpc server, port: ", *rpcPort)
rpcServer := rpcCache.NewOfficeServer(*rpcPort)
rpcServer.Run()
}