Browse Source

git ignore

master
dark 1 year ago
parent
commit
838eb17412
  1. 2
      .gitignore
  2. BIN
      demo_linux_amd64
  3. BIN
      demo_windows_amd64.exe
  4. 8
      etc/demo-api.yaml
  5. 3
      model/es/esmodel.go

2
.gitignore

@ -0,0 +1,2 @@
logs
*.log

BIN
demo_linux_amd64

Binary file not shown.

BIN
demo_windows_amd64.exe

Binary file not shown.

8
etc/demo-api.yaml

@ -1,7 +1,7 @@
Name: demo-api
Host: 0.0.0.0
Port: 8888
MaxConns: 1000
Pg:
# postgresql 连接配置
DataSource: postgres://postgres:123456@127.0.0.1:/postgres?sslmode=disable
@ -9,3 +9,9 @@ CacheRedis:
- Host: 127.0.0.1:6379
# Pass: $pass
Type: node
Log:
ServiceName: demo
Mode: file
Path: logs
Level: info
KeepDays: 7

3
model/es/esmodel.go

@ -32,7 +32,10 @@ func (e *EsService) EsConnect() *esclient.Client {
cfg := esclient.Config{
Addresses: []string{
"http://10.1.1.124:9200",
// "http://xxx.xxx.xxx.xxx:9200",
},
// Username: "elastic",
// Password: "123456",
}
es, err := esclient.NewClient(cfg)
if err != nil {

Loading…
Cancel
Save