- 0.116.0 (latest)
- 0.115.1
- 0.114.0
- 0.113.0
- 0.112.2
- 0.111.0
- 0.110.10
- 0.109.0
- 0.108.0
- 0.107.0
- 0.106.0
- 0.105.0
- 0.104.0
- 0.103.0
- 0.102.1
- 0.101.1
- 0.100.2
- 0.99.0
- 0.98.0
- 0.97.0
- 0.96.0
- 0.95.0
- 0.94.1
- 0.93.3
- 0.92.3
- 0.91.1
- 0.90.0
- 0.89.0
- 0.88.0
- 0.87.0
- 0.86.0
- 0.85.0
- 0.84.0
- 0.83.0
- 0.82.0
- 0.81.0
- 0.80.0
- 0.79.0
- 0.78.0
- 0.77.0
- 0.76.0
- 0.75.0
Package networkconnectivity is an auto-generated package for the Network Connectivity API.
The Network Connectivity API will be home to various services which provide information pertaining to network connectivity.
NOTE: This package is in alpha. It is not stable, and is likely to change.
Use of Context
The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go.
Functions
func DefaultAuthScopes
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
CreateHubOperation
type CreateHubOperation struct {
// contains filtered or unexported fields
}
CreateHubOperation manages a long-running operation from CreateHub.
func (*CreateHubOperation) Done
func (op *CreateHubOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateHubOperation) Metadata
func (op *CreateHubOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateHubOperation) Name
func (op *CreateHubOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateHubOperation) Poll
func (op *CreateHubOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Hub, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateHubOperation) Wait
func (op *CreateHubOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Hub, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateSpokeOperation
type CreateSpokeOperation struct {
// contains filtered or unexported fields
}
CreateSpokeOperation manages a long-running operation from CreateSpoke.
func (*CreateSpokeOperation) Done
func (op *CreateSpokeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateSpokeOperation) Metadata
func (op *CreateSpokeOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateSpokeOperation) Name
func (op *CreateSpokeOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateSpokeOperation) Poll
func (op *CreateSpokeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateSpokeOperation) Wait
func (op *CreateSpokeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteHubOperation
type DeleteHubOperation struct {
// contains filtered or unexported fields
}
DeleteHubOperation manages a long-running operation from DeleteHub.
func (*DeleteHubOperation) Done
func (op *DeleteHubOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteHubOperation) Metadata
func (op *DeleteHubOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteHubOperation) Name
func (op *DeleteHubOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteHubOperation) Poll
func (op *DeleteHubOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteHubOperation) Wait
func (op *DeleteHubOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteSpokeOperation
type DeleteSpokeOperation struct {
// contains filtered or unexported fields
}
DeleteSpokeOperation manages a long-running operation from DeleteSpoke.
func (*DeleteSpokeOperation) Done
func (op *DeleteSpokeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteSpokeOperation) Metadata
func (op *DeleteSpokeOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteSpokeOperation) Name
func (op *DeleteSpokeOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteSpokeOperation) Poll
func (op *DeleteSpokeOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteSpokeOperation) Wait
func (op *DeleteSpokeOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
HubCallOptions
type HubCallOptions struct {
ListHubs []gax.CallOption
GetHub []gax.CallOption
CreateHub []gax.CallOption
UpdateHub []gax.CallOption
DeleteHub []gax.CallOption
ListSpokes []gax.CallOption
GetSpoke []gax.CallOption
CreateSpoke []gax.CallOption
UpdateSpoke []gax.CallOption
DeleteSpoke []gax.CallOption
}
HubCallOptions contains the retry settings for each method of HubClient.
HubClient
type HubClient struct {
// The call options for this service.
CallOptions *HubCallOptions
// LROClient is used internally to handle long-running operations.
// It is exposed so that its CallOptions can be modified if required.
// Users should not Close this client.
LROClient *lroauto.OperationsClient
// contains filtered or unexported fields
}
HubClient is a client for interacting with Network Connectivity API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Network Connectivity Center is a hub-and-spoke abstraction for network connectivity management in Google Cloud. It reduces operational complexity through a simple, centralized connectivity management model.
func NewHubClient
NewHubClient creates a new hub service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Network Connectivity Center is a hub-and-spoke abstraction for network connectivity management in Google Cloud. It reduces operational complexity through a simple, centralized connectivity management model.
Example
package main
import (
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1alpha1"
"context"
)
func main() {
ctx := context.Background()
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*HubClient) Close
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*HubClient) Connection
func (c *HubClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*HubClient) CreateHub
func (c *HubClient) CreateHub(ctx context.Context, req *networkconnectivitypb.CreateHubRequest, opts ...gax.CallOption) (*CreateHubOperation, error)
CreateHub creates a new Hub in a given project and location.
Example
package main
import (
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1alpha1"
"context"
networkconnectivitypb "google.golang.org/genproto/googleapis/cloud/networkconnectivity/v1alpha1"
)
func main() {
ctx := context.Background()
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.CreateHubRequest{
// TODO: Fill request struct fields.
}
op, err := c.CreateHub(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) CreateHubOperation
func (c *HubClient) CreateHubOperation(name string) *CreateHubOperation
CreateHubOperation returns a new CreateHubOperation from a given name. The name must be that of a previously created CreateHubOperation, possibly from a different process.
func (*HubClient) CreateSpoke
func (c *HubClient) CreateSpoke(ctx context.Context, req *networkconnectivitypb.CreateSpokeRequest, opts ...gax.CallOption) (*CreateSpokeOperation, error)
CreateSpoke creates a new Spoke in a given project and location.
Example
package main
import (
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1alpha1"
"context"
networkconnectivitypb "google.golang.org/genproto/googleapis/cloud/networkconnectivity/v1alpha1"
)
func main() {
ctx := context.Background()
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.CreateSpokeRequest{
// TODO: Fill request struct fields.
}
op, err := c.CreateSpoke(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) CreateSpokeOperation
func (c *HubClient) CreateSpokeOperation(name string) *CreateSpokeOperation
CreateSpokeOperation returns a new CreateSpokeOperation from a given name. The name must be that of a previously created CreateSpokeOperation, possibly from a different process.
func (*HubClient) DeleteHub
func (c *HubClient) DeleteHub(ctx context.Context, req *networkconnectivitypb.DeleteHubRequest, opts ...gax.CallOption) (*DeleteHubOperation, error)
DeleteHub deletes a single Hub.
Example
package main
import (
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1alpha1"
"context"
networkconnectivitypb "google.golang.org/genproto/googleapis/cloud/networkconnectivity/v1alpha1"
)
func main() {
ctx := context.Background()
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.DeleteHubRequest{
// TODO: Fill request struct fields.
}
op, err := c.DeleteHub(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*HubClient) DeleteHubOperation
func (c *HubClient) DeleteHubOperation(name string) *DeleteHubOperation
DeleteHubOperation returns a new DeleteHubOperation from a given name. The name must be that of a previously created DeleteHubOperation, possibly from a different process.
func (*HubClient) DeleteSpoke
func (c *HubClient) DeleteSpoke(ctx context.Context, req *networkconnectivitypb.DeleteSpokeRequest, opts ...gax.CallOption) (*DeleteSpokeOperation, error)
DeleteSpoke deletes a single Spoke.
Example
package main
import (
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1alpha1"
"context"
networkconnectivitypb "google.golang.org/genproto/googleapis/cloud/networkconnectivity/v1alpha1"
)
func main() {
ctx := context.Background()
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.DeleteSpokeRequest{
// TODO: Fill request struct fields.
}
op, err := c.DeleteSpoke(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*HubClient) DeleteSpokeOperation
func (c *HubClient) DeleteSpokeOperation(name string) *DeleteSpokeOperation
DeleteSpokeOperation returns a new DeleteSpokeOperation from a given name. The name must be that of a previously created DeleteSpokeOperation, possibly from a different process.
func (*HubClient) GetHub
func (c *HubClient) GetHub(ctx context.Context, req *networkconnectivitypb.GetHubRequest, opts ...gax.CallOption) (*networkconnectivitypb.Hub, error)
GetHub gets details of a single Hub.
Example
package main
import (
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1alpha1"
"context"
networkconnectivitypb "google.golang.org/genproto/googleapis/cloud/networkconnectivity/v1alpha1"
)
func main() {
ctx := context.Background()
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetHubRequest{
// TODO: Fill request struct fields.
}
resp, err := c.GetHub(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) GetSpoke
func (c *HubClient) GetSpoke(ctx context.Context, req *networkconnectivitypb.GetSpokeRequest, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, error)
GetSpoke gets details of a single Spoke.
Example
package main
import (
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1alpha1"
"context"
networkconnectivitypb "google.golang.org/genproto/googleapis/cloud/networkconnectivity/v1alpha1"
)
func main() {
ctx := context.Background()
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetSpokeRequest{
// TODO: Fill request struct fields.
}
resp, err := c.GetSpoke(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) ListHubs
func (c *HubClient) ListHubs(ctx context.Context, req *networkconnectivitypb.ListHubsRequest, opts ...gax.CallOption) *HubIterator
ListHubs lists Hubs in a given project and location.
Example
package main
import (
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1alpha1"
"context"
"google.golang.org/api/iterator"
networkconnectivitypb "google.golang.org/genproto/googleapis/cloud/networkconnectivity/v1alpha1"
)
func main() {
ctx := context.Background()
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListHubsRequest{
// TODO: Fill request struct fields.
}
it := c.ListHubs(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*HubClient) ListSpokes
func (c *HubClient) ListSpokes(ctx context.Context, req *networkconnectivitypb.ListSpokesRequest, opts ...gax.CallOption) *SpokeIterator
ListSpokes lists Spokes in a given project and location.
Example
package main
import (
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1alpha1"
"context"
"google.golang.org/api/iterator"
networkconnectivitypb "google.golang.org/genproto/googleapis/cloud/networkconnectivity/v1alpha1"
)
func main() {
ctx := context.Background()
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListSpokesRequest{
// TODO: Fill request struct fields.
}
it := c.ListSpokes(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}
func (*HubClient) UpdateHub
func (c *HubClient) UpdateHub(ctx context.Context, req *networkconnectivitypb.UpdateHubRequest, opts ...gax.CallOption) (*UpdateHubOperation, error)
UpdateHub updates the parameters of a single Hub.
Example
package main
import (
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1alpha1"
"context"
networkconnectivitypb "google.golang.org/genproto/googleapis/cloud/networkconnectivity/v1alpha1"
)
func main() {
ctx := context.Background()
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.UpdateHubRequest{
// TODO: Fill request struct fields.
}
op, err := c.UpdateHub(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) UpdateHubOperation
func (c *HubClient) UpdateHubOperation(name string) *UpdateHubOperation
UpdateHubOperation returns a new UpdateHubOperation from a given name. The name must be that of a previously created UpdateHubOperation, possibly from a different process.
func (*HubClient) UpdateSpoke
func (c *HubClient) UpdateSpoke(ctx context.Context, req *networkconnectivitypb.UpdateSpokeRequest, opts ...gax.CallOption) (*UpdateSpokeOperation, error)
UpdateSpoke updates the parameters of a single Spoke.
Example
package main
import (
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1alpha1"
"context"
networkconnectivitypb "google.golang.org/genproto/googleapis/cloud/networkconnectivity/v1alpha1"
)
func main() {
ctx := context.Background()
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.UpdateSpokeRequest{
// TODO: Fill request struct fields.
}
op, err := c.UpdateSpoke(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) UpdateSpokeOperation
func (c *HubClient) UpdateSpokeOperation(name string) *UpdateSpokeOperation
UpdateSpokeOperation returns a new UpdateSpokeOperation from a given name. The name must be that of a previously created UpdateSpokeOperation, possibly from a different process.
HubIterator
type HubIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*networkconnectivitypb.Hub, nextPageToken string, err error)
// contains filtered or unexported fields
}
HubIterator manages a stream of *networkconnectivitypb.Hub.
func (*HubIterator) Next
func (it *HubIterator) Next() (*networkconnectivitypb.Hub, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*HubIterator) PageInfo
func (it *HubIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
SpokeIterator
type SpokeIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*networkconnectivitypb.Spoke, nextPageToken string, err error)
// contains filtered or unexported fields
}
SpokeIterator manages a stream of *networkconnectivitypb.Spoke.
func (*SpokeIterator) Next
func (it *SpokeIterator) Next() (*networkconnectivitypb.Spoke, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*SpokeIterator) PageInfo
func (it *SpokeIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
UpdateHubOperation
type UpdateHubOperation struct {
// contains filtered or unexported fields
}
UpdateHubOperation manages a long-running operation from UpdateHub.
func (*UpdateHubOperation) Done
func (op *UpdateHubOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateHubOperation) Metadata
func (op *UpdateHubOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateHubOperation) Name
func (op *UpdateHubOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateHubOperation) Poll
func (op *UpdateHubOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Hub, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateHubOperation) Wait
func (op *UpdateHubOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Hub, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
UpdateSpokeOperation
type UpdateSpokeOperation struct {
// contains filtered or unexported fields
}
UpdateSpokeOperation manages a long-running operation from UpdateSpoke.
func (*UpdateSpokeOperation) Done
func (op *UpdateSpokeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateSpokeOperation) Metadata
func (op *UpdateSpokeOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*UpdateSpokeOperation) Name
func (op *UpdateSpokeOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateSpokeOperation) Poll
func (op *UpdateSpokeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*UpdateSpokeOperation) Wait
func (op *UpdateSpokeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.