mirror of
https://github.com/restic/restic.git
synced 2025-08-25 12:37:32 +00:00
Update dependencies
This commit is contained in:
12
vendor/cloud.google.com/go/speech/apiv1/speech_client.go
generated
vendored
12
vendor/cloud.google.com/go/speech/apiv1/speech_client.go
generated
vendored
@@ -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
|
||||
|
Reference in New Issue
Block a user