MCPcopy Create free account
hub / github.com/aws-samples/aws-lambda-extensions / NewClient

Function NewClient

cache-extension-demo/extension/client.go:59–65  ·  view source on GitHub ↗

NewClient returns a Lambda Extensions API client

(awsLambdaRuntimeAPI string)

Source from the content-addressed store, hash-verified

57
58// NewClient returns a Lambda Extensions API client
59func NewClient(awsLambdaRuntimeAPI string) *Client {
60 baseURL := fmt.Sprintf("http://%s/2020-01-01/extension", awsLambdaRuntimeAPI)
61 return &Client{
62 baseURL: baseURL,
63 httpClient: &http.Client{},
64 }
65}
66
67// Register will register the extension with the Extensions API
68func (e *Client) Register(ctx context.Context, filename string) (*RegisterResponse, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected