Skip to content

Commit

Permalink
Upgrade dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
udhos committed May 23, 2024
1 parent 644415d commit da4bfa0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/modernprogram/groupcache/v2 v2.6.0
github.com/prometheus/client_golang v1.19.0
github.com/udhos/kube v0.0.1
github.com/udhos/kubepodinformer v0.0.3
github.com/udhos/kubepodinformer v0.1.0
k8s.io/client-go v0.29.3
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/udhos/kube v0.0.1 h1:FFWNyn+xf4aHZTaldKZuueu6ZQqmJR76I4OrfeJo9W4=
github.com/udhos/kube v0.0.1/go.mod h1:UgnFniZC6fLV5vEvAqpDvN+rY+aQJwzRM1ejhK2yzEI=
github.com/udhos/kubepodinformer v0.0.3 h1:3q2egWSGd5eVLX5wkyGSJkF8G4LNgNjS/G2tLNVwlPI=
github.com/udhos/kubepodinformer v0.0.3/go.mod h1:oJhuMPdLeCtMT9KdotLkjIE+eByH9cPhMX2GPrB2l0k=
github.com/udhos/kubepodinformer v0.1.0 h1:jgloet7tCnXnsMhOp2CI0o6jnQtE+2Wros+/rem2GEc=
github.com/udhos/kubepodinformer v0.1.0/go.mod h1:rSYevK46dWPXOmhvnG0FFkPDYHvOUxkeV4Nsz+OHpIY=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
Expand Down
11 changes: 11 additions & 0 deletions kubegroup/kubegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ type Options struct {
// Pool is an interface to plug in a target for delivering peering
// updates. *groupcache.HTTPPool, created with
// groupcache.NewHTTPPoolOpts(), implements this interface.
// Pool supports groupcache2.
Pool PeerGroup

// PeerSet is an interface to plug in a target for delivering peering
// updates. *groupcache.Daemon, created with
// groupcache.ListenAndServe(), implements this interface.
// PeerSet supports groupcache3.
Peers PeerSet

// Client provides kubernetes client.
Expand Down Expand Up @@ -215,6 +217,10 @@ func (g *Group) onUpdate(pods []podinformer.Pod) {

if g.options.Peers != nil {

//
// groupcache3
//

peers := make([]peer.Info, 0, size)

for i, p := range pods {
Expand All @@ -238,6 +244,11 @@ func (g *Group) onUpdate(pods []podinformer.Pod) {
}

} else {

//
// groupcache2
//

peers := make([]string, 0, size)

for i, p := range pods {
Expand Down

0 comments on commit da4bfa0

Please sign in to comment.