From feda86c37d0b9b7f56746a7418b6344527e5a286 Mon Sep 17 00:00:00 2001 From: Mark McDonnell Date: Mon, 30 Oct 2023 13:23:46 +0000 Subject: [PATCH] docs: support for Compute (#476) * docs: support for Compute * Update DEVELOPMENT.md * Update DEVELOPMENT.md --- DEVELOPMENT.md | 17 +++++++++++++++++ README.md | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 7a07cb556..050177a8c 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -13,3 +13,20 @@ ```bash $ make all ``` + +## Compute + +Support for the [Fastly Compute](https://www.fastly.com/products/edge-compute) platform is still in development. + +There are known issues with the use of Go's `reflect` package and for TinyGo support to mature. + +> **NOTE:** The go-fastly API client uses [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) + +If using standard Go (not TinyGo) then a usable client can be achieved with: + +```go +client, err := fastly.NewClient("FASTLY_API_KEY") +client.HTTPClient.Transport = fsthttp.NewTransport("fastly") +``` + +This presumes you have a backend named `fastly` pointing to `https://api.fastly.com` diff --git a/README.md b/README.md index d025d73f5..c65490a2a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A Go client library for interacting with most facets of the [Fastly API](https://docs.fastly.com/api). -This library is not intended for use on the [Fastly Compute](https://www.fastly.com/products/edge-compute) platform. +> **NOTE:** This API client may not function correctly when used on the [Fastly Compute](https://www.fastly.com/products/edge-compute) platform. Support for Compute is on the roadmap but has not yet been prioritised ([details](./DEVELOPMENT.md#compute)). ## Usage