https://github.com/voyagermesh/java
Official Java client library for Voyager by AppsCode
https://github.com/voyagermesh/java
Last synced: about 2 months ago
JSON representation
Official Java client library for Voyager by AppsCode
- Host: GitHub
- URL: https://github.com/voyagermesh/java
- Owner: voyagermesh
- License: apache-2.0
- Created: 2018-04-15T03:18:02.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-22T23:54:24.000Z (almost 7 years ago)
- Last Synced: 2023-10-29T04:34:45.273Z (over 1 year ago)
- Language: Java
- Homepage: https://appscode.com/products/voyager/
- Size: 322 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Voyager Java Client
[](https://travis-ci.org/voyager-client/java)
[](http://bit.ly/kubernetes-client-capabilities-badge)
[](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.appscode.voyager%22%20a%3A%22client-java%22)Official Java client for the [Voyager by AppsCode](https://appscode.com/products/voyager/) - Secure HAProxy Ingress Controller for Kubernetes.
## Installation
To install the Java client library to your local Maven repository, simply execute:
```shell
git clone --recursive https://github.com/voyager-client/java
cd java
mvn install
```Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
### Maven users
Add this dependency to your project's POM:
```xml
com.appscode.voyager
client-java
0.1.0
compile```
### Gradle users
```groovy
compile 'com.appscode.voyager:client-java:0.1.0'
```### Others
At first generate the JAR by executing:
```
git clone --recursive https://github.com/voyager-client/java
cd java
mvn package
```Then manually install the following JARs:
* target/client-java-1.0.0-SNAPSHOT.jar
* target/lib/*.jar## Example
list all pods:
```java
import com.appscode.voyager.client.ApiClient;
import com.appscode.voyager.client.ApiException;
import com.appscode.voyager.client.Configuration;
import com.appscode.voyager.client.apis.VoyagerAppscodeComV1beta1Api;
import com.appscode.voyager.client.models.V1beta1Ingress;
import com.appscode.voyager.client.models.V1beta1IngressList;
import com.appscode.voyager.client.util.Config;
import java.io.IOException;public class Example {
public static void main(String[] args) throws IOException, ApiException {
ApiClient client = Config.defaultClient();
Configuration.setDefaultApiClient(client);VoyagerAppscodeComV1beta1Api api = new VoyagerAppscodeComV1beta1Api();
V1beta1IngressList list =
api.listIngressForAllNamespaces(null, null, null, null, null, null, null, null, null);
for (V1beta1Ingress item : list.getItems()) {
System.out.println(item.getMetadata().getName());
}
}
}
```watch on ingress object:
```java
import com.appscode.voyager.client.ApiClient;
import com.appscode.voyager.client.ApiException;
import com.appscode.voyager.client.Configuration;
import com.appscode.voyager.client.apis.VoyagerAppscodeComV1beta1Api;
import com.appscode.voyager.client.models.V1beta1Ingress;
import com.appscode.voyager.client.util.Config;
import com.appscode.voyager.client.util.Watch;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import java.util.concurrent.TimeUnit;public class WatchExample {
public static void main(String[] args) throws IOException, ApiException {
ApiClient client = Config.defaultClient();
client.getHttpClient().setReadTimeout(60, TimeUnit.SECONDS);
Configuration.setDefaultApiClient(client);VoyagerAppscodeComV1beta1Api api = new VoyagerAppscodeComV1beta1Api();
Watch watch =
Watch.createWatch(
client,
api.listIngressForAllNamespacesCall(
null, null, null, null, null, "false", null, null, Boolean.TRUE, null, null),
new TypeToken>() {}.getType());for (Watch.Response item : watch) {
System.out.printf("%s : %s%n", item.type, item.object.getMetadata().getName());
}
}
}
```More examples can be found in [examples](examples/) folder. To run examples, run this command:
```shell
mvn exec:java -Dexec.mainClass="com.appscode.voyager.client.examples.Example"
```## Documentation
All APIs and Models' documentation can be found at the [Generated client's README file](kubernetes/README.md)
## Compatibility
| | Kubernetes 1.4 | Kubernetes 1.5 | Kubernetes 1.6 | Kubernetes 1.7 | Kubernetes 1.8 | Kubernetes 1.9 |
|--------------------------|----------------|----------------|----------------|----------------|----------------|----------------|
| java-client 0.1.0 | + | + | + | + | ✓ | - |Key:
* `✓` Exactly the same features / API objects in both java-client and the Kubernetes
version.
* `+` java-client has features or api objects that may not be present in the
Kubernetes cluster, but everything they have in common will work.
* `-` The Kubernetes cluster has features the java-client library can't use
(additional API objects, etc).See the [CHANGELOG](./CHANGELOG.md) for a detailed description of changes
between java-client versions.## Community, Support, Discussion
We use Slack for public discussions. To chit chat with us or the rest of the community, join us in the [AppsCode Slack team](https://appscode.slack.com/messages/C0XQFLGRM/details/) channel `#general`. To sign up, use our [Slack inviter](https://slack.appscode.com/).
If you have any problem with the package or any suggestions, please file an [issue](https://github.com/voyager-client/java/issues).
# Development
## Update client
To update the client clone the `gen` repo and run this command at the root of this repo:
```bash
../gen/openapi/autoupdate.sh
```