[
https://issues.apache.org/jira/browse/BEAM-13829?focusedWorklogId=749713&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-749713
]
ASF GitHub Bot logged work on BEAM-13829:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Mar/22 23:15
Start Date: 29/Mar/22 23:15
Worklog Time Spent: 10m
Work Description: lostluck commented on a change in pull request #16957:
URL: https://github.com/apache/beam/pull/16957#discussion_r837982546
##########
File path: sdks/go/pkg/beam/core/runtime/harness/harness.go
##########
@@ -36,14 +36,27 @@ import (
"google.golang.org/grpc"
)
+// StatusAddress is a type of status endpoint address as an optional argument
to harness.Main().
+type StatusAddress string
+
// TODO(herohde) 2/8/2017: for now, assume we stage a full binary (not a
plugin).
// Main is the main entrypoint for the Go harness. It runs at "runtime" -- not
// "pipeline-construction time" -- on each worker. It is a FnAPI client and
// ultimately responsible for correctly executing user code.
-func Main(ctx context.Context, loggingEndpoint, controlEndpoint string) error {
+func Main(ctx context.Context, loggingEndpoint, controlEndpoint string,
options ...interface{}) error {
hooks.DeserializeHooksFromOptions(ctx)
+ statusEndpoint := ""
+ for _, option := range options {
+ switch option := option.(type) {
+ case StatusAddress:
+ statusEndpoint = string(option)
+ default:
+ return errors.Errorf("unkown type %T, value %v in error
call", option, option)
Review comment:
```suggestion
return errors.Errorf("unknown type %T, value %v in
error call", option, option)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 749713)
Time Spent: 7.5h (was: 7h 20m)
> Expose status api from Go SDK Harness
> -------------------------------------
>
> Key: BEAM-13829
> URL: https://issues.apache.org/jira/browse/BEAM-13829
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-go
> Reporter: Ritesh Ghorse
> Assignee: Ritesh Ghorse
> Priority: P2
> Time Spent: 7.5h
> Remaining Estimate: 0h
>
> Expose status api handle from Go SDK harness to runner.
> Doc link:
> https://docs.google.com/document/d/1dMTD5_sKdzLcnoe0ZsQU5Wf9q11uliyYgFnnOZQDzuI/edit?usp=sharing
--
This message was sent by Atlassian Jira
(v8.20.1#820001)