elastic / cloud-sdk-go

Apache License 2.0
21 stars 46 forks source link

Add context to calls that create SearchDeploymentsParams #482

Closed orestisfl closed 1 month ago

orestisfl commented 2 months ago

Something I saw missing from our usage of the cloud-sdk.

Description

Adds a proper context object to API functions that create SearchDeploymentsParams structs.

Motivation and Context

Adding a context to http calls is considered best practice in Go.

How Has This Been Tested?

I haven't tested this but I don't think more coverage is needed as the default case (no context) will behave the same and if a context is provided, it will be passed to the http client.

Types of Changes

Readiness Checklist