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

Function NewClient

go-example-extension/extension/client.go:65–71  ·  view source on GitHub ↗

NewClient returns a Lambda Extensions API client

(awsLambdaRuntimeAPI string)

Source from the content-addressed store, hash-verified

63
64// NewClient returns a Lambda Extensions API client
65func NewClient(awsLambdaRuntimeAPI string) *Client {
66 baseURL := fmt.Sprintf("http://%s/2020-01-01/extension", awsLambdaRuntimeAPI)
67 return &Client{
68 baseURL: baseURL,
69 httpClient: &http.Client{},
70 }
71}
72
73// Register will register the extension with the Extensions API
74func (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