Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
Refactor configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
thrawn01 committed Oct 23, 2020
1 parent fb7ad6b commit e278860
Show file tree
Hide file tree
Showing 12 changed files with 476 additions and 493 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Fix inconsistent tests failing
* Fix GRPC/HTTP Gateway
* Renamed functions to ensure clarity of version
* Removed deprecated `EtcdAdvertiseAddress` config option
* Refactored configuration options
* 'member-list' metadata no longer assumes the member-list address is the same as
the gubernator advertise address.

## [0.9.2] - 2020-10-23
### Change
Expand Down
12 changes: 0 additions & 12 deletions cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@ import (
"github.com/sirupsen/logrus"
)

type Address struct {
HTTPAddress string
GRPCAddress string
}

func (a *Address) PeerInfo() gubernator.PeerInfo {
return gubernator.PeerInfo{
HTTPAddress: a.GRPCAddress,
GRPCAddress: a.GRPCAddress,
}
}

var daemons []*gubernator.Daemon
var peers []gubernator.PeerInfo

Expand Down
16 changes: 8 additions & 8 deletions cmd/gubernator-cluster/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ func main() {
logrus.SetLevel(logrus.InfoLevel)
// Start a local cluster
err := cluster.StartWith([]gubernator.PeerInfo{
{GRPCAddress: "127.0.0.1:9090"},
{GRPCAddress: "127.0.0.1:9091"},
{GRPCAddress: "127.0.0.1:9092"},
{GRPCAddress: "127.0.0.1:9093"},
{GRPCAddress: "127.0.0.1:9094"},
{GRPCAddress: "127.0.0.1:9095"},
{GRPCAddress: "127.0.0.1:9990", HTTPAddress: "127.0.0.1:9980"},
{GRPCAddress: "127.0.0.1:9991", HTTPAddress: "127.0.0.1:9981"},
{GRPCAddress: "127.0.0.1:9992", HTTPAddress: "127.0.0.1:9982"},
{GRPCAddress: "127.0.0.1:9993", HTTPAddress: "127.0.0.1:9983"},
{GRPCAddress: "127.0.0.1:9994", HTTPAddress: "127.0.0.1:9984"},
{GRPCAddress: "127.0.0.1:9995", HTTPAddress: "127.0.0.1:9985"},
})
if err != nil {
fmt.Println(err)
panic(err)
}

fmt.Println("Ready")
fmt.Println("Running.....")

// Wait until we get a INT signal then shutdown the cluster
c := make(chan os.Signal, 1)
Expand Down
Loading

0 comments on commit e278860

Please sign in to comment.