Skip to content

Commit

Permalink
removing the examples from the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
kpacha committed Apr 7, 2018
1 parent 6c49def commit b9a7396
Show file tree
Hide file tree
Showing 23 changed files with 14 additions and 882 deletions.
31 changes: 4 additions & 27 deletions Makefile
@@ -1,6 +1,4 @@
.PHONY: all deps test build benchmark coveralls build_gin_example build_dns_example build_mux_example build_gorilla_example build_negroni_example build_httpcache_example build_jwt_example

PACKAGES = $(shell go list ./... | grep -v /examples/)
.PHONY: all deps test build benchmark coveralls

all: deps test build

Expand All @@ -11,8 +9,7 @@ deps:

test:
go fmt ./...
go test -v -cover $(PACKAGES)
go vet ./...
go test -v -cover ./...

benchmark:
@echo "Proxy middleware stack"
Expand All @@ -31,28 +28,8 @@ benchmark:
@echo "Request generator"
@go test -bench=BenchmarkRequestGeneratePath -benchtime=3s ./proxy

build: build_gin_example build_dns_example build_mux_example build_gorilla_example build_negroni_example build_httpcache_example build_jwt_example

build_gin_example:
cd examples/gin/ && make && cd ../.. && cp examples/gin/krakend_gin_example* .

build_dns_example:
cd examples/dns/ && make && cd ../.. && cp examples/dns/krakend_dns_example* .

build_mux_example:
cd examples/mux/ && make && cd ../.. && cp examples/mux/krakend_mux_example* .

build_gorilla_example:
cd examples/gorilla/ && make && cd ../.. && cp examples/gorilla/krakend_gorilla_example* .

build_negroni_example:
cd examples/negroni/ && make && cd ../.. && cp examples/negroni/krakend_negroni_example* .

build_httpcache_example:
cd examples/httpcache/ && make && cd ../.. && cp examples/httpcache/krakend_httpcache_example* .

build_jwt_example:
cd examples/jwt/ && make && cd ../.. && cp examples/jwt/krakend_jwt_example* .
build:
go build ./...

coveralls: all
go get github.com/mattn/goveralls
Expand Down
27 changes: 10 additions & 17 deletions README.md
Expand Up @@ -53,16 +53,7 @@ If you need the KrakenD API Gateway [download the binary for your architecture](
## Library Usage
KrakenD is presented as a **go library** that you can include in your own go application to build a powerful proxy or API gateway. In order to get you started several examples of implementations are included in the `examples` folder.

Of course you will need [go installed](https://golang.org/doc/install) in your system to compile the code.

There is a `Makefile` in every example that will download library dependencies and compile a binary for you to test. Just run:

$ cd examples/gin
$ make

Or, if you want to build all the examples, from the root of the project

$ make
Of course you will need [golang installed](https://golang.org/doc/install) in your system to compile the code.

A ready to use example:

Expand Down Expand Up @@ -109,13 +100,15 @@ Visit the [framework overview](/docs/OVERVIEW.md) for more details about the com

### Examples

1. [gin router](/examples/gin/)
2. [mux router](/examples/mux/)
3. [gorilla router](/examples/gorilla/)
4. [negroni middlewares](/examples/negroni/)
5. [dns srv service discovery](/examples/dns/)
6. [jwt middlewares](/examples/jwt/)
7. [httpcache based proxies](/examples/httpcache/)
The project [KrakenD examples](https://github.com/devopsfaith/krakend-examples)

1. [gin router](https://github.com/devopsfaith/krakend-examples/tree/master/gin/)
2. [mux router](https://github.com/devopsfaith/krakend-examples/tree/master/mux/)
3. [gorilla router](https://github.com/devopsfaith/krakend-examples/tree/master/gorilla/)
4. [negroni middlewares](https://github.com/devopsfaith/krakend-examples/tree/master/negroni/)
5. [dns srv service discovery](https://github.com/devopsfaith/krakend-examples/tree/master/dns/)
6. [jwt middlewares](https://github.com/devopsfaith/krakend-examples/tree/master/jwt/)
7. [httpcache based proxies](https://github.com/devopsfaith/krakend-examples/tree/master/httpcache/)

## Configuration file

Expand Down
19 changes: 0 additions & 19 deletions examples/dns/Makefile

This file was deleted.

20 changes: 0 additions & 20 deletions examples/dns/README.md

This file was deleted.

41 changes: 0 additions & 41 deletions examples/dns/main.go

This file was deleted.

22 changes: 0 additions & 22 deletions examples/gin/Makefile

This file was deleted.

20 changes: 0 additions & 20 deletions examples/gin/README.md

This file was deleted.

88 changes: 0 additions & 88 deletions examples/gin/main.go

This file was deleted.

21 changes: 0 additions & 21 deletions examples/gorilla/Makefile

This file was deleted.

20 changes: 0 additions & 20 deletions examples/gorilla/README.md

This file was deleted.

0 comments on commit b9a7396

Please sign in to comment.