Skip to content

Commit

Permalink
add get starlark plan yaml to api
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Aug 30, 2024
1 parent 546c1c9 commit 8df95e7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions api/golang/core/lib/enclaves/enclave_context.go
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,31 @@ func (enclaveCtx *EnclaveContext) GetStarlarkRun(ctx context.Context) (*kurtosis
return response, nil
}

func (enclaveCtx *EnclaveContext) GetStarlarkPackagePlanYaml(ctx context.Context, packageId string, serializedParams string) (*kurtosis_core_rpc_api_bindings.PlanYaml, error) {
response, err := enclaveCtx.client.GetStarlarkPackagePlanYaml(ctx, &kurtosis_core_rpc_api_bindings.StarlarkPackagePlanYamlArgs{
PackageId: packageId,
SerializedParams: &serializedParams,
RelativePathToMainFile: nil,
MainFunctionName: nil,
})
if err != nil {
return nil, stacktrace.Propagate(err, "An error occurred while getting the starlark package plan yaml run.")
}
return response, nil
}

func (enclaveCtx *EnclaveContext) GetStarlarkScriptPlanYaml(ctx context.Context, serializedScript string, serializedParams string) (*kurtosis_core_rpc_api_bindings.PlanYaml, error) {
response, err := enclaveCtx.client.GetStarlarkScriptPlanYaml(ctx, &kurtosis_core_rpc_api_bindings.StarlarkScriptPlanYamlArgs{
SerializedScript: serializedScript,
SerializedParams: &serializedParams,
MainFunctionName: nil,
})
if err != nil {
return nil, stacktrace.Propagate(err, "An error occurred while getting the last starlark script plan yaml run.")
}
return response, nil
}

// ====================================================================================================
//
// Private helper methods
Expand Down

0 comments on commit 8df95e7

Please sign in to comment.