Documentation ¶
Overview ¶
Package data_store - Will move this to central repo, temporarily is copy pasted everywhere
Index ¶
Constants ¶
View Source
const (
ESDefaultTimeout = time.Second
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cassandra ¶
type Cassandra struct { Keyspace string `mapstructure:"keyspace"` Hosts []string `mapstructure:"hosts"` Timeout int `mapstructure:"timeout"` ReconnectInterval int `mapstructure:"reconnect_interval"` Port int `mapstructure:"port"` // contains filtered or unexported fields }
func (*Cassandra) Cluster ¶
func (ds *Cassandra) Cluster() *gocql.ClusterConfig
func (*Cassandra) LoadFromConfig ¶
type ElasticSearch ¶
type ElasticSearch struct { Hosts []string `mapstructure:"hosts"` Timeout time.Duration `mapstructure:"timeout"` // contains filtered or unexported fields }
func (*ElasticSearch) Client ¶
func (ds *ElasticSearch) Client() *elasticsearch.Client
func (*ElasticSearch) LoadFromConfig ¶
func (ds *ElasticSearch) LoadFromConfig(key string, config *viper.Viper) error
type Gorm ¶ added in v0.1.2
type Gorm struct { User string `mapstructure:"user"` Password string `mapstructure:"password"` Net string `mapstructure:"net"` Addr string `mapstructure:"addr"` DBName string `mapstructure:"db_name"` AllowNativePasswords bool `mapstructure:"allow_native_passwords"` Timeout int `json:"timeout"` ReadTimeout int `json:"read_timeout"` WriteTimeout int `json:"write_timeout"` }
type Kafka ¶
type Kafka struct { Hosts []string `mapstructure:"hosts"` Topic string `mapstructure:"topic"` // contains filtered or unexported fields }
func (*Kafka) LoadFromConfig ¶
func (*Kafka) Producer ¶
func (ds *Kafka) Producer() sarama.AsyncProducer
type Mysql ¶
type Mysql struct { User string `mapstructure:"user"` Password string `mapstructure:"password"` Net string `mapstructure:"net"` Addr string `mapstructure:"addr"` DBName string `mapstructure:"db_name"` AllowNativePasswords bool `mapstructure:"allow_native_passwords"` Timeout int `json:"timeout"` ReadTimeout int `json:"read_timeout"` WriteTimeout int `json:"write_timeout"` // contains filtered or unexported fields }
type Redis ¶
type RedisSentinel ¶
type RedisSentinel struct { MasterName string `mapstructure:"name"` Addrs []string `mapstructure:"addr"` //Username string `mapstructure:"username"` Password string `mapstructure:"password"` // contains filtered or unexported fields }
RedisSentinel @todo: Merge with redis
func (*RedisSentinel) Client ¶
func (ds *RedisSentinel) Client() *redis.Client
func (*RedisSentinel) LoadFromConfig ¶
func (ds *RedisSentinel) LoadFromConfig(key string, config *viper.Viper) error
Click to show internal directories.
Click to hide internal directories.