component

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRetry = 300
)

Variables

View Source
var (
	ErrComponentStart = errs.NewCodeError(componentStartErrCode, "ComponentStartErr")
	ErrConfig         = errs.NewCodeError(configErrCode, "Config file is incorrect")
)

Functions

func CheckKafka

func CheckKafka(kafkaStu *Kafka) (string, sarama.Client, error)

CheckKafka checks the Kafka connection

func CheckMinio

func CheckMinio(minioStu *Minio) (string, error)

CheckMinio checks the MinIO connection

func CheckMongo

func CheckMongo(mongoStu *Mongo) (string, error)

CheckMongo checks the MongoDB connection without retries

func CheckMySQL

func CheckMySQL(mysqlStu *MySQL) (string, error)

CheckMySQL checks the mysql connection

func CheckRedis

func CheckRedis(redisStu *Redis) (string, error)

CheckRedis checks the Redis connection

func CheckZookeeper

func CheckZookeeper(zkStu *Zookeeper) (string, error)

CheckZookeeper checks the Zookeeper connection

func ErrStr

func ErrStr(err error, str string) error

func ErrorPrint

func ErrorPrint(s string)

func SuccessPrint

func SuccessPrint(s string)

func WarningPrint

func WarningPrint(s string)

Types

type Kafka

type Kafka struct {
	Username string   `yaml:"username"`
	Password string   `yaml:"password"`
	Addr     []string `yaml:"addr"`
}

type Minio

type Minio struct {
	ApiURL          string
	Endpoint        string
	AccessKeyID     string
	SecretAccessKey string
	SignEndpoint    string
	UseSSL          string
}

type Mongo

type Mongo struct {
	URL         string
	Address     []string
	Database    string
	Username    string
	Password    string
	MaxPoolSize int
}

type MySQL

type MySQL struct {
	Address  []string
	Username string
	Password string
	Database string
}

type Redis

type Redis struct {
	Address  []string
	Username string
	Password string
}

type Zookeeper

type Zookeeper struct {
	Schema   string
	ZkAddr   []string
	Username string
	Password string
}

Jump to

Keyboard shortcuts

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