Closed bzp2010 closed 2 years ago
Configuration files and corresponding CLI flag support have been added. It uses a configuration file in the following format, one part for configuring the HTTP/grpc server (not supported by TLS yet) and another part for the DSN. DSN currently supports mysql
, if not for mysql
will default back to btree
.
server:
host: 127.0.0.1
port: 12379
# tls:
# cert: /path/to/file.pem
# key: /path/to/file.pem
dsn: mysql://root@tcp(127.0.0.1:3306)/apisix
This PR is currently based on the CLI branch, so it incorporates some of the original changes, and after the previous PR is merged I will do a rebase to reduce the chon
Update
Configuration files and corresponding CLI flag support have been added. It uses a configuration file in the following format, one part for configuring the HTTP/grpc server (not supported by TLS yet) and another part for the DSN. DSN currently supports
mysql
, if not formysql
will default back tobtree
.server: host: 127.0.0.1 port: 12379 # tls: # cert: /path/to/file.pem # key: /path/to/file.pem dsn: mysql://root@tcp(127.0.0.1:3306)/apisix
This PR is currently based on the CLI branch, so it incorporates some of the original changes, and after the previous PR is merged I will do a rebase to reduce the chon
An explicit type
field will be better than relying on the dsn
, for btree, there is no concept of dsn
, this is not a generic one.
These changes have been made since the last review.
api7/gopkg
This format of the configuration file is now. The configuration format of the data source is completely modified.
datasource:
type: mysql
mysql:
host: 127.0.0.1
port: 3306
username: root
password:
database: apisix
ping @tokers
CI was failed @bzp2010 .
CI was failed @bzp2010 .
@tokers Need to merge the PR for fixing CI first, I will merge it to this one branch.
After merging CLI test fix patches, the CI issue has been resolved. Then, I added a reply about the gopkg log, you need to confirm it again. https://github.com/api7/etcd-adapter/pull/6#discussion_r820448849
ping @tokers @starsz
Supports configuration file and environment variable configuration.