Skip to content

Commit

Permalink
update gomod and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
lintanghui committed Feb 1, 2019
1 parent 7d6f233 commit fb04565
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Kratos是[bilibili](https://www.bilibili.com)开源的一套Go微服务框架,
- [ ] config @志辉
- [ ] bm @佳辉
- [ ] warden @龙虾
- [ ] naming discovery @堂辉
- [x] naming discovery @堂辉
- [ ] cache&database @小旭
- [ ] kratos tool @普余

Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/bilibili/Kratos
require (
github.com/go-playground/locales v0.12.1 // indirect
github.com/go-playground/universal-translator v0.16.0 // indirect
github.com/gogo/protobuf v1.2.0
github.com/golang/protobuf v1.2.0
github.com/leodido/go-urn v1.1.0 // indirect
github.com/pkg/errors v0.8.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ github.com/go-playground/locales v0.12.1 h1:2FITxuFt/xuCNP1Acdhv62OzaCiviiE4kotf
github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM=
github.com/go-playground/universal-translator v0.16.0 h1:X++omBR/4cE2MNg91AoC3rmGrCjJ8eAeUP/K/EKx4DM=
github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY=
github.com/gogo/protobuf v1.2.0 h1:xU6/SpYbvkNYiptHJYEDRseDLvYE7wSqhYYNy0QSUzI=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
Expand Down
6 changes: 3 additions & 3 deletions pkg/naming/discovery/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (d *Discovery) selfproc(resolver naming.Resolver, event <-chan struct{}) {
}
}

func (d *Discovery) newSelf(instances naming.InstancesInfo) {
func (d *Discovery) newSelf(instances *naming.InstancesInfo) {
ins, ok := instances.Instances[d.conf.Zone]
if !ok {
return
Expand Down Expand Up @@ -284,12 +284,12 @@ func (r *Resolver) Watch() <-chan struct{} {
}

// Fetch fetch resolver instance.
func (r *Resolver) Fetch(c context.Context) (ins naming.InstancesInfo, ok bool) {
func (r *Resolver) Fetch(c context.Context) (ins *naming.InstancesInfo, ok bool) {
r.d.mutex.RLock()
app, ok := r.d.apps[r.id]
r.d.mutex.RUnlock()
if ok {
ins, ok = app.zoneIns.Load().(naming.InstancesInfo)
ins, ok = app.zoneIns.Load().(*naming.InstancesInfo)
return
}
return
Expand Down
2 changes: 1 addition & 1 deletion pkg/net/netutil/breaker/breaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"sync"
"time"

xtime "go-common/library/time"
xtime "github.com/bilibili/Kratos/pkg/time"
)

// Config broker config.
Expand Down

0 comments on commit fb04565

Please sign in to comment.