Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: serverless/event-gateway
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.2.0
Choose a base ref
...
head repository: serverless/event-gateway
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 25,951 additions and 3,872 deletions.
  1. +1 −0 .dockerignore
  2. +17 −0 .editorconfig
  3. +22 −0 .github/ISSUE_TEMPLATE.md
  4. +40 −0 .github/PULL_REQUEST_TEMPLATE.md
  5. +6 −2 .gitignore
  6. +5 −2 .goreleaser.yml
  7. +22 −18 .travis.yml
  8. +394 −0 CHANGELOG.md
  9. +75 −0 CODE_OF_CONDUCT.md
  10. +53 −0 CONTRIBUTING.md
  11. +18 −8 Dockerfile
  12. +562 −0 Gopkg.lock
  13. +67 −0 Gopkg.toml
  14. +190 −0 LICENSE
  15. +276 −340 README.md
  16. +0 −226 _docs/access_control.md
  17. +0 −220 _docs/events.md
  18. +0 −243 _docs/use-cases.md
  19. +198 −0 cmd/event-gateway/main.go
  20. +17 −0 codecov.sh
  21. +8 −0 contrib/README.md
  22. +1,440 −0 contrib/grafana/influxdb/eventgateway_all_spaces.json
  23. +1,460 −0 contrib/grafana/influxdb/eventgateway_by_space.json
  24. +1,058 −0 contrib/grafana/prometheus/eventgateway_all_spaces.json
  25. +1,070 −0 contrib/grafana/prometheus/eventgateway_by_space.json
  26. +66 −0 contrib/helm/MINIKUBE.md
  27. +329 −0 contrib/helm/README.md
  28. +21 −0 contrib/helm/event-gateway/.helmignore
  29. +4 −0 contrib/helm/event-gateway/Chart.yaml
  30. +32 −0 contrib/helm/event-gateway/templates/_helpers.tpl
  31. +7 −0 contrib/helm/event-gateway/templates/etcd-cluster.yaml
  32. +18 −0 contrib/helm/event-gateway/templates/event-gateway-ingress.yaml
  33. +60 −0 contrib/helm/event-gateway/templates/event-gateway.yaml
  34. +22 −0 contrib/helm/event-gateway/values.yaml
  35. +5 −0 contrib/terraform/NOTICE
  36. +85 −0 contrib/terraform/README.md
  37. +51 −0 contrib/terraform/modules/etcd/bastion.tf
  38. +95 −0 contrib/terraform/modules/etcd/certs.tf
  39. +16 −0 contrib/terraform/modules/etcd/dns.tf
  40. +80 −0 contrib/terraform/modules/etcd/ignition.tf
  41. +86 −0 contrib/terraform/modules/etcd/main.tf
  42. +3 −0 contrib/terraform/modules/etcd/output.tf
  43. +17 −0 contrib/terraform/modules/etcd/resources/dropins/40-etcd-cluster.conf
  44. +53 −0 contrib/terraform/modules/etcd/variables.tf
  45. +48 −0 contrib/terraform/modules/event-gateway/alb.tf
  46. +114 −0 contrib/terraform/modules/event-gateway/ecs.tf
  47. +18 −0 contrib/terraform/modules/event-gateway/etcd.tf
  48. +40 −0 contrib/terraform/modules/event-gateway/iam.tf
  49. +14 −0 contrib/terraform/modules/event-gateway/output.tf
  50. +3 −0 contrib/terraform/modules/event-gateway/provider.tf
  51. +110 −0 contrib/terraform/modules/event-gateway/variables.tf
  52. +18 −0 contrib/terraform/modules/event-gateway/vpc.tf
  53. +0 −98 db/prefixed.go
  54. +0 −290 db/watcher.go
  55. +723 −0 docs/api.md
  56. +33 −0 docs/architecture.md
  57. +51 −0 docs/clustering.md
  58. +40 −0 docs/developing.md
  59. +29 −0 docs/event-types.md
  60. +91 −0 docs/metrics.md
  61. +879 −0 docs/openapi/openapi-config-api.yaml
  62. +11 −0 docs/reliability-guarantees.md
  63. +90 −0 docs/running-locally.md
  64. 0 {_docs → docs}/storage.md
  65. +37 −0 docs/subscription-types.md
  66. +50 −0 docs/system-events-and-plugin-system.md
  67. +53 −0 event/errors.go
  68. +257 −0 event/event.go
  69. +363 −0 event/event_test.go
  70. +33 −0 event/http.go
  71. +12 −0 event/service.go
  72. +47 −0 event/system.go
  73. +38 −0 event/type.go
  74. +25 −0 examples/aws-golang-simple-http-endpoint/Gopkg.toml
  75. +12 −0 examples/aws-golang-simple-http-endpoint/Makefile
  76. +45 −0 examples/aws-golang-simple-http-endpoint/hello/main.go
  77. +199 −0 examples/aws-golang-simple-http-endpoint/package-lock.json
  78. +13 −0 examples/aws-golang-simple-http-endpoint/package.json
  79. +41 −0 examples/aws-golang-simple-http-endpoint/serverless.yml
  80. +45 −0 examples/aws-golang-simple-http-endpoint/world/main.go
  81. +155 −0 examples/aws-node-crm-service/README.md
  82. +29 −0 examples/aws-node-crm-service/emit.js
  83. +1 −0 examples/aws-node-crm-service/event.json
  84. +12 −0 examples/aws-node-crm-service/index.js
  85. +5 −0 examples/aws-node-crm-service/package.json
  86. +21 −0 examples/aws-node-crm-service/serverless.yml
  87. +128 −0 examples/aws-node-users-service/README.md
  88. +44 −0 examples/aws-node-users-service/index.js
  89. +8 −0 examples/aws-node-users-service/package.json
  90. +36 −0 examples/aws-node-users-service/serverless.yml
  91. +85 −0 function/errors.go
  92. +96 −0 function/function.go
  93. +48 −0 function/function_test.go
  94. +25 −0 function/provider.go
  95. +12 −0 function/service.go
  96. +0 −46 functions/errors.go
  97. +0 −115 functions/functions.go
  98. +0 −99 functions/httpapi.go
  99. +0 −136 functions/types.go
  100. +0 −226 glide.lock
  101. +0 −37 glide.yaml
  102. +53 −0 httpapi/config.go
  103. +7 −2 httpapi/error.go
  104. +28 −0 httpapi/events.go
  105. +637 −0 httpapi/httpapi.go
  106. +1,104 −0 httpapi/httpapi_test.go
  107. +74 −0 httpapi/metrics.go
  108. +59 −0 httpapi/server.go
  109. +0 −62 httplisteners/api.go
  110. +0 −36 httplisteners/gateway.go
  111. +0 −65 httplisteners/handler.go
  112. +309 −0 install.sh
  113. +0 −37 integration_tests/api_test.go
  114. +0 −68 integration_tests/etcd_test.go
  115. +0 −11 integration_tests/port_allocator_test.go
  116. +0 −102 integration_tests/pubsub_test.go
  117. +0 −108 integration_tests/reactor_test.go
  118. +0 −107 integration_tests/router_test.go
  119. +73 −0 internal/cache/cors_cache.go
  120. +62 −0 internal/cache/cors_cache_test.go
  121. +49 −0 internal/cache/eventtype_cache.go
  122. +54 −0 internal/cache/eventtype_cache_test.go
  123. +49 −0 internal/cache/function_cache.go
  124. +70 −0 internal/cache/function_cache_test.go
  125. +133 −0 internal/cache/subscription_cache.go
  126. +152 −0 internal/cache/subscription_cache_test.go
  127. +141 −0 internal/cache/target.go
  128. +190 −0 internal/cache/watcher.go
  129. +25 −27 db/embed.go → internal/embedded/embedded.go
  130. +21 −0 internal/http/headers.go
  131. +29 −0 internal/http/headers_test.go
  132. +212 −0 internal/pathtree/tree.go
  133. +245 −0 internal/pathtree/tree_test.go
  134. +103 −0 internal/store/prefixed.go
  135. +45 −0 internal/store/prefixed_test.go
  136. +11 −0 internal/strings/strings.go
  137. +1 −1 util/shutdown.go → internal/sync/shutdownguard.go
  138. +34 −0 internal/zap/strings.go
  139. +3 −0 libkv/README.md
  140. +188 −0 libkv/cors.go
  141. +324 −0 libkv/cors_test.go
  142. +172 −0 libkv/eventtype.go
  143. +286 −0 libkv/eventtype_test.go
  144. +175 −0 libkv/function.go
  145. +310 −0 libkv/function_test.go
  146. +3 −0 libkv/libkv.go
  147. +24 −0 libkv/service.go
  148. +18 −0 libkv/space.go
  149. +310 −0 libkv/subscription.go
  150. +457 −0 libkv/subscription_test.go
  151. +0 −103 main.go
  152. +7 −0 metadata/filter.go
  153. +16 −0 metadata/metadata.go
  154. +33 −0 metadata/metadata_test.go
  155. +0 −23 metrics/http_logger.go
  156. +0 −23 metrics/metrics.go
  157. +104 −0 mock/cors.go
  158. +104 −0 mock/eventtype.go
  159. +104 −0 mock/function.go
  160. +7 −0 mock/mock.go
  161. +185 −0 mock/store.go
  162. +104 −0 mock/subscription.go
  163. +18 −0 plugin/example/reacter/main.go
  164. +39 −0 plugin/example/reacter/plugin.go
  165. +92 −0 plugin/logger.go
  166. +114 −0 plugin/manager.go
  167. +99 −0 plugin/reacter.go
  168. +14 −0 plugin/shared/handshake.go
  169. +105 −0 providers/awsfirehose/awsfirehose.go
  170. +125 −0 providers/awsfirehose/awsfirehose_test.go
  171. +345 −0 providers/awsfirehose/mock/firehoseiface.go
  172. +3 −0 providers/awsfirehose/mock/mock.go
  173. +107 −0 providers/awskinesis/awskinesis.go
  174. +125 −0 providers/awskinesis/awskinesis_test.go
  175. +1,077 −0 providers/awskinesis/mock/kinesisiface.go
  176. +3 −0 providers/awskinesis/mock/mock.go
  177. +118 −0 providers/awslambda/awslambda.go
  178. +148 −0 providers/awslambda/awslambda_test.go
  179. +1,327 −0 providers/awslambda/mock/lambdaiface.go
  180. +3 −0 providers/awslambda/mock/mock.go
  181. +106 −0 providers/awssqs/awssqs.go
  182. +125 −0 providers/awssqs/awssqs_test.go
  183. +3 −0 providers/awssqs/mock/mock.go
  184. +784 −0 providers/awssqs/mock/sqsiface.go
  185. +80 −0 providers/http/http.go
  186. +54 −0 providers/http/http_test.go
  187. +0 −23 pubsub/endpoint.go
  188. +0 −79 pubsub/httpapi.go
  189. +0 −3 pubsub/mock/mock.go
  190. +0 −157 pubsub/mock/store.go
  191. +0 −201 pubsub/pubsub.go
  192. +0 −88 pubsub/subscription.go
  193. +0 −9 pubsub/topic.go
  194. +26 −0 router/authorization.go
  195. +0 −10 router/event.go
  196. +8 −0 router/http.go
  197. +81 −0 router/metrics.go
  198. +4 −0 router/mock/mock.go
  199. +59 −0 router/mock/provider.go
  200. +97 −0 router/mock/targetcache.go
  201. +15 −0 router/path.go
  202. +36 −0 router/path_hosted.go
  203. +388 −136 router/router.go
  204. +82 −0 router/router_hosted_test.go
  205. +268 −0 router/router_test.go
  206. +30 −0 router/targeter.go
  207. +76 −0 router/wait.go
  208. +41 −0 subscription/cors/cors.go
  209. +41 −0 subscription/cors/errors.go
  210. +12 −0 subscription/cors/service.go
  211. +50 −0 subscription/errors.go
  212. +12 −0 subscription/service.go
  213. +54 −0 subscription/subscription.go
  214. +0 −167 targetcache/cache.go
  215. +0 −118 targetcache/targetcache.go
  216. +3 −0 tests/README.md
  217. +314 −0 tests/integration_test.go
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor/*
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true ; top-most EditorConfig file

[*]
indent_style = space
end_of_line = lf
indent_size = 2
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = 0
trim_trailing_whitespace = false

[*.go]
indent_style = tab
indent_size = 8
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--
1. Just have a general question? Join us on Slack https://join.slack.com/t/serverless-contrib/shared_invite/MjI5NzY1ODM2MTc3LTE1MDM0NDIyOTUtMDgxNTcxMTcxNg
1. Please check if an issue already exists so there are no duplicates
1. Check out and follow our Guidelines: https://github.com/serverless/event-gateway/blob/master/CONTRIBUTING.md
1. Fill out the whole template so we have a good overview on the issue
1. Do not remove any section of the template. If something is not applicable leave it empty but leave it in the Issue
1. Please follow the template otherwise, we'll have to ask you to update it
-->

## This is a [Bug Report/Feature Proposal]

For bug reports, please answer following questions:
* What went wrong?
* What did you expect should have happened?
* What was the version you used?
* What stacktrace or error message did you see?

For feature proposals, please answer the following question:
* What is the use case that should be solved? The more detail you describe this in the easier it is to understand for us.

Similar or dependent issues:
* #XXXXX
40 changes: 40 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--
1. Please check out and follow our Contributing Guidelines: https://github.com/serverless/event-gateway/blob/master/CONTRIBUTING.md
1. Do not remove any section of the template. If something is not applicable leave it empty but leave it in the PR
1. Please follow the template, otherwise we'll have to ask you to update it and it will take longer until your PR is merged
-->

## What did you implement:

Closes #XXXXX

<!--
Briefly describe the feature if no issue exists for this PR
-->

## How did you implement it:

<!--
If this is a nontrivial change please briefly describe your implementation so its easy for us to understand and review your code.
-->

## How can we verify it:

<!--
Add any applicable config, commands, screenshots or other resources
to make it easy for us to verify this works. The easier you make it for us
to review a PR, the faster we can review and merge it.
-->

## Todos:

- [ ] Write tests
- [ ] Write documentation
- [ ] Fix linting errors
- [ ] Make sure code coverage hasn't dropped
- [ ] Provide verification commands / resources
- [ ] Enable "Allow edits from maintainers" for this PR
- [ ] Update the messages below

***Is this ready for review?:*** NO
***Is it a breaking change?:*** NO
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
event-gateway
.idea
/event-gateway
vendor
*.swp
*.swo
*.db
default.etcd/
default.etcd*
coverage.txt
profile.out
tests/testing.etcd*
7 changes: 5 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
builds:
- goos:
- main: ./cmd/event-gateway/main.go
goos:
- windows
- darwin
- linux
goarch:
- 386
- amd64
- amd64
archive:
format: zip
40 changes: 22 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
language: go
go:
- 1.8
- 1.9
cache:
directories:
- vendor
before_install:
- sudo add-apt-repository ppa:masterminds/glide -y
- sudo apt-get update -q
- sudo apt-get install glide -y
- vendor
install:
- glide install
- go get -u github.com/hashicorp/{go-plugin,go-hclog}
- go get -u golang.org/x/net/{context,http2,trace}
- go get -u github.com/golang/dep/cmd/dep
- dep ensure
script:
- go get -u github.com/alecthomas/gometalinter
- gometalinter --install --force
- gometalinter --vendor --fast --disable=gotype --disable=vetshadow --skip=mock ./...
- go test -race $(glide novendor)
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.10
- golangci-lint run --disable=errcheck,megacheck --enable=goimports,goconst,gocyclo
- ./codecov.sh
- go test ./tests -tags=integration
after_success:
- test -n "$TRAVIS_TAG" && curl -sL https://git.io/goreleaser | bash
notifications:
email:
- platform@serverless.com
env:
global:
secure: jZKRs8Gbxwuk40/Z6+KrppHC3B/xtDwFKlU/w5nbtpEE5VrDu6GVoC4bwJiRT1nsVDeDQaAtsyHA4B4ntj6Smbs18dn+POE8U2Tx9MNGmKN7weWlOq9Tpv468vown8/gOgt5TQTpdMg3aWzWA5vRt9f4pJwiWR5prS6fPzLTBwkT7bPixMdHG/HQT5PnZodViCNgcXKRsx0tcr5KwJVFNmdlivdMRj/ltpm+axT2X7eKC4tBZDTv7QFRzlEqcgdZtf00fQ1DamVK032biVZIfqNUTaHo/Yuuhl2zDVreNA3bvR3R1ZKtZAea5M+yFN4zlJNX3W4L8dA+wCtKS39CLhIdPKzIc8fYKj76JLKJj6qkZLH/rXfWXtvZLcr43Ro8IRPG4AWqA/7fK0/8f6st6SEs6tTg1vv4tnFmo//4VUppbxn3J8xo3pyh2BCOtqksMQyo2EBxknuqUae6cYgjxFYA/csD6mNdapGq3A2KKu1BNOATlYda54p7ju4pIBjFyG8NtKD0ZMT2VtnnMqz6Mu7X78U3qouvpoF5idLCo8nlp1ZIVDBoU2Llq9O3ExyopCHvwSLUZM/wFJEYy/AZK0VWGajRHLYJPHEWyKKuymZg53m6Yoxw8P4A/8pGxDdkdtqTgrrps3GhZoerIfg6stmbOBSR7xm7RqCxAkPlFgg=
- test -n "$TRAVIS_TAG" && curl -sL https://git.io/goreleaser | bash
- bash <(curl -s https://codecov.io/bash)
- |
test $TRAVIS_BRANCH = "master" && \
test $TRAVIS_PULL_REQUEST = "false" && \
curl -s --request POST \
--header "content-type: application/json" \
--header "accept: application/json" \
--header "travis-api-version: 3" \
--header "authorization: token $TRAVIS_API_TOKEN" \
-d '{ "request": { "branch": "master", "message": "Automated Deployment. Build: '$TRAVIS_BUILD_NUMBER'." } }' \
https://api.travis-ci.com/repo/serverless%2Fevent-gateway-deploy/requests
Loading