Updating PostgreSQL file store integration to support directories.
This commit is contained in:
@@ -25,7 +25,7 @@ import (
|
||||
type filerConf struct {
|
||||
MysqlConf []mysql_store.MySqlConf `json:"mysql"`
|
||||
mysql_store.ShardingConf
|
||||
PostgresConf []postgres_store.PostgresConf `json:"postgres"`
|
||||
PostgresConf *postgres_store.PostgresConf `json:"postgres"`
|
||||
}
|
||||
|
||||
func parseConfFile(confPath string) (*filerConf, error) {
|
||||
@@ -88,9 +88,8 @@ func NewFilerServer(r *http.ServeMux, ip string, port int, master string, dir st
|
||||
if setting.MysqlConf != nil && len(setting.MysqlConf) != 0 {
|
||||
mysql_store := mysql_store.NewMysqlStore(setting.MysqlConf, setting.IsSharding, setting.ShardCount)
|
||||
fs.filer = flat_namespace.NewFlatNamespaceFiler(master, mysql_store)
|
||||
} else if setting.PostgresConf != nil && len(setting.PostgresConf) != 0 {
|
||||
postgres_store := postgres_store.NewPostgresStore(setting.PostgresConf, setting.IsSharding, setting.ShardCount)
|
||||
fs.filer = flat_namespace.NewFlatNamespaceFiler(master, postgres_store)
|
||||
} else if setting.PostgresConf != nil {
|
||||
fs.filer = postgres_store.NewPostgresStore(master, *setting.PostgresConf)
|
||||
} else if cassandra_server != "" {
|
||||
cassandra_store, err := cassandra_store.NewCassandraStore(cassandra_keyspace, cassandra_server)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user