Update dependencies

This commit is contained in:
Alexander Neumann
2017-09-13 14:09:48 +02:00
parent f3b49987f8
commit fda563d606
926 changed files with 189726 additions and 98666 deletions

View File

@@ -102,7 +102,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error
client: speechpb.NewSpeechClient(conn),
}
c.SetGoogleClientInfo()
c.setGoogleClientInfo()
c.LROClient, err = lroauto.NewOperationsClient(ctx, option.WithGRPCConn(conn))
if err != nil {
@@ -128,10 +128,10 @@ func (c *Client) Close() error {
return c.conn.Close()
}
// SetGoogleClientInfo sets the name and version of the application in
// setGoogleClientInfo sets the name and version of the application in
// the `x-goog-api-client` header passed on each request. Intended for
// use by Google-written clients.
func (c *Client) SetGoogleClientInfo(keyval ...string) {
func (c *Client) setGoogleClientInfo(keyval ...string) {
kv := append([]string{"gl-go", version.Go()}, keyval...)
kv = append(kv, "gapic", version.Repo, "gax", gax.Version, "grpc", grpc.Version)
c.xGoogHeader = []string{gax.XGoogHeader(kv...)}
@@ -156,8 +156,8 @@ func (c *Client) Recognize(ctx context.Context, req *speechpb.RecognizeRequest,
// LongRunningRecognize performs asynchronous speech recognition: receive results via the
// google.longrunning.Operations interface. Returns either an
// `Operation.error` or an `Operation.response` which contains
// a `LongRunningRecognizeResponse` message.
// Operation.error or an Operation.response which contains
// a LongRunningRecognizeResponse message.
func (c *Client) LongRunningRecognize(ctx context.Context, req *speechpb.LongRunningRecognizeRequest, opts ...gax.CallOption) (*LongRunningRecognizeOperation, error) {
ctx = insertXGoog(ctx, c.xGoogHeader)
opts = append(c.CallOptions.LongRunningRecognize[0:len(c.CallOptions.LongRunningRecognize):len(c.CallOptions.LongRunningRecognize)], opts...)
@@ -210,7 +210,7 @@ func (c *Client) LongRunningRecognizeOperation(name string) *LongRunningRecogniz
// See documentation of Poll for error-handling information.
func (op *LongRunningRecognizeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*speechpb.LongRunningRecognizeResponse, error) {
var resp speechpb.LongRunningRecognizeResponse
if err := op.lro.Wait(ctx, &resp, opts...); err != nil {
if err := op.lro.WaitWithInterval(ctx, &resp, 45000*time.Millisecond, opts...); err != nil {
return nil, err
}
return &resp, nil