mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 05:09:58 +00:00
TUN-1734: Pin packages at exact versions
This commit is contained in:
29
vendor/github.com/equinox-io/equinox/sdk_ctx.go
generated
vendored
Normal file
29
vendor/github.com/equinox-io/equinox/sdk_ctx.go
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
// +build go1.7
|
||||
|
||||
package equinox
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
// CheckContext is like Check but includes a context.
|
||||
func CheckContext(ctx context.Context, appID string, opts Options) (Response, error) {
|
||||
var req, err = checkRequest(appID, &opts)
|
||||
|
||||
if err != nil {
|
||||
return Response{}, err
|
||||
}
|
||||
|
||||
return doCheckRequest(opts, req.WithContext(ctx))
|
||||
}
|
||||
|
||||
// ApplyContext is like Apply but includes a context.
|
||||
func (r Response) ApplyContext(ctx context.Context) error {
|
||||
var req, opts, err = r.applyRequest()
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return r.applyUpdate(req.WithContext(ctx), opts)
|
||||
}
|
Reference in New Issue
Block a user