From 5c64264abe3cad42aee4f14cdfe85cc07fb63eb5 Mon Sep 17 00:00:00 2001 From: Yoofi Quansah Date: Mon, 8 Jan 2024 18:13:51 -0600 Subject: [PATCH] feat: add basic documentation for all the language clients --- README.md | 19 ++++++++++++++++++- flipt-client-java/README.md | 12 ++++++++++++ flipt-client-node/README.md | 10 ++++++++++ flipt-client-python/README.md | 10 ++++++++++ flipt-client-rust/README.md | 10 ++++++++++ test/README.md | 27 +++++++++++++++++++++++++++ 6 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 flipt-client-java/README.md create mode 100644 test/README.md diff --git a/README.md b/README.md index 676a0fe..4597ea9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,20 @@ # Flipt Server SDKs -This repository centralizes the server-side SDKs for [Flipt](https://github.com/flipt-io/flipt). +This repository is a monorepo which contains the source code for SDKs in various languages. Each client interacts directly with an upstream server and can perform one of three of the following operations via HTTP: + +1. [Variant](https://github.com/flipt-io/flipt/blob/main/internal/server/evaluation/evaluation.go#L24) +2. [Boolean](https://github.com/flipt-io/flipt/blob/main/internal/server/evaluation/evaluation.go#L90) +3. [Batch](https://github.com/flipt-io/flipt/blob/main/internal/server/evaluation/evaluation.go#L248) + +## Language Support + +This list is highly subject to change as our list of clients will grow over time. Currently, we support the following languages: + +1. [Python](./flipt-client-python) +2. [NodeJS](./flipt-client-node) +3. [Java](./flipt-client-java) +4. [Rust](./flipt-client-rust) + +## Installation + +Please refer to each individual language client's README to see how you can install and use it. diff --git a/flipt-client-java/README.md b/flipt-client-java/README.md new file mode 100644 index 0000000..8e79a15 --- /dev/null +++ b/flipt-client-java/README.md @@ -0,0 +1,12 @@ +# Flipt Client Java + +This directory contains the Java source code for the Java server side SDK. + +## Installation + +```sh +``` + +## Usage + +In the [examples](./examples) directory, there is an example Java program which imports in the flipt client, and uses it appropriately, please refer to that for how to use the client. diff --git a/flipt-client-node/README.md b/flipt-client-node/README.md index e692e6a..feaf538 100644 --- a/flipt-client-node/README.md +++ b/flipt-client-node/README.md @@ -1,3 +1,13 @@ # Flipt Client Node This directory contains the TypeScript source code for the TypeScript server side SDK. + +## Installation + +```sh +npm i @flipt-io/flipt@{version} +``` + +## Usage + +In the [example](./example) directory, there is an example TypeScript program which imports in the flipt client, and uses it appropriately, please refer to that for how to use the client. diff --git a/flipt-client-python/README.md b/flipt-client-python/README.md index ca59107..fe30422 100644 --- a/flipt-client-python/README.md +++ b/flipt-client-python/README.md @@ -1,3 +1,13 @@ # Flipt Client Pyton This directory contains the Python source code for the Python server side SDK. + +## Installation + +```sh +pip install flipt=={version} +``` + +## Usage + +In the [example](./example) directory, there is an example Python program which imports in the flipt client, and uses it appropriately, please refer to that for how to use the client. diff --git a/flipt-client-rust/README.md b/flipt-client-rust/README.md index 7b08368..70ea306 100644 --- a/flipt-client-rust/README.md +++ b/flipt-client-rust/README.md @@ -1,3 +1,13 @@ # Flipt Client Rust This directory contains the Rust source code for the Rust server side SDK. + +## Installation + +```sh +cargo add flipt +``` + +## Usage + +In the [examples](./examples) directory, there is an example Rust program which imports in the flipt client, and uses it appropriately, please refer to that for how to use the client. diff --git a/test/README.md b/test/README.md new file mode 100644 index 0000000..a747968 --- /dev/null +++ b/test/README.md @@ -0,0 +1,27 @@ +# Integration Tests + +The different languages clients should all have an integration test suite that is dependent on the dynamic library being present somewhere and a running instance of Flipt. + +In the `test/` directory we will use [Dagger](https://dagger.io/) to orchestrate setting up the dependencies for running the test suites for the different languages. + +## Requirements + +Make sure you have `dagger` installed. This module is pinned to `v0.9.5` currently. + +Here are the [Dagger Installation Instructions](https://docs.dagger.io/quickstart/729236/cli). + +## Running Tests + +From the root of this repository you can run: + +```bash +dagger run go run ./test +``` + +This will run integration tests for every language that is supported. If you wish to filter specific languages to test, there is a flag `-languages` which accepts a comma-separated list of values. + +e.g. + +```bash +dagger run go run ./test -languages=python,rust,node +```