[ 
https://issues.apache.org/jira/browse/BEAM-3355?focusedWorklogId=88195&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-88195
 ]

ASF GitHub Bot logged work on BEAM-3355:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Apr/18 18:46
            Start Date: 05/Apr/18 18:46
    Worklog Time Spent: 10m 
      Work Description: lostluck commented on a change in pull request #4311: 
[BEAM-3355] Diagnostic interfaces
URL: https://github.com/apache/beam/pull/4311#discussion_r179564273
 
 

 ##########
 File path: sdks/go/pkg/beam/util/grpcx/hook.go
 ##########
 @@ -0,0 +1,88 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package grpcx
+
+import (
+       "context"
+       "fmt"
+       "time"
+
+       "github.com/apache/beam/sdks/go/pkg/beam/core/util/hooks"
+       "google.golang.org/grpc"
+)
+
+// Hook allow a runner to customize various aspects of gRPC
+// communication with the FnAPI harness. Each member of the struct
+// is optional; the default behavior will be used if a value is not
+// supplied.
+type Hook struct {
+       // Dialer allows the runner to customize the gRPC dialing behavior.
+       Dialer func(context.Context, string, time.Duration) (*grpc.ClientConn, 
error)
+       // TODO(wcn): expose other hooks here.
+}
+
+type HookFactory func([]string) Hook
 
 Review comment:
   <!--new_thread; commit:abd6cffe5451804ffdc2a1902dbdf7f3b588c57f; 
resolved:0-->
   Exported types should have a comment.
   
   // HookFactory configures a hook with the provided arguments.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 88195)
    Time Spent: 5h 10m  (was: 5h)

> Make Go SDK runtime harness hooks pluggable
> -------------------------------------------
>
>                 Key: BEAM-3355
>                 URL: https://issues.apache.org/jira/browse/BEAM-3355
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-go
>            Reporter: Henning Rohde
>            Assignee: Bill Neubauer
>            Priority: Minor
>          Time Spent: 5h 10m
>  Remaining Estimate: 0h
>
> We currently hardcode cpu profiling and session recording in the harness. We 
> should make it pluggable instead.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to