Documentation ¶
Index ¶
- Constants
- Variables
- func AddCkClusterConfigVersion()
- func ConvertZooPath(conf *model.CKManClickHouseConfig) []string
- func DropTableIfExists(params model.CreateCkTableParams, ck *CkService)
- func GetCkClusterConfig(conf *model.CKManClickHouseConfig) error
- func GetCkClusterStatus(conf *model.CKManClickHouseConfig) []model.CkClusterNode
- func GetCkOpenSessions(conf *model.CKManClickHouseConfig, limit int) ([]*model.CkSessionInfo, error)
- func GetCkSlowSessions(conf *model.CKManClickHouseConfig, limit int) ([]*model.CkSessionInfo, error)
- func GetCkTableMetrics(conf *model.CKManClickHouseConfig) (map[string]*model.CkTableMetrics, error)
- func GetReplicaZkPath(conf *model.CKManClickHouseConfig) error
- func MarshalClusters() ([]byte, error)
- func ParseCkClusterConfigFile() error
- func ReadClusterConfigFile() ([]byte, error)
- func UnmarshalClusters(data []byte) (map[string]interface{}, error)
- func UpdateCkClusterConfigFile() error
- func UpdateLocalCkClusterConfig(data []byte) (updated bool, err error)
- func WriteClusterConfigFile(data []byte) error
- type CkService
- func (ck *CkService) AlterTable(params *model.AlterCkTableParams) error
- func (ck *CkService) CreateTable(params *model.CreateCkTableParams) error
- func (ck *CkService) DeleteTable(conf *model.CKManClickHouseConfig, params *model.DeleteCkTableParams) error
- func (ck *CkService) DescTable(params *model.DescCkTableParams) ([]model.CkColumnAttribute, error)
- func (ck *CkService) FetchSchemerFromOtherNode(host string) error
- func (ck *CkService) InitCkService() error
- func (ck *CkService) QueryInfo(query string) ([][]interface{}, error)
Constants ¶
View Source
const ( ClickHouseDistributedTablePrefix string = "dist_" ClickHouseQueryStart string = "QueryStart" ClickHouseQueryFinish string = "QueryFinish" ClickHouseQueryExStart string = "ExceptionBeforeStart" ClickHouseQueryExProcessing string = "ExceptionWhileProcessing" ClickHouseConfigVersionKey string = "ck_cluster_config_version" ClickHouseClustersFile string = "clusters.json" ClickHouseServiceTimeout int = 3600 )
Variables ¶
View Source
var CkClusters sync.Map
Functions ¶
func AddCkClusterConfigVersion ¶
func AddCkClusterConfigVersion()
func ConvertZooPath ¶ added in v1.3.1
func ConvertZooPath(conf *model.CKManClickHouseConfig) []string
func DropTableIfExists ¶ added in v1.3.4
func DropTableIfExists(params model.CreateCkTableParams, ck *CkService)
func GetCkClusterConfig ¶
func GetCkClusterConfig(conf *model.CKManClickHouseConfig) error
func GetCkClusterStatus ¶
func GetCkClusterStatus(conf *model.CKManClickHouseConfig) []model.CkClusterNode
func GetCkOpenSessions ¶
func GetCkOpenSessions(conf *model.CKManClickHouseConfig, limit int) ([]*model.CkSessionInfo, error)
func GetCkSlowSessions ¶
func GetCkSlowSessions(conf *model.CKManClickHouseConfig, limit int) ([]*model.CkSessionInfo, error)
func GetCkTableMetrics ¶
func GetCkTableMetrics(conf *model.CKManClickHouseConfig) (map[string]*model.CkTableMetrics, error)
func GetReplicaZkPath ¶ added in v1.3.1
func GetReplicaZkPath(conf *model.CKManClickHouseConfig) error
func MarshalClusters ¶
func ParseCkClusterConfigFile ¶
func ParseCkClusterConfigFile() error
func ReadClusterConfigFile ¶
func UnmarshalClusters ¶
func UpdateCkClusterConfigFile ¶
func UpdateCkClusterConfigFile() error
func WriteClusterConfigFile ¶
Types ¶
type CkService ¶
type CkService struct { Config *model.CKManClickHouseConfig DB *sql.DB }
func GetCkService ¶
func NewCkService ¶
func NewCkService(config *model.CKManClickHouseConfig) *CkService
func (*CkService) AlterTable ¶
func (ck *CkService) AlterTable(params *model.AlterCkTableParams) error
func (*CkService) CreateTable ¶
func (ck *CkService) CreateTable(params *model.CreateCkTableParams) error
func (*CkService) DeleteTable ¶
func (ck *CkService) DeleteTable(conf *model.CKManClickHouseConfig, params *model.DeleteCkTableParams) error
func (*CkService) DescTable ¶
func (ck *CkService) DescTable(params *model.DescCkTableParams) ([]model.CkColumnAttribute, error)
func (*CkService) FetchSchemerFromOtherNode ¶
func (*CkService) InitCkService ¶
Click to show internal directories.
Click to hide internal directories.