config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig()

func InitConfigForTest

func InitConfigForTest(reader IReader)

Types

type Config

type Config struct {
	Server    *Server             `yaml:"service"`
	MySQL     *MySQL              `yaml:"mysql"`
	Redis     *Redis              `yaml:"redis"`
	Etcd      *Etcd               `yaml:"etcd"`
	Es        *Es                 `yaml:"es"`
	Services  map[string]*Service `yaml:"services"`
	Domain    map[string]*Domain  `yaml:"domain"`
	SeConfig  *SeConfig           `yaml:"SeConfig"`
	Kafka     *Kafka              `yaml:"kafka"`
	StarRocks *StarRocks          `yaml:"starrock"`
	Vector    *VectorConfig       `yaml:"vector"`
	Milvus    *MilvusConfig       `yaml:"milvus"`
	Jaeger    *Jaeger             `yaml:"jaeger"`
}
var Conf *Config

type ConfigReader

type ConfigReader struct {
	FileName string
}

type Domain

type Domain struct {
	Name string `yaml:"name"`
}

type Es

type Es struct {
	EsHost  string `yaml:"esHost"`
	EsPort  string `yaml:"esPort"`
	EsIndex string `yaml:"esIndex"`
}

type Etcd

type Etcd struct {
	Address string `yaml:"address"`
}

type IReader

type IReader interface {
	// contains filtered or unexported methods
}

type Jaeger added in v0.1.3

type Jaeger struct {
	Addr string `yaml:"addr"`
}

type Kafka added in v0.1.0

type Kafka struct {
	Address []string `yaml:"address"`
}

type MilvusConfig added in v0.1.2

type MilvusConfig struct {
	Host                   string `yaml:"host"`
	Port                   string `yaml:"port"`
	VectorDimension        int    `yaml:"vector_dimension"`
	DefaultMilvusTableName string `yaml:"default_milvus_table_name"`
	MetricType             string `yaml:"metric_type"`
	Timeout                int    `yaml:"timeout"`
}

type MySQL

type MySQL struct {
	DriverName string `yaml:"driverName"`
	Host       string `yaml:"host"`
	Port       string `yaml:"port"`
	Database   string `yaml:"database"`
	UserName   string `yaml:"username"`
	Password   string `yaml:"password"`
	Charset    string `yaml:"charset"`
}

type Redis

type Redis struct {
	RedisHost     string `yaml:"redisHost"`
	RedisPort     string `yaml:"redisPort"`
	RedisUsername string `yaml:"redisUsername"`
	RedisPassword string `yaml:"redisPassword"`
	RedisDbName   int    `yaml:"redisDbName"`
}

type SeConfig

type SeConfig struct {
	StoragePath      string   `yaml:"StoragePath"`
	SourceFiles      []string `yaml:"SourceFiles"`
	MergeChannelSize int64    `yaml:"MergeChannelSize"`
	Version          string   `yaml:"Version"`
	SourceWuKoFile   string   `yaml:"SourceWuKoFile"`
	MetaPath         string   `yaml:"MetaPath"`
}

type Server

type Server struct {
	Port      string `yaml:"port"`
	Version   string `yaml:"version"`
	JwtSecret string `yaml:"jwtSecret"`
	Metrics   string `yaml:"metrics"`
}

type Service

type Service struct {
	Name        string   `yaml:"name"`
	LoadBalance bool     `yaml:"loadBalance"`
	Addr        []string `yaml:"addr"`
	Metrics     []string `yaml:"metrics"`
}

type StarRocks added in v0.1.1

type StarRocks struct {
	UserName string `yaml:"user_name"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
	LoadUrl  string `yaml:"load_url"`
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	Charset  string `yaml:"charset"`
}

type VectorConfig added in v0.1.2

type VectorConfig struct {
	ServerAddress string `yaml:"server_address"`
	Timeout       int64  `yaml:"timeout"`
}

Jump to

Keyboard shortcuts

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