Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct {
Backend BackendConfig
Postgres PostgresDBConfig
Sqlite SqliteConfig
// Boundaries []Boundary `mapstructure:"boundaries"`
Boundaries string
Grpc struct {
Port string
EnableReflection bool
ConnectionTimeout time.Duration
KeepAliveTime time.Duration
KeepAliveTimeout time.Duration
MaxConcurrentStreams uint32
MaxReceiveMessageSize int
MaxSendMessageSize int
InitialWindowSize int32
InitialConnWindowSize int32
WriteBufferSize int
ReadBufferSize int
KeepaliveMinTime time.Duration
KeepalivePermitWithoutStream bool
TLS struct {
Enabled bool
CertFile string
KeyFile string
CAFile string
ClientAuthRequired bool
}
}
PollingPublisher struct {
BatchSize uint32
}
Logging LoggingConfig
Nats NatsConfig
// Prod bool
Auth struct {
AdminUsername string
AdminPassword string
}
Admin AdminConfig
Pprof struct {
Enabled bool
Port string
}
OpenTelemetry struct {
Enabled bool
Endpoint string
ServiceName string
}
// contains filtered or unexported fields
}
AppConfig represents the application configuration
func InitializeConfig ¶
func InitializeConfig() AppConfig
func LoadConfig ¶
func (*AppConfig) BackendType ¶ added in v0.2.7
BackendType returns the configured backend, defaulting to "postgres" if unset.
func (*AppConfig) GetBoundaries ¶
func (*AppConfig) GetBoundaryNames ¶
func (*AppConfig) ParseBoundaries ¶
type BackendConfig ¶ added in v0.2.7
type BackendConfig struct {
Type string
}
BackendConfig selects the storage driver. Values: "postgres" (default) or "sqlite".
type LoggingConfig ¶
type NatsClusterConfig ¶
type NatsClusterConfig struct {
Name string
Host string
Port int
Routes string
Username string
Password string
Enabled bool
Timeout time.Duration
}
func (*NatsClusterConfig) GetRoutes ¶
func (c *NatsClusterConfig) GetRoutes() []string
type NatsConfig ¶
type NatsConfig struct {
URL string
ServerName string
Port int
MaxPayload int32
MaxConnections int
StoreDir string
EventStreamMaxBytes int64
EventStreamMaxMsgs int64
EventStreamMaxAge time.Duration
PublishAsyncMaxPending int
Cluster NatsClusterConfig
}
nats
type PostgresDBConfig ¶
type PostgresDBConfig struct {
User string
Name string
Password string
Host string
Port string
Schemas string
SSLMode string
// Write pool configuration (optimized for write operations)
WriteMaxOpenConns int
WriteMaxIdleConns int
WriteConnMaxIdleTime time.Duration
WriteConnMaxLifetime time.Duration
// Read pool configuration (optimized for read operations)
ReadMaxOpenConns int
ReadMaxIdleConns int
ReadConnMaxIdleTime time.Duration
ReadConnMaxLifetime time.Duration
// AdminConfig pool configuration (optimized for admin operations)
AdminMaxOpenConns int
AdminMaxIdleConns int
AdminConnMaxIdleTime time.Duration
AdminConnMaxLifetime time.Duration
ListenEnabled bool
}
postgres
func (*PostgresDBConfig) GetSchemaMapping ¶
func (p *PostgresDBConfig) GetSchemaMapping() map[string]BoundaryToPostgresSchemaMapping
type SqliteConfig ¶ added in v0.2.7
type SqliteConfig struct {
Dir string
Synchronous string
BusyTimeoutMs int
ReadPoolSize int
CacheSize int
MmapSize int64
WalAutoCheckpoint int
TempStore string
}
SqliteConfig holds settings for the embedded SQLite backend. Each boundary gets its own file at {Dir}/{boundary}.db.
Click to show internal directories.
Click to hide internal directories.