func NewDefaultInfoRetrieverConfig() *InfoRetrieverConfig {
	return &InfoRetrieverConfig{
		Region: "",
	}
}
NewDefaultInfoRetrieverConfig provides default configuration for InfoRetriever
package config
import (
	"fmt"
	"time"
	"github.com/topfreegames/pitaya/v2/metrics/models"
)
type PitayaConfig struct {
	Heartbeat struct {
		Interval time.Duration
	}
	Handler struct {
		Messages struct {
			Compression bool
		}
	}
	Buffer struct {
		Agent struct {
			Messages int
		}
		Handler struct {
			LocalProcess  int
			RemoteProcess int
		}
	}
	Concurrency struct {
		Handler struct {
			Dispatch int
		}
	}
	Session struct {
		Unique bool
	}
	Metrics struct {
		Period time.Duration
	}
}
func NewDefaultPitayaConfig() *PitayaConfig {
	return &PitayaConfig{
		Heartbeat: struct{ Interval time.Duration }{
			Interval: time.Duration(30 * time.Second),
		},
		Handler: struct {
			Messages struct {
				Compression bool
			}
		}{
			Messages: struct {
				Compression bool
			}{
				Compression: true,
			},
		},
		Buffer: struct {
			Agent struct {
				Messages int
			}
			Handler struct {
				LocalProcess  int
				RemoteProcess int
			}
		}{
			Agent: struct {
				Messages int
			}{
				Messages: 100,
			},
			Handler: struct {
				LocalProcess  int
				RemoteProcess int
			}{
				LocalProcess:  20,
				RemoteProcess: 20,
			},
		},
		Concurrency: struct {
			Handler struct {
				Dispatch int
			}
		}{
			Handler: struct {
				Dispatch int
			}{
				Dispatch: 25,
			},
		},
		Session: struct {
			Unique bool
		}{
			Unique: true,
		},
		Metrics: struct {
			Period time.Duration
		}{
			Period: time.Duration(15 * time.Second),
		},
	}
}
func NewPitayaConfig(config *Config) *PitayaConfig {
	conf := NewDefaultPitayaConfig()
	if err := config.UnmarshalKey("pitaya", &conf); err != nil {
		panic(err)
	}
	return conf
}
type BuilderConfig struct {
	Pitaya  PitayaConfig
	Metrics struct {
		Prometheus struct {
			Enabled bool
		}
		Statsd struct {
			Enabled bool
		}
	}
	DefaultPipelines struct {
		StructValidation struct {
			Enabled bool
		}
	}
}
func NewDefaultBuilderConfig() *BuilderConfig {
	return &BuilderConfig{
		Pitaya: *NewDefaultPitayaConfig(),
		Metrics: struct {
			Prometheus struct {
				Enabled bool
			}
			Statsd struct {
				Enabled bool
			}
		}{
			Prometheus: struct {
				Enabled bool
			}{
				Enabled: false,
			},
			Statsd: struct {
				Enabled bool
			}{
				Enabled: false,
			},
		},
		DefaultPipelines: struct {
			StructValidation struct {
				Enabled bool
			}
		}{
			StructValidation: struct {
				Enabled bool
			}{
				Enabled: false,
			},
		},
	}
}
func NewBuilderConfig(config *Config) *BuilderConfig {
	conf := NewDefaultBuilderConfig()
	if err := config.Unmarshal(&conf); err != nil {
		panic(err)
	}
	fmt.Println(conf)
	return conf
}
type GRPCClientConfig struct {
	DialTimeout    time.Duration
	LazyConnection bool
	RequestTimeout time.Duration
}
func NewDefaultGRPCClientConfig() *GRPCClientConfig {
	return &GRPCClientConfig{
		DialTimeout:    time.Duration(5 * time.Second),
		LazyConnection: false,
		RequestTimeout: time.Duration(5 * time.Second),
	}
}
func NewGRPCClientConfig(config *Config) *GRPCClientConfig {
	conf := NewDefaultGRPCClientConfig()
	if err := config.UnmarshalKey("pitaya.cluster.rpc.client.grpc", &conf); err != nil {
		panic(err)
	}
	return conf
}
type GRPCServerConfig struct {
	Port int
}
func NewDefaultGRPCServerConfig() *GRPCServerConfig {
	return &GRPCServerConfig{
		Port: 3434,
	}
}
func NewGRPCServerConfig(config *Config) *GRPCServerConfig {
	return &GRPCServerConfig{
		Port: config.GetInt("pitaya.cluster.rpc.server.grpc.port"),
	}
}
type NatsRPCClientConfig struct {
	Connect                string
	MaxReconnectionRetries int
	RequestTimeout         time.Duration
	ConnectionTimeout      time.Duration
}
func NewDefaultNatsRPCClientConfig() *NatsRPCClientConfig {
	return &NatsRPCClientConfig{
		Connect:                "nats://localhost:4222",
		MaxReconnectionRetries: 15,
		RequestTimeout:         time.Duration(5 * time.Second),
		ConnectionTimeout:      time.Duration(2 * time.Second),
	}
}
func NewNatsRPCClientConfig(config *Config) *NatsRPCClientConfig {
	conf := NewDefaultNatsRPCClientConfig()
	if err := config.UnmarshalKey("pitaya.cluster.rpc.client.nats", &conf); err != nil {
		panic(err)
	}
	return conf
}
type NatsRPCServerConfig struct {
	Connect                string
	MaxReconnectionRetries int
	Buffer                 struct {
		Messages int
		Push     int
	}
	Services          int
	ConnectionTimeout time.Duration
}
func NewDefaultNatsRPCServerConfig() *NatsRPCServerConfig {
	return &NatsRPCServerConfig{
		Connect:                "nats://localhost:4222",
		MaxReconnectionRetries: 15,
		Buffer: struct {
			Messages int
			Push     int
		}{
			Messages: 75,
			Push:     100,
		},
		Services:          30,
		ConnectionTimeout: time.Duration(2 * time.Second),
	}
}
func NewNatsRPCServerConfig(config *Config) *NatsRPCServerConfig {
	conf := NewDefaultNatsRPCServerConfig()
	if err := config.UnmarshalKey("pitaya.cluster.rpc.server.nats", &conf); err != nil {
		panic(err)
	}
	return conf
}
type InfoRetrieverConfig struct {
	Region string
}