-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add synapse to configureNerve command
- Loading branch information
Showing
5 changed files
with
152 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
package nerve | ||
|
||
type Config struct { | ||
InstanceId string `json:"instance_id"` | ||
InstanceId string `json:"instance_id" yaml"instance_id"` | ||
Services []Service `json:"services"` | ||
} | ||
|
||
type Service struct { | ||
Host string `json:"host"` | ||
Port int `json:"port"` | ||
ReporterType string `json:"reporter_type"` | ||
ZkHosts []string `json:"zk_hosts"` | ||
ZkPath string `json:"zk_path"` | ||
CheckInterval int `json:"check_interval"` | ||
ReporterType string `json:"reporter_type" yaml:"reporter_type"` | ||
ZkHosts []string `json:"zk_hosts" yaml:"zk_hosts"` | ||
ZkPath string `json:"zk_path" yaml:"zk_path"` | ||
CheckInterval int `json:"check_interval" yaml:"check_interval"` | ||
Checks []map[string]interface{} `json:"checks"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package synapse | ||
|
||
type Config map[string]interface{} | ||
|
||
type Service struct { | ||
DefaultServers []Server `json:"default_servers" yaml:"default_servers"` | ||
Discovery Discovery `json:"discovery"` | ||
HAProxy HAProxyInfo `json:"haproxy" yaml:"haproxy"` | ||
} | ||
|
||
type Server struct { | ||
Name string `json:"name"` | ||
Host string `json:"host"` | ||
Port int `json:"port"` | ||
} | ||
|
||
type Discovery struct { | ||
Method string `json:"method"` | ||
Path string `json:"path"` | ||
Hosts []string `json:"hosts"` | ||
} | ||
|
||
type HAProxyInfo struct { | ||
Port int `json:"port"` | ||
ServerOptions string `json:"server_options" yaml:"server_options"` | ||
Listen []string `json:"listen"` | ||
} |