-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support custom etcd server and adapt to APISIX (#17)
- Loading branch information
Showing
38 changed files
with
1,003 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Unit Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
run-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Go Env | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.20" | ||
|
||
- name: Run unit test | ||
working-directory: ./ | ||
run: | | ||
make unit-test | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
.idea | ||
|
||
etcd-adapter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM golang:1.20 AS build-env | ||
|
||
ARG ENABLE_PROXY=false | ||
|
||
WORKDIR /build | ||
COPY go.* ./ | ||
|
||
RUN if [ "$ENABLE_PROXY" = "true" ] ; then go env -w GOPROXY=https://goproxy.cn,direct ; fi \ | ||
&& go mod download | ||
|
||
COPY . . | ||
RUN make build | ||
|
||
FROM ubuntu:latest | ||
|
||
WORKDIR /etcd-adapter | ||
|
||
COPY --from=build-env /build/etcd-adapter /etcd-adapter | ||
|
||
COPY conf/ /etcd-adapter/conf/ | ||
|
||
EXPOSE 12379 | ||
|
||
ENTRYPOINT ["/etcd-adapter/etcd-adapter", "-c", "/etcd-adapter/conf/config.yaml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
server: | ||
host: 0.0.0.0 | ||
port: 12379 | ||
# tls: | ||
# cert: /path/to/file.pem | ||
# key: /path/to/file.pem | ||
|
||
log: | ||
level: info | ||
|
||
datasource: | ||
type: btree # btree of mysql | ||
# mysql: | ||
# host: 127.0.0.1 | ||
# port: 3306 | ||
# username: root | ||
# password: | ||
# database: apisix |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.