diff --git a/cmd/zrok/reserve.go b/cmd/zrok/reserve.go index 69e6ecf55..b6be848d0 100644 --- a/cmd/zrok/reserve.go +++ b/cmd/zrok/reserve.go @@ -87,6 +87,7 @@ func (cmd *reserveCommand) run(_ *cobra.Command, args []string) { } req := &sdk.ShareRequest{ + Reserved: true, BackendMode: sdk.BackendMode(cmd.backendMode), ShareMode: shareMode, BasicAuth: cmd.basicAuth, diff --git a/sdk/model.go b/sdk/model.go index cefb1eb0e..4c27ecd9a 100644 --- a/sdk/model.go +++ b/sdk/model.go @@ -20,6 +20,7 @@ const ( ) type ShareRequest struct { + Reserved bool BackendMode BackendMode ShareMode ShareMode Target string diff --git a/sdk/share.go b/sdk/share.go index 9a1838b86..45feb57fd 100644 --- a/sdk/share.go +++ b/sdk/share.go @@ -25,6 +25,7 @@ func CreateShare(root env_core.Root, request *ShareRequest) (*Share, error) { default: return nil, errors.Errorf("unknown share mode '%v'", request.ShareMode) } + out.Body.Reserved = request.Reserved if len(request.BasicAuth) > 0 { out.Body.AuthScheme = string(Basic)