mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
commit
01bd0d468d
@ -323,7 +323,8 @@ type Config struct {
|
|||||||
loggerCore zapcore.Core
|
loggerCore zapcore.Core
|
||||||
loggerWriteSyncer zapcore.WriteSyncer
|
loggerWriteSyncer zapcore.WriteSyncer
|
||||||
|
|
||||||
// EnableGRPCGateway is false to disable grpc gateway.
|
// EnableGRPCGateway enables grpc gateway.
|
||||||
|
// The gateway translates a RESTful HTTP API into gRPC.
|
||||||
EnableGRPCGateway bool `json:"enable-grpc-gateway"`
|
EnableGRPCGateway bool `json:"enable-grpc-gateway"`
|
||||||
|
|
||||||
// UnsafeNoFsync disables all uses of fsync.
|
// UnsafeNoFsync disables all uses of fsync.
|
||||||
@ -411,6 +412,7 @@ func NewConfig() *Config {
|
|||||||
Logger: "zap",
|
Logger: "zap",
|
||||||
LogOutputs: []string{DefaultLogOutput},
|
LogOutputs: []string{DefaultLogOutput},
|
||||||
LogLevel: logutil.DefaultLogLevel,
|
LogLevel: logutil.DefaultLogLevel,
|
||||||
|
EnableGRPCGateway: true,
|
||||||
}
|
}
|
||||||
cfg.InitialCluster = cfg.InitialClusterFromName(cfg.Name)
|
cfg.InitialCluster = cfg.InitialClusterFromName(cfg.Name)
|
||||||
return cfg
|
return cfg
|
||||||
|
@ -243,7 +243,7 @@ func newConfig() *config {
|
|||||||
fs.UintVar(&cfg.ec.AuthTokenTTL, "auth-token-ttl", cfg.ec.AuthTokenTTL, "The lifetime in seconds of the auth token.")
|
fs.UintVar(&cfg.ec.AuthTokenTTL, "auth-token-ttl", cfg.ec.AuthTokenTTL, "The lifetime in seconds of the auth token.")
|
||||||
|
|
||||||
// gateway
|
// gateway
|
||||||
fs.BoolVar(&cfg.ec.EnableGRPCGateway, "enable-grpc-gateway", true, "Enable GRPC gateway.")
|
fs.BoolVar(&cfg.ec.EnableGRPCGateway, "enable-grpc-gateway", cfg.ec.EnableGRPCGateway, "Enable GRPC gateway.")
|
||||||
|
|
||||||
// experimental
|
// experimental
|
||||||
fs.BoolVar(&cfg.ec.ExperimentalInitialCorruptCheck, "experimental-initial-corrupt-check", cfg.ec.ExperimentalInitialCorruptCheck, "Enable to check data corruption before serving any client/peer traffic.")
|
fs.BoolVar(&cfg.ec.ExperimentalInitialCorruptCheck, "experimental-initial-corrupt-check", cfg.ec.ExperimentalInitialCorruptCheck, "Enable to check data corruption before serving any client/peer traffic.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user