vendor: update all dependencies to latest versions
This commit is contained in:
+1
-2
@@ -32,8 +32,7 @@ func insertXGoog(ctx context.Context, val []string) context.Context {
|
||||
return metadata.NewOutgoingContext(ctx, md)
|
||||
}
|
||||
|
||||
// DefaultAuthScopes reports the authentication scopes required
|
||||
// by this package.
|
||||
// DefaultAuthScopes reports the default set of authentication scopes to use with this package.
|
||||
func DefaultAuthScopes() []string {
|
||||
return []string{
|
||||
"https://www.googleapis.com/auth/cloud-platform",
|
||||
|
||||
+6
-6
@@ -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...)}
|
||||
@@ -158,8 +158,8 @@ func (c *Client) SyncRecognize(ctx context.Context, req *speechpb.SyncRecognizeR
|
||||
// [google.longrunning.Operations]
|
||||
// (/speech/reference/rest/v1beta1/operations#Operation)
|
||||
// interface. Returns either an
|
||||
// `Operation.error` or an `Operation.response` which contains
|
||||
// an `AsyncRecognizeResponse` message.
|
||||
// Operation.error or an Operation.response which contains
|
||||
// an AsyncRecognizeResponse message.
|
||||
func (c *Client) AsyncRecognize(ctx context.Context, req *speechpb.AsyncRecognizeRequest, opts ...gax.CallOption) (*AsyncRecognizeOperation, error) {
|
||||
ctx = insertXGoog(ctx, c.xGoogHeader)
|
||||
opts = append(c.CallOptions.AsyncRecognize[0:len(c.CallOptions.AsyncRecognize):len(c.CallOptions.AsyncRecognize)], opts...)
|
||||
@@ -212,7 +212,7 @@ func (c *Client) AsyncRecognizeOperation(name string) *AsyncRecognizeOperation {
|
||||
// See documentation of Poll for error-handling information.
|
||||
func (op *AsyncRecognizeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*speechpb.AsyncRecognizeResponse, error) {
|
||||
var resp speechpb.AsyncRecognizeResponse
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user