discovery

package
v0.0.0-...-22a2038 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBackend

func AddBackend(db *sql.DB, beHostPort string) error

func AddBroker

func AddBroker(db *sql.DB, brokerName string, brokerHost string) error

func AddFrontend

func AddFrontend(db *sql.DB, feHostPort string) error

func DropBackend

func DropBackend(db *sql.DB, beHostPort string) error

func DropBroker

func DropBroker(db *sql.DB, brokerName string) error

func DropFrontend

func DropFrontend(db *sql.DB, feHostPort string) error

func GetBeExpectedHosts

func GetBeExpectedHosts(cr *dapi.DorisCluster) []string

func GetBrokerExpectedHosts

func GetBrokerExpectedHosts(cr *dapi.DorisCluster) []string

func GetBrokerExpectedNames

func GetBrokerExpectedNames(cr *dapi.DorisCluster) []string

func GetBrokerNameByPodName

func GetBrokerNameByPodName(bkPodName string) string

func GetBrokerPodNameByName

func GetBrokerPodNameByName(bkPodName string) string

func GetCnExpectedHosts

func GetCnExpectedHosts(cr *dapi.DorisCluster) []string

func GetFeExpectedHosts

func GetFeExpectedHosts(cr *dapi.DorisCluster) []string

func ShowBackendHosts

func ShowBackendHosts(db *sql.DB) ([]string, error)

func ShowBrokerNameHosts

func ShowBrokerNameHosts(db *sql.DB) (map[string]string, error)

ShowBrokerNameHosts returns map structure: key is broker name, value is broker host

func ShowFrontendHosts

func ShowFrontendHosts(db *sql.DB) ([]string, error)

Types

type DorisDiscovery

type DorisDiscovery struct {
	rec.ReconcileContext
	CR *dapi.DorisCluster
}

func (*DorisDiscovery) Reconcile

func (r *DorisDiscovery) Reconcile() *RecErr

type DorisSqlConnConf

type DorisSqlConnConf struct {
	Host     string
	Port     int32
	User     string
	Password string
}

DorisSqlConnConf is the Doris SQL connection configuration

func (*DorisSqlConnConf) Connect

func (e *DorisSqlConnConf) Connect() (*sql.DB, error)

func (*DorisSqlConnConf) HostPort

func (e *DorisSqlConnConf) HostPort() string

type RecErr

type RecErr struct {
	Err      error
	IsSqlErr bool
}

func NewRecErr

func NewRecErr(err error) *RecErr

func NewRecSqlErr

func NewRecSqlErr(err error) *RecErr

func (*RecErr) Error

func (e *RecErr) Error() string

type RowMap

type RowMap map[string]string

func ReadAllRowsAsString

func ReadAllRowsAsString(rows *sql.Rows) []RowMap

ReadAllRowsAsString reads all rows from sql.Rows and returns a slice of map[string]string

type SqlAccount

type SqlAccount struct {
	User     string
	Password string
}

Jump to

Keyboard shortcuts

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