in custom-targets/vertex-ai-pipeline/pipeline-deployer/main.go [35:66]
func do() error {
ctx := context.Background()
gcsClient, err := storage.NewClient(ctx)
if err != nil {
return fmt.Errorf("unable to create gcs client: %v", err)
}
flag.Parse()
req, err := clouddeploy.DetermineRequest(ctx, gcsClient, []string{"CANARY"})
if err != nil {
return err
}
params, err := determineParams()
if err != nil {
return fmt.Errorf("unable to parse params: %v", err)
}
aiPlatformService, err := newAIPlatformService(ctx, params.location)
if err != nil {
return fmt.Errorf("unable to create aiplatform.Service object : %v", err)
}
handler, err := createRequestHandler(req, params, gcsClient, aiPlatformService)
if err != nil {
return fmt.Errorf("unable to create request handler: %v", err)
}
return handler.process(ctx)
}