config

package
v0.0.0-...-c32fcf5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2025 License: Apache-2.0 Imports: 7 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataMeshConfig

type DataMeshConfig struct {
	RootDir        string
	ListenAddr     string // default is empty
	HTTPPort       int32
	GRPCPort       int32
	Debug          bool
	ConnectTimeOut int
	ReadTimeout    int
	WriteTimeout   int
	IdleTimeout    int
	Initiator      string
	FlagSet        *pflag.FlagSet
	DomainKey      *rsa.PrivateKey
	TLS            config.TLSServerConfig
	KusciaClient   kusciaclientset.Interface
	KubeClient     kubernetes.Interface
	KubeNamespace  string
	DisableTLS     bool              `yaml:"disableTLS,omitempty"`
	DataProxyList  []DataProxyConfig `yaml:"dataProxyList,omitempty"`
	InterceptorLog *nlog.NLog        `yaml:"-"`
}

func NewDefaultDataMeshConfig

func NewDefaultDataMeshConfig() *DataMeshConfig

type DataProxyConfig

type DataProxyConfig struct {
	Endpoint        string                  `yaml:"endpoint,omitempty"`
	ClientTLSConfig *kusciaconfig.TLSConfig `yaml:"clientTLSConfig,omitempty"`
	// DatasourceTypes claims which dataSources proxy by this dataProxy, empty means all types that builtin dataProxy unsupported
	DataSourceTypes []string `yaml:"dataSourceTypes,omitempty"`
	// io mode type: proxy(app --> datamesh --> datasource) or direct(app --> datasource)
	Mode string `yaml:"mode,omitempty"`
}

type DataProxyMode

type DataProxyMode string
const (
	ModeDirect DataProxyMode = "direct"
	ModeProxy  DataProxyMode = "proxy"
)

type DbConfig

type DbConfig struct {
	Type       string            `mapstructure:"type"`
	TableAlias DbTableAlias      `mapstructure:"table_alias"`
	Sqlite     SqliteStoreConfig `mapstructure:"sqlite"`
	Mysql      MysqlStoreConfig  `mapstructure:"mysql"`
}

type DbTableAlias

type DbTableAlias struct {
	DataTable  string `mapstructure:"data_table"`
	DataSource string `mapstructure:"data_source"`
	DataObject string `mapstructure:"data_object"`
}

type MysqlStoreConfig

type MysqlStoreConfig struct {
	//user:password@tcp(127.0.0.1:port)/dbname?charset=utf8mb4&parseTime=True&loc=Local
	Dsn string `mapstructure:"dsn"`
}

type SqliteStoreConfig

type SqliteStoreConfig struct {
	Dsn                string `mapstructure:"dsn"`
	AutoCreateDisable  bool   `mapstructure:"auto_create_disable"`
	AutoMigrateDisable bool   `mapstructure:"auto_migrate_disable"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL