Go SDK
kloakd-go - idiomatic Go client
1 min read
Install
go get github.com/kloakd/kloakd-go
Go 1.21+ | 71/71 tests | 82.7% coverage | zero dependencies (stdlib net/http)
Client
import kloakd "github.com/kloakd/kloakd-go"
client := kloakd.MustNew(kloakd.Config{
APIKey: os.Getenv("KLOAKD_API_KEY"),
OrganizationID: os.Getenv("KLOAKD_ORG_ID"),
Timeout: 30 * time.Second,
MaxRetries: 3,
})
SSE streaming (channels)
ch, _ := client.Evadr.FetchStream("https://example.com", nil)
for event := range ch {
if event.Err != nil { break }
fmt.Println(event.Type, event.Tier)
}
Was this page helpful?