-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make sure camel-cased query params work
- Loading branch information
0 parents
commit 7e4514a
Showing
11 changed files
with
14,839 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/target | ||
/classes | ||
/checkouts | ||
pom.xml | ||
pom.xml.asc | ||
*.jar | ||
*.class | ||
/.lein-* | ||
/.nrepl-port | ||
.hgignore | ||
.hg/ | ||
|
||
doc |
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 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). | ||
|
||
## [Unreleased][unreleased] | ||
### Changed | ||
- Add a new arity to `make-widget-async` to provide a different widget shape. | ||
|
||
## [0.1.1] - 2015-12-02 | ||
### Changed | ||
- Documentation on how to make the widgets. | ||
|
||
### Removed | ||
- `make-widget-sync` - we're all async, all the time. | ||
|
||
### Fixed | ||
- Fixed widget maker to keep working when daylight savings switches over. | ||
|
||
## 0.1.0 - 2015-12-02 | ||
### Added | ||
- Files from the new template. | ||
- Widget maker public API - `make-widget-sync`. | ||
|
||
[unreleased]: https://github.com/your-name/kubernetes.api/compare/0.1.1...HEAD | ||
[0.1.1]: https://github.com/your-name/kubernetes.api/compare/0.1.0...0.1.1 |
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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 Metric Feat LLC | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,52 @@ | ||
# kubernetes-api | ||
|
||
Kubernetes client API library for Clojure. Functions are generated using macros derived from offical [swagger spec](http://kubernetes.io/swagger-spec/api/v1). | ||
|
||
Documentation available at http://yanatan16.github.io/clj-kubernetes-io | ||
|
||
## Installation | ||
|
||
```clojure | ||
:dependencies [[kubernetes-api "0.1.0"]] | ||
``` | ||
|
||
## Usage | ||
|
||
First, run a kubernetes proxy with `kubectl proxy --port=8080`. | ||
|
||
Each endpoint function returns a [core.async](https://github.com/clojure/core.async) channel. Under the covers, the [http-kit](www.http-kit.org) http client is used. | ||
|
||
```clojure | ||
(require '[kubernetes.api.v1 :as k8s] | ||
'[clojure.core.async :refer [<!!]]) | ||
|
||
;; Make a context for querying k8s | ||
(def ctx (k8s/make-context "http://localhost:8080")) | ||
|
||
;; List all nodes | ||
(<!! (k8s/list-namespaced-nodes ctx)) | ||
|
||
;; Pass an optional parameter | ||
(<!! (k8s/list-namespaced-nodes ctx {:namespace "default"})) | ||
|
||
;; Create a pod | ||
(<!! (k8s/create-namespaced-pod ctx | ||
{:kind "Pod" :metadata {:name "test"} | ||
:spec {:containers [{:name "nginx" :image "nginx"}]}} | ||
{:namespace "default)) | ||
;; Use a label selector when listing pods | ||
(<!! (k8s/list-pod ctx {:label-selector "kube-system=true"})) | ||
``` | ||
## Testing | ||
Start the kubernetes proxy to a running k8s cluster (`kubectl proxy --port=8080`) | ||
```bash | ||
lein test | ||
``` | ||
## License | ||
See [LICENSE](LICENSE) file. |
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,13 @@ | ||
(defproject kubernetes-api "0.1.0-SNAPSHOT" | ||
:description "Kubernetes Client API Library" | ||
:url "https://github.com/yanatan16/clj-kubernetes-api" | ||
:license {:name "MIT" | ||
:url "https://github.com/yanatan16/clj-kubernetes-api/blob/master/LICENSE"} | ||
:dependencies [[org.clojure/clojure "1.7.0"] | ||
[org.clojure/core.async "0.2.374"] | ||
[org.clojure/data.json "0.2.6"] | ||
[http-kit "2.1.18"]] | ||
|
||
:codox {:namespaces [#"kubernetes\.api\.v\d.*"]} | ||
|
||
:profiles {:dev {:plugins [[lein-codox "0.9.0"]]}}) |
Oops, something went wrong.