Documentation
¶
Overview ¶
Package conf is the configuration package for native client
Index ¶
- Variables
- type Driver
- type DriverType
- func (d *DriverType) DriverType(name string) DriverType
- func (d DriverType) MarshalJSON() (b []byte, err error)
- func (d DriverType) MarshalYAML() (interface{}, error)
- func (d DriverType) String() string
- func (d *DriverType) UnmarshalJSON(b []byte) (err error)
- func (d *DriverType) UnmarshalYAML(unmarshal func(interface{}) error) error
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var DriverMap = map[DriverType]string{ MySQL: "mysql", Redis: "redis", Memcache: "memcache", Kafka: "kafka", Mongo: "mongo", PostgreSQL: "postgres", Zookeeper: "zookeeper", Unknown: "unknown", }
DriverMap is the map of [driver, name]
View Source
var DriverTypeMap = reverseMap(DriverMap)
DriverTypeMap is the map of driver [name, driver]
Functions ¶
This section is empty.
Types ¶
type DriverType ¶
type DriverType int
DriverType is the client driver
const ( Unknown DriverType = iota MySQL Redis Memcache Kafka Mongo PostgreSQL Zookeeper )
The Driver Type of native client
func (*DriverType) DriverType ¶
func (d *DriverType) DriverType(name string) DriverType
DriverType convert the string to DriverType
func (DriverType) MarshalJSON ¶
func (d DriverType) MarshalJSON() (b []byte, err error)
MarshalJSON is marshal the driver
func (DriverType) MarshalYAML ¶ added in v1.3.0
func (d DriverType) MarshalYAML() (interface{}, error)
MarshalYAML is marshal the driver type
func (DriverType) String ¶
func (d DriverType) String() string
String convert the DriverType to string
func (*DriverType) UnmarshalJSON ¶
func (d *DriverType) UnmarshalJSON(b []byte) (err error)
UnmarshalJSON is Unmarshal the driver type
func (*DriverType) UnmarshalYAML ¶
func (d *DriverType) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML is unmarshal the driver type
type Options ¶
type Options struct { base.DefaultProbe `yaml:",inline"` Host string `` /* 129-byte string literal not displayed */ DriverType DriverType `` /* 212-byte string literal not displayed */ Username string `` /* 131-byte string literal not displayed */ Password string `` /* 133-byte string literal not displayed */ Data map[string]string `` /* 130-byte string literal not displayed */ //TLS global.TLS `yaml:",inline"` }
Options implements the configuration for native client
Click to show internal directories.
Click to hide internal directories.