configure

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 3 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterImplementor

func RegisterImplementor(cfg Configure)

RegisterImplementor registers the configuration service implementor.

Types

type AddrParams

type AddrParams map[string]string

func (AddrParams) Encode

func (m AddrParams) Encode(sep string) string

type Address

type Address struct {
	Schema    Schema     `json:"schema"`
	Username  string     `json:"username"`
	Password  string     `json:"password"`
	Host      string     `json:"host"`
	Port      string     `json:"port"`
	NameSpace string     `json:"namespace"`
	Params    AddrParams `json:"params"`
	RawValue  string     `json:"raw"`
}

func (*Address) Set

func (c *Address) Set(addr string)

type Configure

type Configure interface {
	// Register the configuration pointer.
	Register(component string, v interface{}) error
}

func Implementor

func Implementor() Configure

Implementor returns the configuration service implementor.

type Dialect

type Dialect interface {
	URL() string
}

type Schema

type Schema string
const (
	SQLite     Schema = "sqlite"
	MySQL      Schema = "mysql"
	PostgreSQL Schema = "postgres"
	SQLServer  Schema = "sqlserver"
	Clickhouse Schema = "clickhouse"

	Redis        Schema = "redis"
	RedisCluster Schema = "rediscluster"

	ElasticSearch6 Schema = "elasticsearch6"
	ElasticSearch7 Schema = "elasticsearch7"

	Kafka    Schema = "kafka"
	Pulsar   Schema = "pulsar"
	RocketMQ Schema = "rocketmq"
)

Jump to

Keyboard shortcuts

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