Skip to content

Commit

Permalink
feat: add basic documentation for all the language clients
Browse files Browse the repository at this point in the history
  • Loading branch information
yquansah committed Jan 9, 2024
1 parent b564cca commit 5c64264
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.
12 changes: 12 additions & 0 deletions flipt-client-java/README.md
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 10 additions & 0 deletions flipt-client-node/README.md
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 10 additions & 0 deletions flipt-client-python/README.md
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 10 additions & 0 deletions flipt-client-rust/README.md
Original file line number Diff line number Diff line change
@@ -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.
27 changes: 27 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
@@ -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
```

0 comments on commit 5c64264

Please sign in to comment.