Package edgenetwork is an auto-generated package for the Distributed Cloud Edge Network API.
Network management API for Distributed Cloud Edge.
General documentation
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := edgenetwork.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client
The following is an example of making an API call with the newly created client.
ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := edgenetwork.NewClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &edgenetworkpb.CreateInterconnectAttachmentRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#CreateInterconnectAttachmentRequest. } op, err := c.CreateInterconnectAttachment(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
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.
Functions
func DefaultAuthScopes
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
CallOptions
type CallOptions struct {
InitializeZone []gax.CallOption
ListZones []gax.CallOption
GetZone []gax.CallOption
ListNetworks []gax.CallOption
GetNetwork []gax.CallOption
DiagnoseNetwork []gax.CallOption
CreateNetwork []gax.CallOption
DeleteNetwork []gax.CallOption
ListSubnets []gax.CallOption
GetSubnet []gax.CallOption
CreateSubnet []gax.CallOption
UpdateSubnet []gax.CallOption
DeleteSubnet []gax.CallOption
ListInterconnects []gax.CallOption
GetInterconnect []gax.CallOption
DiagnoseInterconnect []gax.CallOption
ListInterconnectAttachments []gax.CallOption
GetInterconnectAttachment []gax.CallOption
CreateInterconnectAttachment []gax.CallOption
DeleteInterconnectAttachment []gax.CallOption
ListRouters []gax.CallOption
GetRouter []gax.CallOption
DiagnoseRouter []gax.CallOption
CreateRouter []gax.CallOption
UpdateRouter []gax.CallOption
DeleteRouter []gax.CallOption
GetLocation []gax.CallOption
ListLocations []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
CallOptions contains the retry settings for each method of Client.
Client
type Client struct {
// The call options for this service.
CallOptions *CallOptions
// 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
}
Client is a client for interacting with Distributed Cloud Edge Network API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
EdgeNetwork API provides managed, highly available cloud dynamic network configuration service to the GEC customer to enable edge application and network function solutions. This allows the customers to easily define and configure the network setup and property to meet the workload requirement.
func NewClient
NewClient creates a new edge network client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
EdgeNetwork API provides managed, highly available cloud dynamic network configuration service to the GEC customer to enable edge application and network function solutions. This allows the customers to easily define and configure the network setup and property to meet the workload requirement.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewRESTClient
NewRESTClient creates a new edge network rest client.
EdgeNetwork API provides managed, highly available cloud dynamic network configuration service to the GEC customer to enable edge application and network function solutions. This allows the customers to easily define and configure the network setup and property to meet the workload requirement.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*Client) CancelOperation
func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) Close
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) Connection (deprecated)
func (c *Client) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*Client) CreateInterconnectAttachment
func (c *Client) CreateInterconnectAttachment(ctx context.Context, req *edgenetworkpb.CreateInterconnectAttachmentRequest, opts ...gax.CallOption) (*CreateInterconnectAttachmentOperation, error)
CreateInterconnectAttachment creates a new InterconnectAttachment in a given project and location.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.CreateInterconnectAttachmentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#CreateInterconnectAttachmentRequest.
}
op, err := c.CreateInterconnectAttachment(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateInterconnectAttachmentOperation
func (c *Client) CreateInterconnectAttachmentOperation(name string) *CreateInterconnectAttachmentOperation
CreateInterconnectAttachmentOperation returns a new CreateInterconnectAttachmentOperation from a given name. The name must be that of a previously created CreateInterconnectAttachmentOperation, possibly from a different process.
func (*Client) CreateNetwork
func (c *Client) CreateNetwork(ctx context.Context, req *edgenetworkpb.CreateNetworkRequest, opts ...gax.CallOption) (*CreateNetworkOperation, error)
CreateNetwork creates a new Network in a given project and location.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.CreateNetworkRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#CreateNetworkRequest.
}
op, err := c.CreateNetwork(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateNetworkOperation
func (c *Client) CreateNetworkOperation(name string) *CreateNetworkOperation
CreateNetworkOperation returns a new CreateNetworkOperation from a given name. The name must be that of a previously created CreateNetworkOperation, possibly from a different process.
func (*Client) CreateRouter
func (c *Client) CreateRouter(ctx context.Context, req *edgenetworkpb.CreateRouterRequest, opts ...gax.CallOption) (*CreateRouterOperation, error)
CreateRouter creates a new Router in a given project and location.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.CreateRouterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#CreateRouterRequest.
}
op, err := c.CreateRouter(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateRouterOperation
func (c *Client) CreateRouterOperation(name string) *CreateRouterOperation
CreateRouterOperation returns a new CreateRouterOperation from a given name. The name must be that of a previously created CreateRouterOperation, possibly from a different process.
func (*Client) CreateSubnet
func (c *Client) CreateSubnet(ctx context.Context, req *edgenetworkpb.CreateSubnetRequest, opts ...gax.CallOption) (*CreateSubnetOperation, error)
CreateSubnet creates a new Subnet in a given project and location.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.CreateSubnetRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#CreateSubnetRequest.
}
op, err := c.CreateSubnet(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateSubnetOperation
func (c *Client) CreateSubnetOperation(name string) *CreateSubnetOperation
CreateSubnetOperation returns a new CreateSubnetOperation from a given name. The name must be that of a previously created CreateSubnetOperation, possibly from a different process.
func (*Client) DeleteInterconnectAttachment
func (c *Client) DeleteInterconnectAttachment(ctx context.Context, req *edgenetworkpb.DeleteInterconnectAttachmentRequest, opts ...gax.CallOption) (*DeleteInterconnectAttachmentOperation, error)
DeleteInterconnectAttachment deletes a single InterconnectAttachment.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.DeleteInterconnectAttachmentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#DeleteInterconnectAttachmentRequest.
}
op, err := c.DeleteInterconnectAttachment(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteInterconnectAttachmentOperation
func (c *Client) DeleteInterconnectAttachmentOperation(name string) *DeleteInterconnectAttachmentOperation
DeleteInterconnectAttachmentOperation returns a new DeleteInterconnectAttachmentOperation from a given name. The name must be that of a previously created DeleteInterconnectAttachmentOperation, possibly from a different process.
func (*Client) DeleteNetwork
func (c *Client) DeleteNetwork(ctx context.Context, req *edgenetworkpb.DeleteNetworkRequest, opts ...gax.CallOption) (*DeleteNetworkOperation, error)
DeleteNetwork deletes a single Network.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.DeleteNetworkRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#DeleteNetworkRequest.
}
op, err := c.DeleteNetwork(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteNetworkOperation
func (c *Client) DeleteNetworkOperation(name string) *DeleteNetworkOperation
DeleteNetworkOperation returns a new DeleteNetworkOperation from a given name. The name must be that of a previously created DeleteNetworkOperation, possibly from a different process.
func (*Client) DeleteOperation
func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.DeleteOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
}
err = c.DeleteOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteRouter
func (c *Client) DeleteRouter(ctx context.Context, req *edgenetworkpb.DeleteRouterRequest, opts ...gax.CallOption) (*DeleteRouterOperation, error)
DeleteRouter deletes a single Router.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.DeleteRouterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#DeleteRouterRequest.
}
op, err := c.DeleteRouter(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteRouterOperation
func (c *Client) DeleteRouterOperation(name string) *DeleteRouterOperation
DeleteRouterOperation returns a new DeleteRouterOperation from a given name. The name must be that of a previously created DeleteRouterOperation, possibly from a different process.
func (*Client) DeleteSubnet
func (c *Client) DeleteSubnet(ctx context.Context, req *edgenetworkpb.DeleteSubnetRequest, opts ...gax.CallOption) (*DeleteSubnetOperation, error)
DeleteSubnet deletes a single Subnet.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.DeleteSubnetRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#DeleteSubnetRequest.
}
op, err := c.DeleteSubnet(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteSubnetOperation
func (c *Client) DeleteSubnetOperation(name string) *DeleteSubnetOperation
DeleteSubnetOperation returns a new DeleteSubnetOperation from a given name. The name must be that of a previously created DeleteSubnetOperation, possibly from a different process.
func (*Client) DiagnoseInterconnect
func (c *Client) DiagnoseInterconnect(ctx context.Context, req *edgenetworkpb.DiagnoseInterconnectRequest, opts ...gax.CallOption) (*edgenetworkpb.DiagnoseInterconnectResponse, error)
DiagnoseInterconnect get the diagnostics of a single interconnect resource.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.DiagnoseInterconnectRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#DiagnoseInterconnectRequest.
}
resp, err := c.DiagnoseInterconnect(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) DiagnoseNetwork
func (c *Client) DiagnoseNetwork(ctx context.Context, req *edgenetworkpb.DiagnoseNetworkRequest, opts ...gax.CallOption) (*edgenetworkpb.DiagnoseNetworkResponse, error)
DiagnoseNetwork get the diagnostics of a single network resource.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.DiagnoseNetworkRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#DiagnoseNetworkRequest.
}
resp, err := c.DiagnoseNetwork(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) DiagnoseRouter
func (c *Client) DiagnoseRouter(ctx context.Context, req *edgenetworkpb.DiagnoseRouterRequest, opts ...gax.CallOption) (*edgenetworkpb.DiagnoseRouterResponse, error)
DiagnoseRouter get the diagnostics of a single router resource.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.DiagnoseRouterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#DiagnoseRouterRequest.
}
resp, err := c.DiagnoseRouter(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetInterconnect
func (c *Client) GetInterconnect(ctx context.Context, req *edgenetworkpb.GetInterconnectRequest, opts ...gax.CallOption) (*edgenetworkpb.Interconnect, error)
GetInterconnect gets details of a single Interconnect.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.GetInterconnectRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#GetInterconnectRequest.
}
resp, err := c.GetInterconnect(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetInterconnectAttachment
func (c *Client) GetInterconnectAttachment(ctx context.Context, req *edgenetworkpb.GetInterconnectAttachmentRequest, opts ...gax.CallOption) (*edgenetworkpb.InterconnectAttachment, error)
GetInterconnectAttachment gets details of a single InterconnectAttachment.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.GetInterconnectAttachmentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#GetInterconnectAttachmentRequest.
}
resp, err := c.GetInterconnectAttachment(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetLocation
func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.GetLocationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
}
resp, err := c.GetLocation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetNetwork
func (c *Client) GetNetwork(ctx context.Context, req *edgenetworkpb.GetNetworkRequest, opts ...gax.CallOption) (*edgenetworkpb.Network, error)
GetNetwork gets details of a single Network.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.GetNetworkRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#GetNetworkRequest.
}
resp, err := c.GetNetwork(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetOperation
func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetRouter
func (c *Client) GetRouter(ctx context.Context, req *edgenetworkpb.GetRouterRequest, opts ...gax.CallOption) (*edgenetworkpb.Router, error)
GetRouter gets details of a single Router.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.GetRouterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#GetRouterRequest.
}
resp, err := c.GetRouter(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetSubnet
func (c *Client) GetSubnet(ctx context.Context, req *edgenetworkpb.GetSubnetRequest, opts ...gax.CallOption) (*edgenetworkpb.Subnet, error)
GetSubnet gets details of a single Subnet.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.GetSubnetRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#GetSubnetRequest.
}
resp, err := c.GetSubnet(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetZone (deprecated)
func (c *Client) GetZone(ctx context.Context, req *edgenetworkpb.GetZoneRequest, opts ...gax.CallOption) (*edgenetworkpb.Zone, error)
GetZone deprecated: not implemented. Gets details of a single Zone.
Deprecated: GetZone may be removed in a future version.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.GetZoneRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#GetZoneRequest.
}
resp, err := c.GetZone(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) InitializeZone
func (c *Client) InitializeZone(ctx context.Context, req *edgenetworkpb.InitializeZoneRequest, opts ...gax.CallOption) (*edgenetworkpb.InitializeZoneResponse, error)
InitializeZone initializeZone will initialize resources for a zone in a project.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.InitializeZoneRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#InitializeZoneRequest.
}
resp, err := c.InitializeZone(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ListInterconnectAttachments
func (c *Client) ListInterconnectAttachments(ctx context.Context, req *edgenetworkpb.ListInterconnectAttachmentsRequest, opts ...gax.CallOption) *InterconnectAttachmentIterator
ListInterconnectAttachments lists InterconnectAttachments in a given project and location.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.ListInterconnectAttachmentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#ListInterconnectAttachmentsRequest.
}
it := c.ListInterconnectAttachments(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*edgenetworkpb.ListInterconnectAttachmentsResponse)
}
}
func (*Client) ListInterconnects
func (c *Client) ListInterconnects(ctx context.Context, req *edgenetworkpb.ListInterconnectsRequest, opts ...gax.CallOption) *InterconnectIterator
ListInterconnects lists Interconnects in a given project and location.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.ListInterconnectsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#ListInterconnectsRequest.
}
it := c.ListInterconnects(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*edgenetworkpb.ListInterconnectsResponse)
}
}
func (*Client) ListLocations
func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
"google.golang.org/api/iterator"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
it := c.ListLocations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*locationpb.ListLocationsResponse)
}
}
func (*Client) ListNetworks
func (c *Client) ListNetworks(ctx context.Context, req *edgenetworkpb.ListNetworksRequest, opts ...gax.CallOption) *NetworkIterator
ListNetworks lists Networks in a given project and location.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.ListNetworksRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#ListNetworksRequest.
}
it := c.ListNetworks(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*edgenetworkpb.ListNetworksResponse)
}
}
func (*Client) ListOperations
func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
func (*Client) ListRouters
func (c *Client) ListRouters(ctx context.Context, req *edgenetworkpb.ListRoutersRequest, opts ...gax.CallOption) *RouterIterator
ListRouters lists Routers in a given project and location.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.ListRoutersRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#ListRoutersRequest.
}
it := c.ListRouters(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*edgenetworkpb.ListRoutersResponse)
}
}
func (*Client) ListSubnets
func (c *Client) ListSubnets(ctx context.Context, req *edgenetworkpb.ListSubnetsRequest, opts ...gax.CallOption) *SubnetIterator
ListSubnets lists Subnets in a given project and location.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.ListSubnetsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#ListSubnetsRequest.
}
it := c.ListSubnets(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*edgenetworkpb.ListSubnetsResponse)
}
}
func (*Client) ListZones (deprecated)
func (c *Client) ListZones(ctx context.Context, req *edgenetworkpb.ListZonesRequest, opts ...gax.CallOption) *ZoneIterator
ListZones deprecated: not implemented. Lists Zones in a given project and location.
Deprecated: ListZones may be removed in a future version.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.ListZonesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#ListZonesRequest.
}
it := c.ListZones(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*edgenetworkpb.ListZonesResponse)
}
}
func (*Client) UpdateRouter
func (c *Client) UpdateRouter(ctx context.Context, req *edgenetworkpb.UpdateRouterRequest, opts ...gax.CallOption) (*UpdateRouterOperation, error)
UpdateRouter updates the parameters of a single Router.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.UpdateRouterRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#UpdateRouterRequest.
}
op, err := c.UpdateRouter(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateRouterOperation
func (c *Client) UpdateRouterOperation(name string) *UpdateRouterOperation
UpdateRouterOperation returns a new UpdateRouterOperation from a given name. The name must be that of a previously created UpdateRouterOperation, possibly from a different process.
func (*Client) UpdateSubnet
func (c *Client) UpdateSubnet(ctx context.Context, req *edgenetworkpb.UpdateSubnetRequest, opts ...gax.CallOption) (*UpdateSubnetOperation, error)
UpdateSubnet updates the parameters of a single Subnet.
Example
package main
import (
"context"
edgenetwork "cloud.google.com/go/edgenetwork/apiv1"
edgenetworkpb "cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := edgenetwork.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &edgenetworkpb.UpdateSubnetRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/edgenetwork/apiv1/edgenetworkpb#UpdateSubnetRequest.
}
op, err := c.UpdateSubnet(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateSubnetOperation
func (c *Client) UpdateSubnetOperation(name string) *UpdateSubnetOperation
UpdateSubnetOperation returns a new UpdateSubnetOperation from a given name. The name must be that of a previously created UpdateSubnetOperation, possibly from a different process.
CreateInterconnectAttachmentOperation
type CreateInterconnectAttachmentOperation struct {
// contains filtered or unexported fields
}
CreateInterconnectAttachmentOperation manages a long-running operation from CreateInterconnectAttachment.
func (*CreateInterconnectAttachmentOperation) Done
func (op *CreateInterconnectAttachmentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateInterconnectAttachmentOperation) Metadata
func (op *CreateInterconnectAttachmentOperation) Metadata() (*edgenetworkpb.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 (*CreateInterconnectAttachmentOperation) Name
func (op *CreateInterconnectAttachmentOperation) 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 (*CreateInterconnectAttachmentOperation) Poll
func (op *CreateInterconnectAttachmentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*edgenetworkpb.InterconnectAttachment, 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 (*CreateInterconnectAttachmentOperation) Wait
func (op *CreateInterconnectAttachmentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*edgenetworkpb.InterconnectAttachment, 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.
CreateNetworkOperation
type CreateNetworkOperation struct {
// contains filtered or unexported fields
}
CreateNetworkOperation manages a long-running operation from CreateNetwork.
func (*CreateNetworkOperation) Done
func (op *CreateNetworkOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateNetworkOperation) Metadata
func (op *CreateNetworkOperation) Metadata() (*edgenetworkpb.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 (*CreateNetworkOperation) Name
func (op *CreateNetworkOperation) 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 (*CreateNetworkOperation) Poll
func (op *CreateNetworkOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*edgenetworkpb.Network, 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 (*CreateNetworkOperation) Wait
func (op *CreateNetworkOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*edgenetworkpb.Network, 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.
CreateRouterOperation
type CreateRouterOperation struct {
// contains filtered or unexported fields
}
CreateRouterOperation manages a long-running operation from CreateRouter.
func (*CreateRouterOperation) Done
func (op *CreateRouterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateRouterOperation) Metadata
func (op *CreateRouterOperation) Metadata() (*edgenetworkpb.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 (*CreateRouterOperation) Name
func (op *CreateRouterOperation) 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 (*CreateRouterOperation) Poll
func (op *CreateRouterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*edgenetworkpb.Router, 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 (*CreateRouterOperation) Wait
func (op *CreateRouterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*edgenetworkpb.Router, 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.
CreateSubnetOperation
type CreateSubnetOperation struct {
// contains filtered or unexported fields
}
CreateSubnetOperation manages a long-running operation from CreateSubnet.
func (*CreateSubnetOperation) Done
func (op *CreateSubnetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateSubnetOperation) Metadata
func (op *CreateSubnetOperation) Metadata() (*edgenetworkpb.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 (*CreateSubnetOperation) Name
func (op *CreateSubnetOperation) 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 (*CreateSubnetOperation) Poll
func (op *CreateSubnetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*edgenetworkpb.Subnet, 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 (*CreateSubnetOperation) Wait
func (op *CreateSubnetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*edgenetworkpb.Subnet, 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.
DeleteInterconnectAttachmentOperation
type DeleteInterconnectAttachmentOperation struct {
// contains filtered or unexported fields
}
DeleteInterconnectAttachmentOperation manages a long-running operation from DeleteInterconnectAttachment.
func (*DeleteInterconnectAttachmentOperation) Done
func (op *DeleteInterconnectAttachmentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteInterconnectAttachmentOperation) Metadata
func (op *DeleteInterconnectAttachmentOperation) Metadata() (*edgenetworkpb.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 (*DeleteInterconnectAttachmentOperation) Name
func (op *DeleteInterconnectAttachmentOperation) 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 (*DeleteInterconnectAttachmentOperation) Poll
func (op *DeleteInterconnectAttachmentOperation) 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 (*DeleteInterconnectAttachmentOperation) Wait
func (op *DeleteInterconnectAttachmentOperation) 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.
DeleteNetworkOperation
type DeleteNetworkOperation struct {
// contains filtered or unexported fields
}
DeleteNetworkOperation manages a long-running operation from DeleteNetwork.
func (*DeleteNetworkOperation) Done
func (op *DeleteNetworkOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteNetworkOperation) Metadata
func (op *DeleteNetworkOperation) Metadata() (*edgenetworkpb.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 (*DeleteNetworkOperation) Name
func (op *DeleteNetworkOperation) 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 (*DeleteNetworkOperation) Poll
func (op *DeleteNetworkOperation) 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 (*DeleteNetworkOperation) Wait
func (op *DeleteNetworkOperation) 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.
DeleteRouterOperation
type DeleteRouterOperation struct {
// contains filtered or unexported fields
}
DeleteRouterOperation manages a long-running operation from DeleteRouter.
func (*DeleteRouterOperation) Done
func (op *DeleteRouterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteRouterOperation) Metadata
func (op *DeleteRouterOperation) Metadata() (*edgenetworkpb.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 (*DeleteRouterOperation) Name
func (op *DeleteRouterOperation) 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 (*DeleteRouterOperation) Poll
func (op *DeleteRouterOperation) 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 (*DeleteRouterOperation) Wait
func (op *DeleteRouterOperation) 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.
DeleteSubnetOperation
type DeleteSubnetOperation struct {
// contains filtered or unexported fields
}
DeleteSubnetOperation manages a long-running operation from DeleteSubnet.
func (*DeleteSubnetOperation) Done
func (op *DeleteSubnetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteSubnetOperation) Metadata
func (op *DeleteSubnetOperation) Metadata() (*edgenetworkpb.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 (*DeleteSubnetOperation) Name
func (op *DeleteSubnetOperation) 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 (*DeleteSubnetOperation) Poll
func (op *DeleteSubnetOperation) 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 (*DeleteSubnetOperation) Wait
func (op *DeleteSubnetOperation) 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.
InterconnectAttachmentIterator
type InterconnectAttachmentIterator 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 []*edgenetworkpb.InterconnectAttachment, nextPageToken string, err error)
// contains filtered or unexported fields
}
InterconnectAttachmentIterator manages a stream of *edgenetworkpb.InterconnectAttachment.
func (*InterconnectAttachmentIterator) Next
func (it *InterconnectAttachmentIterator) Next() (*edgenetworkpb.InterconnectAttachment, 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 (*InterconnectAttachmentIterator) PageInfo
func (it *InterconnectAttachmentIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
InterconnectIterator
type InterconnectIterator 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 []*edgenetworkpb.Interconnect, nextPageToken string, err error)
// contains filtered or unexported fields
}
InterconnectIterator manages a stream of *edgenetworkpb.Interconnect.
func (*InterconnectIterator) Next
func (it *InterconnectIterator) Next() (*edgenetworkpb.Interconnect, 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 (*InterconnectIterator) PageInfo
func (it *InterconnectIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
LocationIterator
type LocationIterator 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 []*locationpb.Location, nextPageToken string, err error)
// contains filtered or unexported fields
}
LocationIterator manages a stream of *locationpb.Location.
func (*LocationIterator) Next
func (it *LocationIterator) Next() (*locationpb.Location, 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 (*LocationIterator) PageInfo
func (it *LocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
NetworkIterator
type NetworkIterator 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 []*edgenetworkpb.Network, nextPageToken string, err error)
// contains filtered or unexported fields
}
NetworkIterator manages a stream of *edgenetworkpb.Network.
func (*NetworkIterator) Next
func (it *NetworkIterator) Next() (*edgenetworkpb.Network, 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 (*NetworkIterator) PageInfo
func (it *NetworkIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
OperationIterator
type OperationIterator 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 []*longrunningpb.Operation, nextPageToken string, err error)
// contains filtered or unexported fields
}
OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) Next
func (it *OperationIterator) Next() (*longrunningpb.Operation, 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 (*OperationIterator) PageInfo
func (it *OperationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
RouterIterator
type RouterIterator 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 []*edgenetworkpb.Router, nextPageToken string, err error)
// contains filtered or unexported fields
}
RouterIterator manages a stream of *edgenetworkpb.Router.
func (*RouterIterator) Next
func (it *RouterIterator) Next() (*edgenetworkpb.Router, 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 (*RouterIterator) PageInfo
func (it *RouterIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
SubnetIterator
type SubnetIterator 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 []*edgenetworkpb.Subnet, nextPageToken string, err error)
// contains filtered or unexported fields
}
SubnetIterator manages a stream of *edgenetworkpb.Subnet.
func (*SubnetIterator) Next
func (it *SubnetIterator) Next() (*edgenetworkpb.Subnet, 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 (*SubnetIterator) PageInfo
func (it *SubnetIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
UpdateRouterOperation
type UpdateRouterOperation struct {
// contains filtered or unexported fields
}
UpdateRouterOperation manages a long-running operation from UpdateRouter.
func (*UpdateRouterOperation) Done
func (op *UpdateRouterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateRouterOperation) Metadata
func (op *UpdateRouterOperation) Metadata() (*edgenetworkpb.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 (*UpdateRouterOperation) Name
func (op *UpdateRouterOperation) 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 (*UpdateRouterOperation) Poll
func (op *UpdateRouterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*edgenetworkpb.Router, 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 (*UpdateRouterOperation) Wait
func (op *UpdateRouterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*edgenetworkpb.Router, 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.
UpdateSubnetOperation
type UpdateSubnetOperation struct {
// contains filtered or unexported fields
}
UpdateSubnetOperation manages a long-running operation from UpdateSubnet.
func (*UpdateSubnetOperation) Done
func (op *UpdateSubnetOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateSubnetOperation) Metadata
func (op *UpdateSubnetOperation) Metadata() (*edgenetworkpb.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 (*UpdateSubnetOperation) Name
func (op *UpdateSubnetOperation) 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 (*UpdateSubnetOperation) Poll
func (op *UpdateSubnetOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*edgenetworkpb.Subnet, 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 (*UpdateSubnetOperation) Wait
func (op *UpdateSubnetOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*edgenetworkpb.Subnet, 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.
ZoneIterator
type ZoneIterator 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 []*edgenetworkpb.Zone, nextPageToken string, err error)
// contains filtered or unexported fields
}
ZoneIterator manages a stream of *edgenetworkpb.Zone.
func (*ZoneIterator) Next
func (it *ZoneIterator) Next() (*edgenetworkpb.Zone, 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 (*ZoneIterator) PageInfo
func (it *ZoneIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.