Skip to content

Commit

Permalink
docs: add provider to the documentation (open-feature#1027)
Browse files Browse the repository at this point in the history
  • Loading branch information
beeme1mr authored and olunusib committed Jan 16, 2024
1 parent dbbb7b2 commit 0f8802b
Show file tree
Hide file tree
Showing 17 changed files with 495 additions and 402 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ go.work
go.work.sum
bin/
node_modules/
.venv

# built documentation
site
Expand Down
11 changes: 6 additions & 5 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ ignores:
- "node_modules"
- "playground-app/node_modules"
- "tmp"
- "**/protos.md" # auto-generated
- "docs/playground" # auto-generated
- "schemas" # submodule
- "spec" # submodule
- "test-harness" # submodule
- "**/protos.md" # auto-generated
- "docs/playground" # auto-generated
- "docs/providers/*.md" # auto-generated
- "schemas" # submodule
- "spec" # submodule
- "test-harness" # submodule
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM squidfunk/mkdocs-material:9.5
RUN pip install mkdocs-include-markdown-plugin
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ generate-proto-docs: pull-schemas-submodule

.PHONY: run-web-docs
run-web-docs: generate-docs generate-proto-docs
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material
docker build -t squidfunk/mkdocs-material . \
&& docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material

# Run the playground app in dev mode
# See the readme in the playground-app folder for more details
Expand Down
32 changes: 4 additions & 28 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ docker pull ghcr.io/open-feature/flagd:latest
FROM ghcr.io/open-feature/flagd:latest
```

### Kubernetes
## Kubernetes

flagd was designed with cloud-native paradigms in mind.
You can run it as a sidecar, or as a central service in your cluster.
Expand Down Expand Up @@ -50,31 +50,7 @@ brew install flagd
go install github.com/open-feature/flagd/flagd@latest
```

---

## In-Process

### :fontawesome-brands-golang: Go in-process provider

[flagd-in-process/pkg](https://pkg.go.dev/github.com/open-feature/go-sdk-contrib/providers/flagd-in-process/pkg)

```shell
go get github.com/open-feature/go-sdk-contrib/providers/flagd-in-process/pkg@latest
```
## Summary

### :fontawesome-brands-java: Java in-process provider

#### Maven

```xml
<dependency>
<groupId>dev.openfeature.contrib.providers</groupId>
<artifactId>flagd</artifactId>
</dependency>
```

#### Gradle

```gradle
implementation 'dev.openfeature.contrib.providers:flagd'
```
Once flagd is installed, you can start using it within your application.
Check out the [OpenFeature providers page](./providers/index.md) to learn more.
8 changes: 8 additions & 0 deletions docs/providers/dotnet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# .NET provider

## Installation

{%
include "https://raw.githubusercontent.com/open-feature/dotnet-sdk-contrib/main/src/OpenFeature.Contrib.Providers.Flagd/README.md"
start="## Install dependencies"
%}
9 changes: 9 additions & 0 deletions docs/providers/go.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Go provider

## Installation

{%
include "https://raw.githubusercontent.com/open-feature/go-sdk-contrib/main/providers/flagd/README.md"
start="## Installation"
end="## License"
%}
25 changes: 25 additions & 0 deletions docs/providers/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: OpenFeature Providers
description: Overview of the available flagd providers compatible with OpenFeature.
---

flagd was built from the ground up to be [Openfeature-compliant](../concepts/feature-flagging.md#openfeature-compliance).
To use it in your application, you must use the [OpenFeature SDK](https://openfeature.dev/docs/reference/technologies/) for your language, along with the associated OpenFeature _provider_.
For more information about Openfeature providers, see the [OpenFeature documentation](https://openfeature.dev/docs/reference/concepts/provider).

## Providers

Providers for flagd come in two flavors: those that are built to communicate with a flagd instance (over HTTP or gRPC) and those that embed flagd's evaluation engine directly (note that some providers are capable of operating in either mode). For more information on how to deploy and use flagd, see [architecture](../architecture.md) and [installation](../installation.md).

The following table lists all the available flagd providers.

| Technology | RPC | in-process |
| ------------------------------------------------------------- | ---------------- | ---------------- |
| :fontawesome-brands-golang: [Go](./go.md) | :material-check: | :material-check: |
| :fontawesome-brands-java: [Java](./java.md) | :material-check: | :material-check: |
| :fontawesome-brands-node-js: [Node.JS](./nodejs.md) | :material-check: | :material-check: |
| :simple-php: [PHP](./php.md) | :material-check: | :material-close: |
| :simple-dotnet: [.NET](./dotnet.md) | :material-check: | :material-close: |
| :material-web: [Web](./web.md) | :material-check: | :material-close: |

For information on implementing a flagd provider, see the specifications for [RPC](../reference/specifications/rpc-providers.md) and [in-process](../reference/specifications/in-process-providers.md) providers.
8 changes: 8 additions & 0 deletions docs/providers/java.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Java provider

## Installation

{%
include "https://raw.githubusercontent.com/open-feature/java-sdk-contrib/main/providers/flagd/README.md"
start="## Installation"
%}
9 changes: 9 additions & 0 deletions docs/providers/nodejs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Node.js provider

## Installation

{%
include "https://raw.githubusercontent.com/open-feature/js-sdk-contrib/main/libs/providers/flagd/README.md"
start="## Installation"
end="## Building"
%}
8 changes: 8 additions & 0 deletions docs/providers/php.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# PHP provider

## Installation

{%
include "https://raw.githubusercontent.com/open-feature/php-sdk-contrib/main/providers/Flagd/README.md"
start="## Installation"
%}
10 changes: 10 additions & 0 deletions docs/providers/web.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

# Web provider

## Installation

{%
include "https://raw.githubusercontent.com/open-feature/js-sdk-contrib/main/libs/providers/flagd-web/README.md"
start="## Installation"
end="## Building"
%}
11 changes: 0 additions & 11 deletions docs/reference/providers.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/reference/specifications/rpc-providers.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
description: flagd RPC proivider specification
description: flagd RPC provider specification
---

# Creating an RPC flagd provider
Expand All @@ -12,7 +12,7 @@ as it is done in the [OpenFeature Operator](https://github.com/open-feature/open
Prerequisites:

- Understanding of [general provider concepts](https://openfeature.dev/docs/reference/concepts/provider/)
- Proficiency in the chosen programming language (check the language isn't already covered by the [existing providers](../providers.md))
- Proficiency in the chosen programming language (check the language isn't already covered by the [existing providers](../../providers/index.md))

## flagd Evaluation API

Expand Down
29 changes: 23 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ theme:
- search.suggest
- search.highlight
- search.share
- content.tooltips
- navigation.instant
- navigation.tracking
- navigation.indexes
extra_css:
- assets/extra.css

Expand All @@ -45,7 +49,8 @@ markdown_extensions:
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.snippets:
url_download: true
- admonition
- pymdownx.details
- pymdownx.superfences:
Expand All @@ -57,9 +62,8 @@ markdown_extensions:
- attr_list
- md_in_html
- pymdownx.emoji:
# we are using an older emoji extension because the newest (suggested in docs) doesn't work with Python < 3.10
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg

nav:
- 'Introduction': 'index.md'
Expand All @@ -70,6 +74,14 @@ nav:
- 'Feature Flagging': 'concepts/feature-flagging.md'
- 'Syncs': 'concepts/syncs.md'
- 'Architecture': 'architecture.md'
- 'OpenFeature Providers':
- 'providers/index.md'
- 'Go': 'providers/go.md'
- 'Java': 'providers/java.md'
- 'Node.JS': 'providers/nodejs.md'
- 'PHP': 'providers/php.md'
- '.NET': 'providers/dotnet.md'
- 'Web': 'providers/web.md'
- 'Reference':
- 'CLI':
- 'Overview': 'reference/flagd-cli/flagd.md'
Expand All @@ -82,7 +94,6 @@ nav:
- 'Fractional': 'reference/custom-operations/fractional-operation.md'
- 'Semantic Version': 'reference/custom-operations/semver-operation.md'
- 'String Comparison': 'reference/custom-operations/string-comparison-operation.md'
- 'Providers': 'reference/providers.md'
- 'Monitoring': 'reference/monitoring.md'
- 'Specifications':
- 'RPC Providers': 'reference/specifications/rpc-providers.md'
Expand All @@ -101,4 +112,10 @@ nav:
- 'Troubleshooting': 'troubleshooting.md'
plugins:
- social
- search
- search
# https://github.com/mondeja/mkdocs-include-markdown-plugin
- include-markdown
# https://github.com/mkdocs/mkdocs-redirects
- redirects:
redirect_maps:
'reference/providers.md': 'providers/index.md'
Loading

0 comments on commit 0f8802b

Please sign in to comment.