Documentation
¶
Index ¶
- Constants
- Variables
- func Ptr[T any](v T) *T
- type DoltgesMetricsConfig
- type DoltgresAutoGCBehavior
- type DoltgresBehaviorConfig
- type DoltgresConfig
- func (cfg *DoltgresConfig) AllowCleartextPasswords() bool
- func (cfg *DoltgresConfig) AutoCommit() bool
- func (cfg *DoltgresConfig) AutoGCBehavior() servercfg.AutoGCBehavior
- func (cfg *DoltgresConfig) BranchControlFilePath() string
- func (cfg *DoltgresConfig) CfgDir() string
- func (cfg *DoltgresConfig) ClusterConfig() servercfg.ClusterConfig
- func (cfg *DoltgresConfig) DataDir() string
- func (cfg *DoltgresConfig) DisableClientMultiStatements() bool
- func (cfg *DoltgresConfig) DoltTransactionCommit() bool
- func (cfg *DoltgresConfig) EventSchedulerStatus() string
- func (cfg *DoltgresConfig) Host() string
- func (cfg *DoltgresConfig) JwksConfig() []servercfg.JwksConfig
- func (cfg *DoltgresConfig) LogFormat() servercfg.LogFormat
- func (cfg *DoltgresConfig) LogLevel() servercfg.LogLevel
- func (cfg *DoltgresConfig) MaxConnections() uint64
- func (cfg *DoltgresConfig) MaxLoggedQueryLen() int
- func (cfg *DoltgresConfig) MetricsHost() string
- func (cfg *DoltgresConfig) MetricsLabels() map[string]string
- func (cfg *DoltgresConfig) MetricsPort() int
- func (cfg *DoltgresConfig) Password() string
- func (cfg *DoltgresConfig) Port() int
- func (cfg *DoltgresConfig) PrivilegeFilePath() string
- func (cfg *DoltgresConfig) ReadOnly() bool
- func (cfg *DoltgresConfig) ReadTimeout() uint64
- func (cfg *DoltgresConfig) RemotesapiPort() *int
- func (cfg *DoltgresConfig) RemotesapiReadOnly() *bool
- func (cfg *DoltgresConfig) RequireSecureTransport() bool
- func (cfg *DoltgresConfig) ShouldEncodeLoggedQuery() bool
- func (cfg *DoltgresConfig) Socket() string
- func (cfg *DoltgresConfig) String() string
- func (cfg *DoltgresConfig) SystemVars() map[string]interface{}
- func (cfg *DoltgresConfig) TLSCert() string
- func (cfg *DoltgresConfig) TLSKey() string
- func (cfg *DoltgresConfig) ToSqlServerConfig() servercfg.ServerConfig
- func (cfg *DoltgresConfig) User() string
- func (cfg *DoltgresConfig) UserIsSpecified() bool
- func (cfg *DoltgresConfig) UserVars() []servercfg.UserSessionVars
- func (cfg *DoltgresConfig) ValueSet(value string) bool
- func (cfg *DoltgresConfig) WriteTimeout() uint64
- type DoltgresListenerConfig
- type DoltgresPerformanceConfig
- type DoltgresRemotesapiConfig
- type DoltgresUserConfig
- type DoltgresUserSessionVars
- type PostgresReplicationConfig
Constants ¶
View Source
const ( LogLevel_Trace = "trace" LogLevel_Debug = "debug" LogLevel_Info = "info" LogLevel_Warning = "warn" LogLevel_Error = "error" LogLevel_Fatal = "fatal" LogLevel_Panic = "panic" )
View Source
const ( DefaultHost = "localhost" DefaultPort = 5432 DefaultUser = "postgres" DefaultPass = "password" DefaultTimeout = 8 * 60 * 60 * 1000 // 8 hours, same as MySQL DefaultReadOnly = false DefaultLogLevel = LogLevel_Info DefaultDoltTransactionCommit = false DefaultMaxConnections = 100 DefaultDataDir = "." DefaultCfgDir = ".doltcfg" DefaultPrivilegeFilePath = "privileges.db" DefaultBranchControlFilePath = "branch_control.db" DefaultMetricsHost = "" DefaultMetricsPort = -1 DefaultAllowCleartextPasswords = false DefaultPostgresUnixSocketFilePath = "/tmp/.s.PGSQL.5432" DefaultMaxLoggedQueryLen = 0 DefaultEncodeLoggedQuery = false )
View Source
const DOLTGRES_DATA_DIR = "DOLTGRES_DATA_DIR"
DOLTGRES_DATA_DIR is an environment variable that defines the location of DoltgreSQL databases
View Source
const DOLTGRES_DATA_DIR_DEFAULT = "doltgres/databases"
DOLTGRES_DATA_DIR_DEFAULT is the portion to append to the user's home directory if DOLTGRES_DATA_DIR has not been specified
View Source
const (
OverrideDataDirKey = "data_dir"
)
Variables ¶
View Source
var ConfigHelp = "Supported fields in the config.yaml file, and their default values, " + "are as follows:\n\n" + DefaultServerConfig().String()
Functions ¶
Types ¶
type DoltgesMetricsConfig ¶
type DoltgresAutoGCBehavior ¶ added in v0.18.0
type DoltgresAutoGCBehavior struct {
}
Implements dolt servercfg.AutoGCBehavior.
func (DoltgresAutoGCBehavior) Enable ¶ added in v0.18.0
func (DoltgresAutoGCBehavior) Enable() bool
type DoltgresBehaviorConfig ¶
type DoltgresBehaviorConfig struct {
ReadOnly *bool `yaml:"read_only,omitempty" minver:"0.7.4"`
// Disable processing CLIENT_MULTI_STATEMENTS support on the
// sql server. Dolt's handling of CLIENT_MULTI_STATEMENTS is currently
// broken. If a client advertises to support it (mysql cli client
// does), and then sends statements that contain embedded unquoted ';'s
// (such as a CREATE TRIGGER), then those incoming queries will be
// misprocessed.
DisableClientMultiStatements *bool `yaml:"disable_client_multi_statements,omitempty" minver:"0.7.4"`
// DoltTransactionCommit enables the @@dolt_transaction_commit system variable, which
// automatically creates a Dolt commit when any SQL transaction is committed.
DoltTransactionCommit *bool `yaml:"dolt_transaction_commit,omitempty" minver:"0.7.4"`
}
BehaviorYAMLConfig contains server configuration regarding how the server should behave
type DoltgresConfig ¶
type DoltgresConfig struct {
LogLevelStr *string `yaml:"log_level,omitempty" minver:"0.7.4"`
MaxLenInLogs *int `yaml:"max_query_len_in_logs,omitempty" minver:"0.7.4"`
EncodeLoggedQuery *bool `yaml:"encode_logged_query,omitempty" minver:"0.7.4"`
BehaviorConfig *DoltgresBehaviorConfig `yaml:"behavior,omitempty" minver:"0.7.4"`
UserConfig *DoltgresUserConfig `yaml:"user,omitempty" minver:"0.7.4"`
ListenerConfig *DoltgresListenerConfig `yaml:"listener,omitempty" minver:"0.7.4"`
PerformanceConfig *DoltgresPerformanceConfig `yaml:"performance,omitempty" minver:"0.7.4"`
DataDirStr *string `yaml:"data_dir,omitempty" minver:"0.7.4"`
CfgDirStr *string `yaml:"cfg_dir,omitempty" minver:"0.7.4"`
MetricsConfig *DoltgesMetricsConfig `yaml:"metrics,omitempty" minver:"0.7.4"`
RemotesapiConfig *DoltgresRemotesapiConfig `yaml:"remotesapi,omitempty" minver:"0.7.4"`
PrivilegeFile *string `yaml:"privilege_file,omitempty" minver:"0.7.4"`
BranchControlFile *string `yaml:"branch_control_file,omitempty" minver:"0.7.4"`
// TODO: Rename to UserVars_
Vars []DoltgresUserSessionVars `yaml:"user_session_vars,omitempty" minver:"0.7.4"`
SystemVariables map[string]interface{} `yaml:"system_variables,omitempty" minver:"0.7.4"`
Jwks []servercfg.JwksConfig `yaml:"jwks,omitempty" minver:"0.7.4"`
GoldenMysqlConn *string `yaml:"golden_mysql_conn,omitempty" minver:"0.7.4"`
PostgresReplicationConfig *PostgresReplicationConfig `yaml:"postgres_replication,omitempty" minver:"0.7.4"`
}
func ConfigFromYamlData ¶
func ConfigFromYamlData(configFileData []byte) (*DoltgresConfig, error)
func DefaultServerConfig ¶ added in v0.9.0
func DefaultServerConfig() *DoltgresConfig
DefaultServerConfig creates a `*DoltgresConfig` that has all of the options set to their default values. Used when no config.yaml file is provided.
func ReadConfigFromYamlFile ¶
func ReadConfigFromYamlFile(fs filesys.Filesys, configFilePath string) (*DoltgresConfig, error)
func (*DoltgresConfig) AllowCleartextPasswords ¶
func (cfg *DoltgresConfig) AllowCleartextPasswords() bool
func (*DoltgresConfig) AutoCommit ¶
func (cfg *DoltgresConfig) AutoCommit() bool
func (*DoltgresConfig) AutoGCBehavior ¶ added in v0.18.0
func (cfg *DoltgresConfig) AutoGCBehavior() servercfg.AutoGCBehavior
func (*DoltgresConfig) BranchControlFilePath ¶
func (cfg *DoltgresConfig) BranchControlFilePath() string
func (*DoltgresConfig) CfgDir ¶
func (cfg *DoltgresConfig) CfgDir() string
func (*DoltgresConfig) ClusterConfig ¶
func (cfg *DoltgresConfig) ClusterConfig() servercfg.ClusterConfig
func (*DoltgresConfig) DataDir ¶
func (cfg *DoltgresConfig) DataDir() string
func (*DoltgresConfig) DisableClientMultiStatements ¶
func (cfg *DoltgresConfig) DisableClientMultiStatements() bool
func (*DoltgresConfig) DoltTransactionCommit ¶
func (cfg *DoltgresConfig) DoltTransactionCommit() bool
func (*DoltgresConfig) EventSchedulerStatus ¶
func (cfg *DoltgresConfig) EventSchedulerStatus() string
func (*DoltgresConfig) Host ¶
func (cfg *DoltgresConfig) Host() string
func (*DoltgresConfig) JwksConfig ¶
func (cfg *DoltgresConfig) JwksConfig() []servercfg.JwksConfig
func (*DoltgresConfig) LogFormat ¶ added in v0.18.0
func (cfg *DoltgresConfig) LogFormat() servercfg.LogFormat
func (*DoltgresConfig) LogLevel ¶
func (cfg *DoltgresConfig) LogLevel() servercfg.LogLevel
func (*DoltgresConfig) MaxConnections ¶
func (cfg *DoltgresConfig) MaxConnections() uint64
func (*DoltgresConfig) MaxLoggedQueryLen ¶
func (cfg *DoltgresConfig) MaxLoggedQueryLen() int
func (*DoltgresConfig) MetricsHost ¶
func (cfg *DoltgresConfig) MetricsHost() string
func (*DoltgresConfig) MetricsLabels ¶
func (cfg *DoltgresConfig) MetricsLabels() map[string]string
func (*DoltgresConfig) MetricsPort ¶
func (cfg *DoltgresConfig) MetricsPort() int
func (*DoltgresConfig) Password ¶
func (cfg *DoltgresConfig) Password() string
func (*DoltgresConfig) Port ¶
func (cfg *DoltgresConfig) Port() int
func (*DoltgresConfig) PrivilegeFilePath ¶
func (cfg *DoltgresConfig) PrivilegeFilePath() string
func (*DoltgresConfig) ReadOnly ¶
func (cfg *DoltgresConfig) ReadOnly() bool
func (*DoltgresConfig) ReadTimeout ¶
func (cfg *DoltgresConfig) ReadTimeout() uint64
func (*DoltgresConfig) RemotesapiPort ¶
func (cfg *DoltgresConfig) RemotesapiPort() *int
func (*DoltgresConfig) RemotesapiReadOnly ¶
func (cfg *DoltgresConfig) RemotesapiReadOnly() *bool
func (*DoltgresConfig) RequireSecureTransport ¶
func (cfg *DoltgresConfig) RequireSecureTransport() bool
func (*DoltgresConfig) ShouldEncodeLoggedQuery ¶
func (cfg *DoltgresConfig) ShouldEncodeLoggedQuery() bool
func (*DoltgresConfig) Socket ¶
func (cfg *DoltgresConfig) Socket() string
func (*DoltgresConfig) String ¶ added in v0.9.0
func (cfg *DoltgresConfig) String() string
func (*DoltgresConfig) SystemVars ¶
func (cfg *DoltgresConfig) SystemVars() map[string]interface{}
func (*DoltgresConfig) TLSCert ¶
func (cfg *DoltgresConfig) TLSCert() string
func (*DoltgresConfig) TLSKey ¶
func (cfg *DoltgresConfig) TLSKey() string
func (*DoltgresConfig) ToSqlServerConfig ¶
func (cfg *DoltgresConfig) ToSqlServerConfig() servercfg.ServerConfig
func (*DoltgresConfig) User ¶
func (cfg *DoltgresConfig) User() string
func (*DoltgresConfig) UserIsSpecified ¶ added in v0.17.0
func (cfg *DoltgresConfig) UserIsSpecified() bool
func (*DoltgresConfig) UserVars ¶
func (cfg *DoltgresConfig) UserVars() []servercfg.UserSessionVars
func (*DoltgresConfig) ValueSet ¶
func (cfg *DoltgresConfig) ValueSet(value string) bool
func (*DoltgresConfig) WriteTimeout ¶
func (cfg *DoltgresConfig) WriteTimeout() uint64
type DoltgresListenerConfig ¶
type DoltgresListenerConfig struct {
HostStr *string `yaml:"host,omitempty" minver:"0.7.4"`
PortNumber *int `yaml:"port,omitempty" minver:"0.7.4"`
ReadTimeoutMillis *uint64 `yaml:"read_timeout_millis,omitempty" minver:"0.7.4"`
WriteTimeoutMillis *uint64 `yaml:"write_timeout_millis,omitempty" minver:"0.7.4"`
// TLSKey is a file system path to an unencrypted private TLS key in PEM format.
TLSKey *string `yaml:"tls_key,omitempty" minver:"0.7.4"`
// TLSCert is a file system path to a TLS certificate chain in PEM format.
TLSCert *string `yaml:"tls_cert,omitempty" minver:"0.7.4"`
// RequireSecureTransport can enable a mode where non-TLS connections are turned away.
RequireSecureTransport *bool `yaml:"require_secure_transport,omitempty" minver:"0.7.4"`
// AllowCleartextPasswords enables use of cleartext passwords.
AllowCleartextPasswords *bool `yaml:"allow_cleartext_passwords,omitempty" minver:"0.7.4"`
// Socket is unix socket file path
Socket *string `yaml:"socket,omitempty" minver:"0.7.4"`
}
DoltgresListenerConfig contains information on the network connection that the server will open
type DoltgresPerformanceConfig ¶
type DoltgresPerformanceConfig struct {
QueryParallelism *int `yaml:"query_parallelism,omitempty" minver:"0.7.4"`
}
DoltgresPerformanceConfig contains configuration parameters for performance tweaking
type DoltgresUserConfig ¶
type DoltgresUserSessionVars ¶
type PostgresReplicationConfig ¶
type PostgresReplicationConfig struct {
PostgresServerAddress *string `yaml:"postgres_server_address,omitempty" minver:"0.7.4"`
PostgresUser *string `yaml:"postgres_user,omitempty" minver:"0.7.4"`
PostgresPassword *string `yaml:"postgres_password,omitempty" minver:"0.7.4"`
PostgresDatabase *string `yaml:"postgres_database,omitempty" minver:"0.7.4"`
PostgresPort *int `yaml:"postgres_port,omitempty" minver:"0.7.4"`
SlotName *string `yaml:"slot_name,omitempty" minver:"0.7.4"`
}
Click to show internal directories.
Click to hide internal directories.