瀏覽代碼

公用配置

luoyangwei 1 年之前
父節點
當前提交
28f087e2a7
共有 2 個文件被更改,包括 50 次插入2 次删除
  1. 39 0
      .gitignore
  2. 11 2
      config.yaml

+ 39 - 0
.gitignore

@@ -0,0 +1,39 @@
+# Reference https://github.com/github/gitignore/blob/master/Go.gitignore
+# Binaries for programs and plugins
+*.exe
+*.exe~
+*.dll
+*.dylib
+
+# Test binary, built with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
+
+# Dependency directories (remove the comment below to include it)
+vendor/
+
+# Go workspace file
+go.work
+
+# Compiled Object files, Static and Dynamic libs (Shared Objects)
+*.o
+*.a
+*.so
+
+# OS General
+Thumbs.db
+.DS_Store
+
+# project
+*.cert
+*.key
+*.log
+bin/
+logs/
+
+# Develop tools
+.vscode/
+.idea/
+*.swp

+ 11 - 2
config.yaml

@@ -11,10 +11,20 @@ server:
     grpc:
         addr: 0.0.0.0:9001
         timeout: 60s
+    websocket:
+        addr: 0.0.0.0:10002
+        keepalive: 600s # 心跳步长,到时见会清理 connection
+        writeTimeout: 30s  # 写消息的时长
+        serverId: 0191b189-2cce-71b0-9737-1ec7270668ee
     registry:
         etcd:
             endpoints:
                 - "127.0.0.1:2379"
+    secret_key: "01914b3fc77f753ba22e8c241d23bbdf"
+    ucloud:
+        project_id: "org-nclt2c"
+        public_key: "CrTX8Ns0UHJ4cco63pJUKmB9CZH1A6U4iIbp4lMPb"
+        private_key: "EcymFVXqE0eBwIN2eJ21Xb9uZcKu109B22SVCGIi5P46z93E9WnHSKG0TOBRihVKm"
 
 data:
     database:
@@ -35,5 +45,4 @@ data:
     nats:
         addr: nats://127.0.0.1:4222
         messagePushCh: "msg_push"
-        messageBroadcastCh: "msg_broadcast"
-
+        messageBroadcastCh: "msg_broadcast"