diff --git a/.gitignore b/.gitignore index 2f823d876931c4584eb7068906cab311c0f80123..ad2691120980c6dc2ba0fa8cedf57c039568c121 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,4 @@ server/handler/index.html web/node_modules web/dist/ -go.work \ No newline at end of file +go.work* \ No newline at end of file diff --git a/conf/config_server.yaml.templete b/conf/config_server.yaml.templete index ca3fac74c0097570c9d1b81019471357f570b417..7bbb2614f87ec88e57454fba0f7c6a111d3ba305 100644 --- a/conf/config_server.yaml.templete +++ b/conf/config_server.yaml.templete @@ -1,6 +1,7 @@ topo: server_addr: "localhost:9991" agent_port: "9992" + database: "neo4j" period: 60 PilotGo: http_addr: "localhost:8888" @@ -10,6 +11,8 @@ log: path: /opt/PilotGo/plugin/topology/server/log/toposerver.log max_file: 1 max_size: 10485760 -arangodb: - addr: "http://localhost:8529" - database: "pilotgo-topo" \ No newline at end of file +neo4j: + addr: "bolt://10.41.121.1:7687" + username: "" + password: "" + DB: "neo4j" \ No newline at end of file diff --git a/server/conf/config.go b/server/conf/config.go index 7578ed178be29f20a19cf79e9cae914ccfc4cded..adaf289f70ee9bd6125060755e33dd3c6d20342a 100644 --- a/server/conf/config.go +++ b/server/conf/config.go @@ -9,6 +9,7 @@ import ( type TopoConf struct { Server_addr string `yaml:"server_addr"` Agent_port string `yaml:"agent_port"` + Database string `yaml:"database"` Period int `yaml:"period"` } @@ -21,11 +22,19 @@ type ArangodbConf struct { Database string `yaml:"database"` } +type Neo4jConf struct { + Addr string `yaml:"addr"` + Username string `yaml:"username"` + Password string `yaml:"password"` + DB string `yaml:"DB"` +} + type ServerConfig struct { Topo *TopoConf `yaml:"topo"` PilotGo *PilotGoConf `yaml:"PilotGo"` Logopts *logger.LogOpts `yaml:"log"` Arangodb *ArangodbConf `yaml:"arangodb"` + Neo4j *Neo4jConf `yaml:"neo4j"` } const config_type = "config_server.yaml" diff --git a/server/dao/init.go b/server/dao/init.go index 484b52563bd9aab301be4fb7ff0f9e8e91c07b19..07a0cc0fc69fdc13eda603a897b9116884ad9a61 100755 --- a/server/dao/init.go +++ b/server/dao/init.go @@ -1 +1 @@ -package controller \ No newline at end of file +package dao