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"` ProtoVersion int `mapstructure:"proto_version"` // 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"` ApiKey string `mapstructure:"api_key"` // 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 Gcs ¶ added in v0.2.5
type Gcs struct { BaseUrl string `mapstructure:"base_url"` BucketName string `mapstructure:"bucket_name"` CredentialsFile string `mapstructure:"credentials_file"` }
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"` Charset string `mapstructure:"charset"` AllowNativePasswords bool `mapstructure:"allow_native_passwords"` Debug bool `mapstructure:"debug"` Driver string `mapstructure:"driver"` Timeout int `mapstructure:"timeout"` ReadTimeout int `mapstructure:"read_timeout"` WriteTimeout int `mapstructure:"write_timeout"` }
type Kafka ¶
type Kafka struct { Hosts []string `mapstructure:"hosts"` Topic string `mapstructure:"topic"` MaxMessageBytes int `mapstructure:"max_message_bytes"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` IsSASL bool `mapstructure:"is_sasl"` // contains filtered or unexported fields }
func (*Kafka) LoadFromConfig ¶
func (*Kafka) Producer ¶
func (ds *Kafka) Producer() sarama.AsyncProducer
type MongoDB ¶ added in v0.2.4
type MongoDB struct { DbName string `mapstructure:"db_name"` Collection string `mapstructure:"collection"` UserName string `mapstructure:"user_name"` Password string `mapstructure:"password"` Host string `mapstructure:"host"` Replicas []string `mapstructure:"replicas"` ReplicaSet string `mapstructure:"replica_set"` // contains filtered or unexported fields }
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"` MaxOpenConns int `json:"max_open_conns"` MaxIdleConns int `json:"max_idle_conns"` ConnMaxLifetime int `json:"conn_max_lifetime"` // contains filtered or unexported fields }
type Redis ¶
type RedisCluster ¶ added in v0.1.3
type RedisCluster struct { MasterName string `mapstructure:"name"` Addr []string `mapstructure:"addr"` //Username string `mapstructure:"username"` Password string `mapstructure:"password"` // contains filtered or unexported fields }
RedisCluster @todo: Merge with redis
func (*RedisCluster) Client ¶ added in v0.1.3
func (ds *RedisCluster) Client() *redis.ClusterClient
func (*RedisCluster) LoadFromConfig ¶ added in v0.1.3
func (ds *RedisCluster) LoadFromConfig(key string, config *viper.Viper) error
type RedisSentinel ¶
type RedisSentinel struct { MasterName string `mapstructure:"name"` Addr []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.