Skip to content

Commit

Permalink
docs: add namespace docs (#521)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Waters <[email protected]>
  • Loading branch information
andrew-waters committed Jun 7, 2024
1 parent b90eb4d commit c3973a6
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions providers/flipt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,33 @@ func main() {

## Configuration

The Flipt provider allows you to change the [namespace](https://docs.flipt.io/concepts#namespaces) that the evaluation is performed against. If not provided, it defaults to the `Default` namespace:

### Target Namespace

```go
provider := flipt.NewProvider(flipt.ForNamespace("your-namespace"))
```

### Protocol

The Flipt provider allows you to communicate with Flipt over either HTTP(S) or GRPC, depending on the address provided.

### HTTP(S)
#### HTTP(S)

```go
provider := flipt.NewProvider(flipt.WithAddress("https://localhost:443"))
```

#### Unix Socket
##### Unix Socket

```go
provider := flipt.NewProvider(flipt.WithAddress("unix:///path/to/socket"))
```

### GRPC
#### GRPC

#### HTTP/2
##### HTTP/2

```go
type Token string
Expand All @@ -90,7 +100,7 @@ provider := flipt.NewProvider(
)
```

#### Unix Socket
##### Unix Socket

```go
provider := flipt.NewProvider(
Expand Down

0 comments on commit c3973a6

Please sign in to comment.