Skip to content

Commit

Permalink
Ftr:Update zouyx/agollo to apolloconfig/agollo (#179)
Browse files Browse the repository at this point in the history
* Update zouyx/agollo to apolloconfig/agollo

* format all files

* add github action and coveralls
  • Loading branch information
zouyx authored Jul 8, 2021
1 parent 25dd52a commit c079e7d
Show file tree
Hide file tree
Showing 60 changed files with 273 additions and 218 deletions.
4 changes: 0 additions & 4 deletions .github/FUNDING.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Go

on:
push:
branches: [ master ]
pull_request:
branches: [ master, develop ]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.12

- name: Build
run: |
go test -covermode=count -coverprofile=coverage.out ./...
- name: Convert coverage to lcov
uses: jandelgado/gcov2lcov-action@v1.0.5

- name: Coveralls GitHub Action
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov

- name: Build
run: |
go build -o "$Project"
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ Agollo - Go Client for Apollo
================

[![golang](https://img.shields.io/badge/Language-Go-green.svg?style=flat)](https://golang.org)
[![Build Status](https://travis-ci.org/zouyx/agollo.svg?branch=master)](https://travis-ci.org/zouyx/agollo)
[![Go Report Card](https://goreportcard.com/badge/github.com/zouyx/agollo)](https://goreportcard.com/report/github.com/zouyx/agollo)
[![codebeat badge](https://codebeat.co/badges/bc2009d6-84f1-4f11-803e-fc571a12a1c0)](https://codebeat.co/projects/github-com-zouyx-agollo-master)
[![Coverage Status](https://coveralls.io/repos/github/zouyx/agollo/badge.svg?branch=master)](https://coveralls.io/github/zouyx/agollo?branch=master)
[![Build Status](https://travis-ci.com/apolloconfig/agollo.svg?branch=master)](https://travis-ci.com/apolloconfig/agollo)
[![Go Report Card](https://goreportcard.com/badge/github.com/apolloconfig/agollo)](https://goreportcard.com/report/github.com/apolloconfig/agollo)
[![codebeat badge](https://codebeat.co/badges/bc2009d6-84f1-4f11-803e-fc571a12a1c0)](https://codebeat.co/projects/github-com-apolloconfig-agollo-master)
[![Coverage Status](https://coveralls.io/repos/github/apolloconfig/agollo/badge.svg?branch=master)](https://coveralls.io/github/apolloconfig/agollo?branch=master)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![GoDoc](http://godoc.org/github.com/zouyx/agollo?status.svg)](http://godoc.org/github.com/zouyx/agollo)
[![GitHub release](https://img.shields.io/github/release/zouyx/agollo.svg)](https://github.com/zouyx/agollo/releases)
[![GoDoc](http://godoc.org/github.com/apolloconfig/agollo?status.svg)](http://godoc.org/github.com/apolloconfig/agollo)
[![GitHub release](https://img.shields.io/github/release/apolloconfig/agollo.svg)](https://github.com/apolloconfig/apolloconfig/releases)
[![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu)

方便Golang接入配置中心框架 [Apollo](https://github.com/ctripcorp/apollo) 所开发的Golang版本客户端。
Expand All @@ -30,7 +30,7 @@ Agollo - Go Client for Apollo
### 导入 agollo

```
go get -u github.com/zouyx/agollo/v4@latest
go get -u github.com/apolloconfig/agollo/v4@latest
```

### 启动 agollo
Expand All @@ -40,8 +40,8 @@ package main
import (
"fmt"
"github.com/zouyx/agollo/v4"
"github.com/zouyx/agollo/v4/env/config"
"github.com/apolloconfig/agollo/v4"
"github.com/apolloconfig/agollo/v4/env/config"
)
func main() {
Expand Down Expand Up @@ -74,22 +74,22 @@ func main() {

***其他语言***[agollo-agent](https://github.com/zouyx/agollo-agent.git) 做本地agent接入,如:PHP

欢迎查阅 [Wiki](https://github.com/zouyx/agollo/wiki) 或者 [godoc](http://godoc.org/github.com/zouyx/agollo) 获取更多有用的信息
欢迎查阅 [Wiki](https://github.com/apolloconfig/agollo/wiki) 或者 [godoc](http://godoc.org/github.com/zouyx/agollo) 获取更多有用的信息

如果你觉得该工具还不错或者有问题,一定要让我知道,可以发邮件或者[留言](https://github.com/zouyx/agollo/issues)
如果你觉得该工具还不错或者有问题,一定要让我知道,可以发邮件或者[留言](https://github.com/apolloconfig/agollo/issues)

# User

* [使用者名单](https://github.com/zouyx/agollo/issues/20)
* [使用者名单](https://github.com/apolloconfig/agollo/issues/20)

# Contribution

* Source Code: https://github.com/zouyx/agollo/
* Issue Tracker: https://github.com/zouyx/agollo/issues
* Source Code: https://github.com/apolloconfig/agollo/
* Issue Tracker: https://github.com/apolloconfig/agollo/issues

# License

The project is licensed under the [Apache 2 license](https://github.com/zouyx/agollo/blob/master/LICENSE).
The project is licensed under the [Apache 2 license](https://github.com/apolloconfig/agollo/blob/master/LICENSE).

# Reference

Expand Down
3 changes: 2 additions & 1 deletion agcache/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ package memory

import (
"errors"
"github.com/zouyx/agollo/v4/agcache"
"sync"
"sync/atomic"

"github.com/apolloconfig/agollo/v4/agcache"
)

//DefaultCache 默认缓存
Expand Down
2 changes: 1 addition & 1 deletion agcache/memory/memory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ package memory
import (
"testing"

"github.com/apolloconfig/agollo/v4/agcache"
. "github.com/tevid/gohamcrest"
"github.com/zouyx/agollo/v4/agcache"
)

var testDefaultCache agcache.CacheInterface
Expand Down
41 changes: 21 additions & 20 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,28 @@ package agollo

import (
"container/list"
"github.com/zouyx/agollo/v4/agcache"
"github.com/zouyx/agollo/v4/agcache/memory"
"github.com/zouyx/agollo/v4/cluster/roundrobin"
"github.com/zouyx/agollo/v4/component"
"github.com/zouyx/agollo/v4/component/log"
"github.com/zouyx/agollo/v4/component/notify"
"github.com/zouyx/agollo/v4/component/remote"
"github.com/zouyx/agollo/v4/component/serverlist"
"github.com/zouyx/agollo/v4/constant"
"github.com/zouyx/agollo/v4/env"
"github.com/zouyx/agollo/v4/env/config"
jsonFile "github.com/zouyx/agollo/v4/env/file/json"
"github.com/zouyx/agollo/v4/extension"
"github.com/zouyx/agollo/v4/protocol/auth/sign"
"github.com/zouyx/agollo/v4/storage"
"github.com/zouyx/agollo/v4/utils"
"github.com/zouyx/agollo/v4/utils/parse/normal"
"github.com/zouyx/agollo/v4/utils/parse/properties"
"github.com/zouyx/agollo/v4/utils/parse/yaml"
"github.com/zouyx/agollo/v4/utils/parse/yml"
"strconv"

"github.com/apolloconfig/agollo/v4/agcache"
"github.com/apolloconfig/agollo/v4/agcache/memory"
"github.com/apolloconfig/agollo/v4/cluster/roundrobin"
"github.com/apolloconfig/agollo/v4/component"
"github.com/apolloconfig/agollo/v4/component/log"
"github.com/apolloconfig/agollo/v4/component/notify"
"github.com/apolloconfig/agollo/v4/component/remote"
"github.com/apolloconfig/agollo/v4/component/serverlist"
"github.com/apolloconfig/agollo/v4/constant"
"github.com/apolloconfig/agollo/v4/env"
"github.com/apolloconfig/agollo/v4/env/config"
jsonFile "github.com/apolloconfig/agollo/v4/env/file/json"
"github.com/apolloconfig/agollo/v4/extension"
"github.com/apolloconfig/agollo/v4/protocol/auth/sign"
"github.com/apolloconfig/agollo/v4/storage"
"github.com/apolloconfig/agollo/v4/utils"
"github.com/apolloconfig/agollo/v4/utils/parse/normal"
"github.com/apolloconfig/agollo/v4/utils/parse/properties"
"github.com/apolloconfig/agollo/v4/utils/parse/yaml"
"github.com/apolloconfig/agollo/v4/utils/parse/yml"
)

var (
Expand Down
13 changes: 7 additions & 6 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,19 @@ package agollo
import (
"encoding/json"
"fmt"
"github.com/zouyx/agollo/v4/agcache/memory"
"github.com/zouyx/agollo/v4/env/config"
"github.com/zouyx/agollo/v4/env/server"
"net/http"
"net/http/httptest"
"testing"
"time"

"github.com/apolloconfig/agollo/v4/agcache/memory"
"github.com/apolloconfig/agollo/v4/env/config"
"github.com/apolloconfig/agollo/v4/env/server"

_ "github.com/apolloconfig/agollo/v4/env/file/json"
"github.com/apolloconfig/agollo/v4/extension"
"github.com/apolloconfig/agollo/v4/storage"
. "github.com/tevid/gohamcrest"
_ "github.com/zouyx/agollo/v4/env/file/json"
"github.com/zouyx/agollo/v4/extension"
"github.com/zouyx/agollo/v4/storage"
)

const testDefaultNamespace = "application"
Expand Down
2 changes: 1 addition & 1 deletion cluster/load_balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package cluster

import (
"github.com/zouyx/agollo/v4/env/config"
"github.com/apolloconfig/agollo/v4/env/config"
)

//LoadBalance 负载均衡器
Expand Down
2 changes: 1 addition & 1 deletion cluster/roundrobin/round_robin.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package roundrobin

import (
"github.com/zouyx/agollo/v4/env/config"
"github.com/apolloconfig/agollo/v4/env/config"
)

//RoundRobin 轮询调度
Expand Down
11 changes: 6 additions & 5 deletions cluster/roundrobin/round_robin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@
package roundrobin

import (
"github.com/zouyx/agollo/v4/component/serverlist"
"github.com/zouyx/agollo/v4/env/config"
"github.com/zouyx/agollo/v4/env/server"
"github.com/zouyx/agollo/v4/protocol/http"
"testing"

"github.com/apolloconfig/agollo/v4/component/serverlist"
"github.com/apolloconfig/agollo/v4/env/config"
"github.com/apolloconfig/agollo/v4/env/server"
"github.com/apolloconfig/agollo/v4/protocol/http"

"github.com/apolloconfig/agollo/v4/env"
. "github.com/tevid/gohamcrest"
"github.com/zouyx/agollo/v4/env"
)

const servicesConfigResponseStr = `[{
Expand Down
17 changes: 9 additions & 8 deletions component/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@
package component

import (
"github.com/zouyx/agollo/v4/component/log"
"github.com/zouyx/agollo/v4/env/server"
"github.com/zouyx/agollo/v4/protocol/http"
"testing"

"github.com/apolloconfig/agollo/v4/component/log"
"github.com/apolloconfig/agollo/v4/env/server"
"github.com/apolloconfig/agollo/v4/protocol/http"

"github.com/apolloconfig/agollo/v4/cluster/roundrobin"
"github.com/apolloconfig/agollo/v4/env"
"github.com/apolloconfig/agollo/v4/env/config"
"github.com/apolloconfig/agollo/v4/env/config/json"
"github.com/apolloconfig/agollo/v4/extension"
. "github.com/tevid/gohamcrest"
"github.com/zouyx/agollo/v4/cluster/roundrobin"
"github.com/zouyx/agollo/v4/env"
"github.com/zouyx/agollo/v4/env/config"
"github.com/zouyx/agollo/v4/env/config/json"
"github.com/zouyx/agollo/v4/extension"

json2 "encoding/json"
)
Expand Down
19 changes: 10 additions & 9 deletions component/notify/change_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@ package notify
import (
"encoding/json"
"fmt"
"github.com/zouyx/agollo/v4/agcache/memory"
"github.com/zouyx/agollo/v4/cluster/roundrobin"
"github.com/zouyx/agollo/v4/component/remote"
"github.com/zouyx/agollo/v4/env/config"
jsonFile "github.com/zouyx/agollo/v4/env/file/json"
"github.com/zouyx/agollo/v4/extension"
"sync"
"testing"
"time"

"github.com/apolloconfig/agollo/v4/agcache/memory"
"github.com/apolloconfig/agollo/v4/cluster/roundrobin"
"github.com/apolloconfig/agollo/v4/component/remote"
"github.com/apolloconfig/agollo/v4/env/config"
jsonFile "github.com/apolloconfig/agollo/v4/env/file/json"
"github.com/apolloconfig/agollo/v4/extension"

_ "github.com/apolloconfig/agollo/v4/agcache/memory"
_ "github.com/apolloconfig/agollo/v4/env/file/json"
"github.com/apolloconfig/agollo/v4/storage"
. "github.com/tevid/gohamcrest"
_ "github.com/zouyx/agollo/v4/agcache/memory"
_ "github.com/zouyx/agollo/v4/env/file/json"
"github.com/zouyx/agollo/v4/storage"
)

func init() {
Expand Down
7 changes: 4 additions & 3 deletions component/notify/componet_notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
package notify

import (
"github.com/zouyx/agollo/v4/component/remote"
"github.com/zouyx/agollo/v4/storage"
"time"

"github.com/zouyx/agollo/v4/env/config"
"github.com/apolloconfig/agollo/v4/component/remote"
"github.com/apolloconfig/agollo/v4/storage"

"github.com/apolloconfig/agollo/v4/env/config"
)

const (
Expand Down
19 changes: 10 additions & 9 deletions component/notify/componet_notify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ package notify

import (
"encoding/json"
. "github.com/tevid/gohamcrest"
"github.com/zouyx/agollo/v4/cluster/roundrobin"
_ "github.com/zouyx/agollo/v4/cluster/roundrobin"
"github.com/zouyx/agollo/v4/env"
"github.com/zouyx/agollo/v4/env/config"
jsonConfig "github.com/zouyx/agollo/v4/env/config/json"
_ "github.com/zouyx/agollo/v4/env/file/json"
jsonFile "github.com/zouyx/agollo/v4/env/file/json"
"github.com/zouyx/agollo/v4/extension"
"testing"

"github.com/apolloconfig/agollo/v4/cluster/roundrobin"
_ "github.com/apolloconfig/agollo/v4/cluster/roundrobin"
"github.com/apolloconfig/agollo/v4/env"
"github.com/apolloconfig/agollo/v4/env/config"
jsonConfig "github.com/apolloconfig/agollo/v4/env/config/json"
_ "github.com/apolloconfig/agollo/v4/env/file/json"
jsonFile "github.com/apolloconfig/agollo/v4/env/file/json"
"github.com/apolloconfig/agollo/v4/extension"
. "github.com/tevid/gohamcrest"
)

func init() {
Expand Down
8 changes: 4 additions & 4 deletions component/remote/abs.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
package remote

import (
"github.com/zouyx/agollo/v4/component/log"
"github.com/zouyx/agollo/v4/env"
"github.com/zouyx/agollo/v4/env/config"
"github.com/zouyx/agollo/v4/protocol/http"
"github.com/apolloconfig/agollo/v4/component/log"
"github.com/apolloconfig/agollo/v4/env"
"github.com/apolloconfig/agollo/v4/env/config"
"github.com/apolloconfig/agollo/v4/protocol/http"
)

// AbsApolloConfig 抽象 apollo 配置
Expand Down
14 changes: 7 additions & 7 deletions component/remote/async.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ import (
"path"
"time"

"github.com/zouyx/agollo/v4/component/log"
"github.com/zouyx/agollo/v4/constant"
"github.com/zouyx/agollo/v4/env"
"github.com/zouyx/agollo/v4/env/config"
"github.com/zouyx/agollo/v4/extension"
"github.com/zouyx/agollo/v4/protocol/http"
"github.com/zouyx/agollo/v4/utils"
"github.com/apolloconfig/agollo/v4/component/log"
"github.com/apolloconfig/agollo/v4/constant"
"github.com/apolloconfig/agollo/v4/env"
"github.com/apolloconfig/agollo/v4/env/config"
"github.com/apolloconfig/agollo/v4/extension"
"github.com/apolloconfig/agollo/v4/protocol/http"
"github.com/apolloconfig/agollo/v4/utils"
)

const (
Expand Down
Loading

0 comments on commit c079e7d

Please sign in to comment.