Skip to content

robherley/groundcontrol-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

groundcontrol-go 🚀

An unoffical Go client for GroundControl

Setup

go get github.com/robherley/groundcontrol-go

Usage

client := groundcontrol.New("<project>", "<apikey>")

// check globally enabled
client.IsFeatureFlagEnabled(ctx, "my-feature-flag")

// check enablement for single actor
client.IsFeatureFlagEnabled(ctx, "my-feature-flag", groundcontrol.Actor("alice"))

// or multiple actors
client.IsFeatureFlagEnabled(ctx, "my-feature-flag", groundcontrol.Actor("alice"), groundcontrol.Actor("bob"))

Options

WithBaseURL

Sets the base URL of the client:

client := groundcontrol.New("<project>", "<apikey>", groundcontrol.WithBaseURL("http://localhost:8080"))

WithHTTPClient

Sets the underlying net/http.Client:

// e.g. hashicorp/go-retryablehttp
retryClient := retryablehttp.NewClient().StandardClient()

client := groundcontrol.New("<project>", "<apikey>", groundcontrol.WithHTTPClient(retryClient))

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages