func()

in gdbclient/settings.go [66:94]


func (s *Settings) init() {
	if s.Host == "" {
		s.Host = "localhost"
	}
	if s.Port == 0 {
		s.Port = 8182
	}
	if s.PoolSize == 0 {
		s.PoolSize = 8
	}
	if s.PingInterval == 0 {
		s.PingInterval = 1 * time.Minute
	}
	if s.MaxConcurrentRequest == 0 {
		s.MaxConcurrentRequest = 4
	}
	if s.WriteTimeout == 0 {
		s.WriteTimeout = 5 * time.Second
	}
	if s.ReadTimeout == 0 {
		s.ReadTimeout = 31 * time.Second
	}
	if s.PoolTimeout == 0 {
		s.PoolTimeout = s.ReadTimeout + 1
	}
	if s.AliveCheckInterval == 0 {
		s.AliveCheckInterval = 1 * time.Minute
	}
}