Skip to content

Commit

Permalink
update contact
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangmingke committed May 31, 2020
1 parent 2e699e5 commit f845a9e
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ before_install: go get golang.org/x/tools/cmd/goimports
script:
- diff -u <(echo -n) <(gofmt -d -s .)
# - diff -u <(echo -n) <(goimports -d .)
- go testPmt -v -race ./... -coverprofile=coverage.txt -covermode=atomic
- go testdata -v -race ./... -coverprofile=coverage.txt -covermode=atomic

after_success:
- bash <(curl -s https://codecov.io/bash)
5 changes: 5 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,10 @@ Juno-agent --config=Juno-agent.toml
* [api文档](https://github.com/douyu/juno-agent/tree/master/doc/api/api.md)


## Contact

- DingTalk:
![DingTalk](doc/dingtalk.png)
- Wechat:
![Wechat](doc/wechat.png)

4 changes: 2 additions & 2 deletions doc/api/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Juno-Agent的设计目标主要是让开发能够通过可插拔的组件,观

```bash
curl -X GET \
testPmt
'http://127.0.0.1:60814/api/v1/agent/config-test.toml?name=juno-agent-test&env=dev&port=8023'
```

```bash
Expand Down Expand Up @@ -111,7 +111,7 @@ type ContentNode struct {

```bash
curl -X GET \
testPmt```
'http://127.0.0.1:60814/api/v1/agent/config?name=juno-agent-test&env=dev&port=8023&watch=true&internal=60&target=config-test.toml'
```

**当监听的配置文件发生变化时,会返回更新后的文档内容**
Expand Down
Binary file added doc/dingtalk.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/wechat.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pkg/check/impl/http/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const (
GetHTTPConfigTest = `{"http":"http://192.168.132.128:50092/openapi/testGet1","method":"get","timeout":3}`
GetHTTPConfigWithHeaderTest = `{"http":"http://192.168.132.128:50092","method":"get","timeout":3,"header":{"aid":["123"]}}`
PostHTTPConfigWithJSONTest = `{"http":"http://192.168.132.128:50092/openapi/testPost1","method":"POST","timeout":3,"header":{"Content-Type":["application/json"]},"body":"{\"ctype\":2,\"cid\":1,\"cplatform\":0,\"offset\":0,\"limit\":5}"}`
PostHTTPConfigWithFormTest = `{"http":"http://192.168.132.128:50092/openapi/testPost2","method":"POST","timeout":3,"header":{"Content-Type":["application/x-www-form-urlencoded"]},"body":"name=testPmt"}`
PostHTTPConfigWithFormTest = `{"http":"http://192.168.132.128:50092/openapi/testPost2","method":"POST","timeout":3,"header":{"Content-Type":["application/x-www-form-urlencoded"]},"body":"name=testdata"}`
)

func TestGetHttpConfig(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/nginx/scanner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
)

func Test_confScanner_parse(t *testing.T) {
/*scanner := NewScanner("../../../testPmt/testdata/nginx.d")
if _,err := scanner.parseFile("../../../testPmt/testdata/nginx.d/test2.conf"); err != nil {
/*scanner := NewScanner("../../../testdata/testdata/nginx.d")
if _,err := scanner.parseFile("../../../testdata/testdata/nginx.d/test2.conf"); err != nil {
t.Logf("e: %+v\n", err)
}*/
}
4 changes: 2 additions & 2 deletions pkg/pmt/supervisor/supervisor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ stopsignal=QUIT

func Test_supervisorScanner(t *testing.T) {
config := &Config{
Dir: "../../../../testPmt/testdata/supervisor.d",
Dir: "../../../../testdata/testdata/supervisor.d",
}
scanner := config.Build()
t.Run("parse conf file", func(t *testing.T) {
Expand All @@ -64,7 +64,7 @@ func Test_supervisorScanner(t *testing.T) {
})

t.Run("parse ini file", func(t *testing.T) {
task, _, err := scanner.parseFile("../../../testPmt/testdata/supervisor.d/test1.conf")
task, _, err := scanner.parseFile("../../../testdata/testdata/supervisor.d/test1.conf")
assert.Nil(t, err)
fmt.Printf("task = %+v\n", task)
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/pmt/systemd/systemd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

func Test_systemdScanner(t *testing.T) {
config := &Config{
Dir: "../../../../testPmt/testdata/systemd.d",
Dir: "../../../../testdata/testdata/systemd.d",
}
scanner := config.Build()
programs, err := scanner.ListPrograms()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions util/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ const DefaultConfig = `
endpoints=["127.0.0.1:2379"]
[plugin.supervisor]
enable = true
dir = "testPmt/testdata/supervisor.d"
dir = "testdata/testdata/supervisor.d"
[plugin.systemd]
enable = true
dir = "testPmt/testdata/systemd.d"
dir = "testdata/testdata/systemd.d"
[plugin.nginx]
enable = false
dir = "/usr/local/openresty/nginx/conf"
Expand All @@ -62,7 +62,7 @@ const DefaultConfig = `
[plugin.process]
enable = true
[jupiter.logger.default]
name = "testPmt"
name = "testdata"
debug = true
[jupiter.server]
[jupiter.server.grpc]
Expand Down

0 comments on commit f845a9e

Please sign in to comment.