make cluster id configurable
This commit is contained in:
@@ -20,7 +20,7 @@ func DefaultConfig() *config.Config {
|
||||
},
|
||||
Events: config.Events{
|
||||
Endpoint: "127.0.0.1:9233",
|
||||
Cluster: "test-cluster",
|
||||
Cluster: "ocis-cluster",
|
||||
ConsumerGroup: "audit",
|
||||
},
|
||||
Auditlog: config.Auditlog{
|
||||
|
||||
@@ -41,7 +41,7 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
[]nats.NatsOption{
|
||||
nats.Host(cfg.Nats.Host),
|
||||
nats.Port(cfg.Nats.Port),
|
||||
nats.ClusterID("ocis-cluster"),
|
||||
nats.ClusterID(cfg.Nats.ClusterID),
|
||||
},
|
||||
[]nats.JetStreamOption{
|
||||
nats.JetStreamStoreDir(cfg.Nats.StoreDir),
|
||||
|
||||
@@ -22,7 +22,8 @@ type Config struct {
|
||||
|
||||
// Nats is the nats config
|
||||
type Nats struct {
|
||||
Host string `ocisConfig:"host" env:"NATS_NATS_HOST"`
|
||||
Port int `ocisConfig:"port" env:"NATS_NATS_PORT"`
|
||||
StoreDir string `ocisConfig:"store_dir" env:"NATS_NATS_STORE_DIR"`
|
||||
Host string `ocisConfig:"host" env:"NATS_NATS_HOST"`
|
||||
Port int `ocisConfig:"port" env:"NATS_NATS_PORT"`
|
||||
ClusterID string `ocisConfig:"clusterid" env:"NATS_NATS_CLUSTER_ID"`
|
||||
StoreDir string `ocisConfig:"store_dir" env:"NATS_NATS_STORE_DIR"`
|
||||
}
|
||||
|
||||
@@ -25,9 +25,10 @@ func DefaultConfig() *config.Config {
|
||||
Name: "nats",
|
||||
},
|
||||
Nats: config.Nats{
|
||||
Host: "127.0.0.1",
|
||||
Port: 9233,
|
||||
StoreDir: path.Join(defaults.BaseDataPath(), "nats"),
|
||||
Host: "127.0.0.1",
|
||||
Port: 9233,
|
||||
ClusterID: "ocis-cluster",
|
||||
StoreDir: path.Join(defaults.BaseDataPath(), "nats"),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ func DefaultConfig() *config.Config {
|
||||
},
|
||||
Events: config.Events{
|
||||
Endpoint: "127.0.0.1:9233",
|
||||
Cluster: "test-cluster",
|
||||
Cluster: "ocis-cluster",
|
||||
ConsumerGroup: "notifications",
|
||||
},
|
||||
RevaGateway: "127.0.0.1:9142",
|
||||
|
||||
Reference in New Issue
Block a user