Documentation ¶
Index ¶
- Constants
- func FromCluster(cluster *v1alpha1.GreptimeDBCluster, componentKind v1alpha1.ComponentKind) ([]byte, error)
- func FromStandalone(standalone *v1alpha1.GreptimeDBStandalone) ([]byte, error)
- func Marshal(config Config) ([]byte, error)
- type Config
- type DatanodeConfig
- func (c *DatanodeConfig) ConfigureByCluster(cluster *v1alpha1.GreptimeDBCluster) error
- func (c *DatanodeConfig) ConfigureByStandalone(_ *v1alpha1.GreptimeDBStandalone) error
- func (c *DatanodeConfig) GetInputConfig() string
- func (c *DatanodeConfig) Kind() v1alpha1.ComponentKind
- func (c *DatanodeConfig) SetInputConfig(input string) error
- type FrontendConfig
- func (c *FrontendConfig) ConfigureByCluster(cluster *v1alpha1.GreptimeDBCluster) error
- func (c *FrontendConfig) ConfigureByStandalone(_ *v1alpha1.GreptimeDBStandalone) error
- func (c *FrontendConfig) GetInputConfig() string
- func (c *FrontendConfig) Kind() v1alpha1.ComponentKind
- func (c *FrontendConfig) SetInputConfig(inputConfig string) error
- type MetasrvConfig
- func (c *MetasrvConfig) ConfigureByCluster(cluster *v1alpha1.GreptimeDBCluster) error
- func (c *MetasrvConfig) ConfigureByStandalone(_ *v1alpha1.GreptimeDBStandalone) error
- func (c *MetasrvConfig) GetInputConfig() string
- func (c *MetasrvConfig) Kind() v1alpha1.ComponentKind
- func (c *MetasrvConfig) SetInputConfig(inputConfig string) error
- type StandaloneConfig
- func (c *StandaloneConfig) ConfigureByCluster(cluster *v1alpha1.GreptimeDBCluster) error
- func (c *StandaloneConfig) ConfigureByStandalone(standalone *v1alpha1.GreptimeDBStandalone) error
- func (c *StandaloneConfig) GetInputConfig() string
- func (c *StandaloneConfig) Kind() v1alpha1.ComponentKind
- func (c *StandaloneConfig) SetInputConfig(inputConfig string) error
Constants ¶
const ( AccessKeyIDSecretKey = "access-key-id" SecretAccessKeySecretKey = "secret-access-key" )
const (
TOMLMappingFieldTag = "tomlmapping"
)
Variables ¶
This section is empty.
Functions ¶
func FromCluster ¶
func FromCluster(cluster *v1alpha1.GreptimeDBCluster, componentKind v1alpha1.ComponentKind) ([]byte, error)
FromCluster creates config data from the cluster CRD.
func FromStandalone ¶
func FromStandalone(standalone *v1alpha1.GreptimeDBStandalone) ([]byte, error)
FromStandalone creates config data from the standalone CRD.
Types ¶
type Config ¶
type Config interface { // Kind returns the component kind of the config. Kind() v1alpha1.ComponentKind // ConfigureByCluster configures the config by the given cluster. ConfigureByCluster(cluster *v1alpha1.GreptimeDBCluster) error // ConfigureByStandalone configures the config by the given standalone. ConfigureByStandalone(standalone *v1alpha1.GreptimeDBStandalone) error // GetInputConfig returns the input config. GetInputConfig() string // SetInputConfig sets the input config. SetInputConfig(input string) error }
Config is the interface for the config of greptimedb.
func NewFromComponentKind ¶
func NewFromComponentKind(kind v1alpha1.ComponentKind) (Config, error)
NewFromComponentKind creates config from the component kind.
type DatanodeConfig ¶
type DatanodeConfig struct { NodeID *uint64 `tomlmapping:"node_id"` RPCAddr *string `tomlmapping:"rpc_addr"` RPCHostName *string `tomlmapping:"rpc_hostname"` // Storage options. StorageType *string `tomlmapping:"storage.type"` StorageDataHome *string `tomlmapping:"storage.data_home"` StorageAccessKeyID *string `tomlmapping:"storage.access_key_id"` StorageSecretAccessKey *string `tomlmapping:"storage.secret_access_key"` StorageAccessKeySecret *string `tomlmapping:"storage.access_key_secret"` StorageBucket *string `tomlmapping:"storage.bucket"` StorageRoot *string `tomlmapping:"storage.root"` StorageRegion *string `tomlmapping:"storage.region"` StorageEndpoint *string `tomlmapping:"storage.endpoint"` // The wal file directory. WalDir *string `tomlmapping:"wal.dir"` // The wal provider. WalProvider *string `tomlmapping:"wal.provider"` // The kafka broker endpoints. WalBrokerEndpoints []string `tomlmapping:"wal.broker_endpoints"` // InputConfig is from config field of cluster spec. InputConfig string }
DatanodeConfig is the configuration for the datanode.
func (*DatanodeConfig) ConfigureByCluster ¶
func (c *DatanodeConfig) ConfigureByCluster(cluster *v1alpha1.GreptimeDBCluster) error
ConfigureByCluster configures the datanode config by the given cluster.
func (*DatanodeConfig) ConfigureByStandalone ¶
func (c *DatanodeConfig) ConfigureByStandalone(_ *v1alpha1.GreptimeDBStandalone) error
ConfigureByStandalone is not need to implement in cluster mode.
func (*DatanodeConfig) GetInputConfig ¶
func (c *DatanodeConfig) GetInputConfig() string
GetInputConfig returns the input config.
func (*DatanodeConfig) Kind ¶
func (c *DatanodeConfig) Kind() v1alpha1.ComponentKind
Kind returns the component kind of the datanode.
func (*DatanodeConfig) SetInputConfig ¶
func (c *DatanodeConfig) SetInputConfig(input string) error
SetInputConfig sets the input config.
type FrontendConfig ¶
type FrontendConfig struct { // InputConfig is from config field of cluster spec. InputConfig string }
FrontendConfig is the configuration for the frontend.
func (*FrontendConfig) ConfigureByCluster ¶
func (c *FrontendConfig) ConfigureByCluster(cluster *v1alpha1.GreptimeDBCluster) error
ConfigureByCluster configures the frontend configuration by the given cluster.
func (*FrontendConfig) ConfigureByStandalone ¶
func (c *FrontendConfig) ConfigureByStandalone(_ *v1alpha1.GreptimeDBStandalone) error
ConfigureByStandalone is not need to implement in cluster mode.
func (*FrontendConfig) GetInputConfig ¶
func (c *FrontendConfig) GetInputConfig() string
GetInputConfig returns the input config of the frontend.
func (*FrontendConfig) Kind ¶
func (c *FrontendConfig) Kind() v1alpha1.ComponentKind
Kind returns the component kind of the frontend.
func (*FrontendConfig) SetInputConfig ¶
func (c *FrontendConfig) SetInputConfig(inputConfig string) error
SetInputConfig sets the input config of the frontend.
type MetasrvConfig ¶
type MetasrvConfig struct { // Enable region failover. EnableRegionFailover *bool `tomlmapping:"enable_region_failover"` // If it's not empty, the metasrv will store all data with this key prefix. StoreKeyPrefix *string `tomlmapping:"store_key_prefix"` // The wal provider. WalProvider *string `tomlmapping:"wal.provider"` // The kafka broker endpoints. WalBrokerEndpoints []string `tomlmapping:"wal.broker_endpoints"` // InputConfig is from config field of cluster spec. InputConfig string }
MetasrvConfig is the configuration for the metasrv.
func (*MetasrvConfig) ConfigureByCluster ¶
func (c *MetasrvConfig) ConfigureByCluster(cluster *v1alpha1.GreptimeDBCluster) error
ConfigureByCluster configures the metasrv config by the given cluster.
func (*MetasrvConfig) ConfigureByStandalone ¶
func (c *MetasrvConfig) ConfigureByStandalone(_ *v1alpha1.GreptimeDBStandalone) error
ConfigureByStandalone is not need to implement in cluster mode.
func (*MetasrvConfig) GetInputConfig ¶
func (c *MetasrvConfig) GetInputConfig() string
GetInputConfig returns the input config of the metasrv.
func (*MetasrvConfig) Kind ¶
func (c *MetasrvConfig) Kind() v1alpha1.ComponentKind
Kind returns the component kind of the metasrv.
func (*MetasrvConfig) SetInputConfig ¶
func (c *MetasrvConfig) SetInputConfig(inputConfig string) error
SetInputConfig sets the input config of the metasrv.
type StandaloneConfig ¶
type StandaloneConfig struct { // Storage options. StorageType *string `tomlmapping:"storage.type"` StorageDataHome *string `tomlmapping:"storage.data_home"` StorageAccessKeyID *string `tomlmapping:"storage.access_key_id"` StorageSecretAccessKey *string `tomlmapping:"storage.secret_access_key"` StorageAccessKeySecret *string `tomlmapping:"storage.access_key_secret"` StorageBucket *string `tomlmapping:"storage.bucket"` StorageRoot *string `tomlmapping:"storage.root"` StorageRegion *string `tomlmapping:"storage.region"` StorageEndpoint *string `tomlmapping:"storage.endpoint"` WalDir *string `tomlmapping:"wal.dir"` // InputConfig is from config field of cluster spec. InputConfig string }
StandaloneConfig is the configuration for the frontend.
func (*StandaloneConfig) ConfigureByCluster ¶
func (c *StandaloneConfig) ConfigureByCluster(cluster *v1alpha1.GreptimeDBCluster) error
ConfigureByCluster is not need to implement in standalone mode.
func (*StandaloneConfig) ConfigureByStandalone ¶
func (c *StandaloneConfig) ConfigureByStandalone(standalone *v1alpha1.GreptimeDBStandalone) error
ConfigureByStandalone is not need to implement in cluster mode.
func (*StandaloneConfig) GetInputConfig ¶
func (c *StandaloneConfig) GetInputConfig() string
GetInputConfig returns the input config of the standalone.
func (*StandaloneConfig) Kind ¶
func (c *StandaloneConfig) Kind() v1alpha1.ComponentKind
Kind returns the component kind of the standalone.
func (*StandaloneConfig) SetInputConfig ¶
func (c *StandaloneConfig) SetInputConfig(inputConfig string) error
SetInputConfig sets the input config of the standalone.