Skip to content

Commit

Permalink
turn host off in config
Browse files Browse the repository at this point in the history
  • Loading branch information
jrapoport committed Jan 18, 2022
1 parent 11cc9b7 commit 8ecbb3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions config/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ type Network struct {
// Host is default adapter to listen on.
// default: localhost
Host string `json:"host"`
// HealthAddress is the address for the health check server.
// HealthAddress is the address for the health check server or "off" to disable.
// default: [Host]:7720
HealthAddress string `json:"health_address" yaml:"health_address" mapstructure:"health_address"`
// RPCAddress is the address for the gRPC server.
// RPCAddress is the address for the gRPC server or "off" to disable.
// default: [Host]:7721
RPCAddress string `json:"rpc_address" yaml:"rpc_address" mapstructure:"rpc_address"`
// AdminAddress is the address for the admin server.
// AdminAddress is the address for the admin server or "off" to disable.
// default: [Host]:7722
AdminAddress string `json:"admin_address" yaml:"admin_address" mapstructure:"admin_address"`
// HTTP is the address for the HTTP server.
// HTTP is the address for the HTTP server or "off" to disable.
// default: [Host]:7727
RESTAddress string `json:"rest_address" yaml:"rest_address" mapstructure:"rest_address"`
// RPCWebAddress is the address for the gRPC-Web server.
// RPCWebAddress is the address for the gRPC-Web server or "off" to disable.
// default: [Host]:7729
RPCWebAddress string `json:"rpcweb_address" yaml:"rpcweb_address" mapstructure:"rpcweb_address"`

Expand Down
2 changes: 1 addition & 1 deletion core/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var _ Hosted = (*Host)(nil)
// NewHost creates a new Host.
func NewHost(a *API, name, address string) *Host {
s := *NewServer(a, name)
if address == "" {
if address == "" || address == "off" {
s.Warnf("%s host is disabled", name)
}
return &Host{
Expand Down

0 comments on commit 8ecbb3c

Please sign in to comment.