Package cloud.google.com/go/gaming/apiv1 (v0.79.0)

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 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.

CreateGameServerClusterOperation

type CreateGameServerClusterOperation struct {
	// contains filtered or unexported fields
}

CreateGameServerClusterOperation manages a long-running operation from CreateGameServerCluster.

func (*CreateGameServerClusterOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateGameServerClusterOperation) Metadata

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 (*CreateGameServerClusterOperation) Name

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 (*CreateGameServerClusterOperation) Poll

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 (*CreateGameServerClusterOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateGameServerConfigOperation

type CreateGameServerConfigOperation struct {
	// contains filtered or unexported fields
}

CreateGameServerConfigOperation manages a long-running operation from CreateGameServerConfig.

func (*CreateGameServerConfigOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateGameServerConfigOperation) Metadata

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 (*CreateGameServerConfigOperation) Name

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 (*CreateGameServerConfigOperation) Poll

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 (*CreateGameServerConfigOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateGameServerDeploymentOperation

type CreateGameServerDeploymentOperation struct {
	// contains filtered or unexported fields
}

CreateGameServerDeploymentOperation manages a long-running operation from CreateGameServerDeployment.

func (*CreateGameServerDeploymentOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateGameServerDeploymentOperation) Metadata

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 (*CreateGameServerDeploymentOperation) Name

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 (*CreateGameServerDeploymentOperation) Poll

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 (*CreateGameServerDeploymentOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateRealmOperation

type CreateRealmOperation struct {
	// contains filtered or unexported fields
}

CreateRealmOperation manages a long-running operation from CreateRealm.

func (*CreateRealmOperation) Done

func (op *CreateRealmOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*CreateRealmOperation) Metadata

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 (*CreateRealmOperation) Name

func (op *CreateRealmOperation) 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 (*CreateRealmOperation) Poll

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 (*CreateRealmOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteGameServerClusterOperation

type DeleteGameServerClusterOperation struct {
	// contains filtered or unexported fields
}

DeleteGameServerClusterOperation manages a long-running operation from DeleteGameServerCluster.

func (*DeleteGameServerClusterOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteGameServerClusterOperation) Metadata

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 (*DeleteGameServerClusterOperation) Name

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 (*DeleteGameServerClusterOperation) Poll

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 (*DeleteGameServerClusterOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteGameServerConfigOperation

type DeleteGameServerConfigOperation struct {
	// contains filtered or unexported fields
}

DeleteGameServerConfigOperation manages a long-running operation from DeleteGameServerConfig.

func (*DeleteGameServerConfigOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteGameServerConfigOperation) Metadata

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 (*DeleteGameServerConfigOperation) Name

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 (*DeleteGameServerConfigOperation) Poll

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 (*DeleteGameServerConfigOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteGameServerDeploymentOperation

type DeleteGameServerDeploymentOperation struct {
	// contains filtered or unexported fields
}

DeleteGameServerDeploymentOperation manages a long-running operation from DeleteGameServerDeployment.

func (*DeleteGameServerDeploymentOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteGameServerDeploymentOperation) Metadata

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 (*DeleteGameServerDeploymentOperation) Name

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 (*DeleteGameServerDeploymentOperation) Poll

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 (*DeleteGameServerDeploymentOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteRealmOperation

type DeleteRealmOperation struct {
	// contains filtered or unexported fields
}

DeleteRealmOperation manages a long-running operation from DeleteRealm.

func (*DeleteRealmOperation) Done

func (op *DeleteRealmOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*DeleteRealmOperation) Metadata

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 (*DeleteRealmOperation) Name

func (op *DeleteRealmOperation) 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 (*DeleteRealmOperation) Poll

func (op *DeleteRealmOperation) 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 (*DeleteRealmOperation) Wait

func (op *DeleteRealmOperation) 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.

GameServerClusterIterator

type GameServerClusterIterator 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 []*gamingpb.GameServerCluster, nextPageToken string, err error)
	// contains filtered or unexported fields
}

GameServerClusterIterator manages a stream of *gamingpb.GameServerCluster.

func (*GameServerClusterIterator) Next

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 (*GameServerClusterIterator) PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

GameServerClustersCallOptions

type GameServerClustersCallOptions struct {
	ListGameServerClusters         []gax.CallOption
	GetGameServerCluster           []gax.CallOption
	CreateGameServerCluster        []gax.CallOption
	PreviewCreateGameServerCluster []gax.CallOption
	DeleteGameServerCluster        []gax.CallOption
	PreviewDeleteGameServerCluster []gax.CallOption
	UpdateGameServerCluster        []gax.CallOption
	PreviewUpdateGameServerCluster []gax.CallOption
}

GameServerClustersCallOptions contains the retry settings for each method of GameServerClustersClient.

GameServerClustersClient

type GameServerClustersClient struct {

	// LROClient is used internally to handle longrunning operations.
	// It is exposed so that its CallOptions can be modified if required.
	// Users should not Close this client.
	LROClient *lroauto.OperationsClient

	// The call options for this service.
	CallOptions *GameServerClustersCallOptions
	// contains filtered or unexported fields
}

GameServerClustersClient is a client for interacting with .

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewGameServerClustersClient

func NewGameServerClustersClient(ctx context.Context, opts ...option.ClientOption) (*GameServerClustersClient, error)

NewGameServerClustersClient creates a new game server clusters service client.

The game server cluster maps to Kubernetes clusters running Agones and is used to manage fleets within clusters.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := gaming.NewGameServerClustersClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use client.
	_ = c
}

func (*GameServerClustersClient) Close

func (c *GameServerClustersClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*GameServerClustersClient) Connection

func (c *GameServerClustersClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*GameServerClustersClient) CreateGameServerCluster

CreateGameServerCluster creates a new game server cluster in a given project and location.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerClustersClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.CreateGameServerClusterRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.CreateGameServerCluster(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerClustersClient) CreateGameServerClusterOperation

func (c *GameServerClustersClient) CreateGameServerClusterOperation(name string) *CreateGameServerClusterOperation

CreateGameServerClusterOperation returns a new CreateGameServerClusterOperation from a given name. The name must be that of a previously created CreateGameServerClusterOperation, possibly from a different process.

func (*GameServerClustersClient) DeleteGameServerCluster

DeleteGameServerCluster deletes a single game server cluster.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerClustersClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.DeleteGameServerClusterRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.DeleteGameServerCluster(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*GameServerClustersClient) DeleteGameServerClusterOperation

func (c *GameServerClustersClient) DeleteGameServerClusterOperation(name string) *DeleteGameServerClusterOperation

DeleteGameServerClusterOperation returns a new DeleteGameServerClusterOperation from a given name. The name must be that of a previously created DeleteGameServerClusterOperation, possibly from a different process.

func (*GameServerClustersClient) GetGameServerCluster

GetGameServerCluster gets details of a single game server cluster.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerClustersClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.GetGameServerClusterRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetGameServerCluster(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerClustersClient) ListGameServerClusters

ListGameServerClusters lists game server clusters in a given project and location.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"
	"google.golang.org/api/iterator"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := gaming.NewGameServerClustersClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.ListGameServerClustersRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListGameServerClusters(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*GameServerClustersClient) PreviewCreateGameServerCluster

PreviewCreateGameServerCluster previews creation of a new game server cluster in a given project and location.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerClustersClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.PreviewCreateGameServerClusterRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.PreviewCreateGameServerCluster(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerClustersClient) PreviewDeleteGameServerCluster

PreviewDeleteGameServerCluster previews deletion of a single game server cluster.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerClustersClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.PreviewDeleteGameServerClusterRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.PreviewDeleteGameServerCluster(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerClustersClient) PreviewUpdateGameServerCluster

PreviewUpdateGameServerCluster previews updating a GameServerCluster.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerClustersClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.PreviewUpdateGameServerClusterRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.PreviewUpdateGameServerCluster(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerClustersClient) UpdateGameServerCluster

UpdateGameServerCluster patches a single game server cluster.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerClustersClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.UpdateGameServerClusterRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.UpdateGameServerCluster(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerClustersClient) UpdateGameServerClusterOperation

func (c *GameServerClustersClient) UpdateGameServerClusterOperation(name string) *UpdateGameServerClusterOperation

UpdateGameServerClusterOperation returns a new UpdateGameServerClusterOperation from a given name. The name must be that of a previously created UpdateGameServerClusterOperation, possibly from a different process.

GameServerConfigIterator

type GameServerConfigIterator 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 []*gamingpb.GameServerConfig, nextPageToken string, err error)
	// contains filtered or unexported fields
}

GameServerConfigIterator manages a stream of *gamingpb.GameServerConfig.

func (*GameServerConfigIterator) Next

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 (*GameServerConfigIterator) PageInfo

func (it *GameServerConfigIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

GameServerConfigsCallOptions

type GameServerConfigsCallOptions struct {
	ListGameServerConfigs  []gax.CallOption
	GetGameServerConfig    []gax.CallOption
	CreateGameServerConfig []gax.CallOption
	DeleteGameServerConfig []gax.CallOption
}

GameServerConfigsCallOptions contains the retry settings for each method of GameServerConfigsClient.

GameServerConfigsClient

type GameServerConfigsClient struct {

	// LROClient is used internally to handle longrunning operations.
	// It is exposed so that its CallOptions can be modified if required.
	// Users should not Close this client.
	LROClient *lroauto.OperationsClient

	// The call options for this service.
	CallOptions *GameServerConfigsCallOptions
	// contains filtered or unexported fields
}

GameServerConfigsClient is a client for interacting with .

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewGameServerConfigsClient

func NewGameServerConfigsClient(ctx context.Context, opts ...option.ClientOption) (*GameServerConfigsClient, error)

NewGameServerConfigsClient creates a new game server configs service client.

The game server config configures the game servers in an Agones fleet.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := gaming.NewGameServerConfigsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use client.
	_ = c
}

func (*GameServerConfigsClient) Close

func (c *GameServerConfigsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*GameServerConfigsClient) Connection

func (c *GameServerConfigsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*GameServerConfigsClient) CreateGameServerConfig

CreateGameServerConfig creates a new game server config in a given project, location, and game server deployment. Game server configs are immutable, and are not applied until referenced in the game server deployment rollout resource.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerConfigsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.CreateGameServerConfigRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.CreateGameServerConfig(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerConfigsClient) CreateGameServerConfigOperation

func (c *GameServerConfigsClient) CreateGameServerConfigOperation(name string) *CreateGameServerConfigOperation

CreateGameServerConfigOperation returns a new CreateGameServerConfigOperation from a given name. The name must be that of a previously created CreateGameServerConfigOperation, possibly from a different process.

func (*GameServerConfigsClient) DeleteGameServerConfig

DeleteGameServerConfig deletes a single game server config. The deletion will fail if the game server config is referenced in a game server deployment rollout.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerConfigsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.DeleteGameServerConfigRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.DeleteGameServerConfig(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*GameServerConfigsClient) DeleteGameServerConfigOperation

func (c *GameServerConfigsClient) DeleteGameServerConfigOperation(name string) *DeleteGameServerConfigOperation

DeleteGameServerConfigOperation returns a new DeleteGameServerConfigOperation from a given name. The name must be that of a previously created DeleteGameServerConfigOperation, possibly from a different process.

func (*GameServerConfigsClient) GetGameServerConfig

GetGameServerConfig gets details of a single game server config.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerConfigsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.GetGameServerConfigRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetGameServerConfig(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerConfigsClient) ListGameServerConfigs

ListGameServerConfigs lists game server configs in a given project, location, and game server deployment.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"
	"google.golang.org/api/iterator"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := gaming.NewGameServerConfigsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.ListGameServerConfigsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListGameServerConfigs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

GameServerDeploymentIterator

type GameServerDeploymentIterator 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 []*gamingpb.GameServerDeployment, nextPageToken string, err error)
	// contains filtered or unexported fields
}

GameServerDeploymentIterator manages a stream of *gamingpb.GameServerDeployment.

func (*GameServerDeploymentIterator) Next

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 (*GameServerDeploymentIterator) PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

GameServerDeploymentsCallOptions

type GameServerDeploymentsCallOptions struct {
	ListGameServerDeployments          []gax.CallOption
	GetGameServerDeployment            []gax.CallOption
	CreateGameServerDeployment         []gax.CallOption
	DeleteGameServerDeployment         []gax.CallOption
	UpdateGameServerDeployment         []gax.CallOption
	GetGameServerDeploymentRollout     []gax.CallOption
	UpdateGameServerDeploymentRollout  []gax.CallOption
	PreviewGameServerDeploymentRollout []gax.CallOption
	FetchDeploymentState               []gax.CallOption
}

GameServerDeploymentsCallOptions contains the retry settings for each method of GameServerDeploymentsClient.

GameServerDeploymentsClient

type GameServerDeploymentsClient struct {

	// LROClient is used internally to handle longrunning operations.
	// It is exposed so that its CallOptions can be modified if required.
	// Users should not Close this client.
	LROClient *lroauto.OperationsClient

	// The call options for this service.
	CallOptions *GameServerDeploymentsCallOptions
	// contains filtered or unexported fields
}

GameServerDeploymentsClient is a client for interacting with .

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewGameServerDeploymentsClient

func NewGameServerDeploymentsClient(ctx context.Context, opts ...option.ClientOption) (*GameServerDeploymentsClient, error)

NewGameServerDeploymentsClient creates a new game server deployments service client.

The game server deployment is used to control the deployment of Agones fleets.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := gaming.NewGameServerDeploymentsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use client.
	_ = c
}

func (*GameServerDeploymentsClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*GameServerDeploymentsClient) Connection

func (c *GameServerDeploymentsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*GameServerDeploymentsClient) CreateGameServerDeployment

CreateGameServerDeployment creates a new game server deployment in a given project and location.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerDeploymentsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.CreateGameServerDeploymentRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.CreateGameServerDeployment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerDeploymentsClient) CreateGameServerDeploymentOperation

func (c *GameServerDeploymentsClient) CreateGameServerDeploymentOperation(name string) *CreateGameServerDeploymentOperation

CreateGameServerDeploymentOperation returns a new CreateGameServerDeploymentOperation from a given name. The name must be that of a previously created CreateGameServerDeploymentOperation, possibly from a different process.

func (*GameServerDeploymentsClient) DeleteGameServerDeployment

DeleteGameServerDeployment deletes a single game server deployment.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerDeploymentsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.DeleteGameServerDeploymentRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.DeleteGameServerDeployment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*GameServerDeploymentsClient) DeleteGameServerDeploymentOperation

func (c *GameServerDeploymentsClient) DeleteGameServerDeploymentOperation(name string) *DeleteGameServerDeploymentOperation

DeleteGameServerDeploymentOperation returns a new DeleteGameServerDeploymentOperation from a given name. The name must be that of a previously created DeleteGameServerDeploymentOperation, possibly from a different process.

func (*GameServerDeploymentsClient) FetchDeploymentState

FetchDeploymentState retrieves information about the current state of the game server deployment. Gathers all the Agones fleets and Agones autoscalers, including fleets running an older version of the game server deployment.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerDeploymentsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.FetchDeploymentStateRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.FetchDeploymentState(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerDeploymentsClient) GetGameServerDeployment

GetGameServerDeployment gets details of a single game server deployment.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerDeploymentsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.GetGameServerDeploymentRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetGameServerDeployment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerDeploymentsClient) GetGameServerDeploymentRollout

GetGameServerDeploymentRollout gets details a single game server deployment rollout.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerDeploymentsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.GetGameServerDeploymentRolloutRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetGameServerDeploymentRollout(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerDeploymentsClient) ListGameServerDeployments

ListGameServerDeployments lists game server deployments in a given project and location.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"
	"google.golang.org/api/iterator"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := gaming.NewGameServerDeploymentsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.ListGameServerDeploymentsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListGameServerDeployments(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*GameServerDeploymentsClient) PreviewGameServerDeploymentRollout

PreviewGameServerDeploymentRollout previews the game server deployment rollout. This API does not mutate the rollout resource.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerDeploymentsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.PreviewGameServerDeploymentRolloutRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.PreviewGameServerDeploymentRollout(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerDeploymentsClient) UpdateGameServerDeployment

UpdateGameServerDeployment patches a game server deployment.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerDeploymentsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.UpdateGameServerDeploymentRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.UpdateGameServerDeployment(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerDeploymentsClient) UpdateGameServerDeploymentOperation

func (c *GameServerDeploymentsClient) UpdateGameServerDeploymentOperation(name string) *UpdateGameServerDeploymentOperation

UpdateGameServerDeploymentOperation returns a new UpdateGameServerDeploymentOperation from a given name. The name must be that of a previously created UpdateGameServerDeploymentOperation, possibly from a different process.

func (*GameServerDeploymentsClient) UpdateGameServerDeploymentRollout

UpdateGameServerDeploymentRollout patches a single game server deployment rollout. The method will not return an error if the update does not affect any existing realms. For example - if the default_game_server_config is changed but all existing realms use the override, that is valid. Similarly, if a non existing realm is explicitly called out in game_server_config_overrides field, that will also not result in an error.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewGameServerDeploymentsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.UpdateGameServerDeploymentRolloutRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.UpdateGameServerDeploymentRollout(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GameServerDeploymentsClient) UpdateGameServerDeploymentRolloutOperation

func (c *GameServerDeploymentsClient) UpdateGameServerDeploymentRolloutOperation(name string) *UpdateGameServerDeploymentRolloutOperation

UpdateGameServerDeploymentRolloutOperation returns a new UpdateGameServerDeploymentRolloutOperation from a given name. The name must be that of a previously created UpdateGameServerDeploymentRolloutOperation, possibly from a different process.

RealmIterator

type RealmIterator 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 []*gamingpb.Realm, nextPageToken string, err error)
	// contains filtered or unexported fields
}

RealmIterator manages a stream of *gamingpb.Realm.

func (*RealmIterator) Next

func (it *RealmIterator) Next() (*gamingpb.Realm, 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 (*RealmIterator) PageInfo

func (it *RealmIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

RealmsCallOptions

type RealmsCallOptions struct {
	ListRealms         []gax.CallOption
	GetRealm           []gax.CallOption
	CreateRealm        []gax.CallOption
	DeleteRealm        []gax.CallOption
	UpdateRealm        []gax.CallOption
	PreviewRealmUpdate []gax.CallOption
}

RealmsCallOptions contains the retry settings for each method of RealmsClient.

RealmsClient

type RealmsClient struct {

	// LROClient is used internally to handle longrunning operations.
	// It is exposed so that its CallOptions can be modified if required.
	// Users should not Close this client.
	LROClient *lroauto.OperationsClient

	// The call options for this service.
	CallOptions *RealmsCallOptions
	// contains filtered or unexported fields
}

RealmsClient is a client for interacting with .

Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

func NewRealmsClient

func NewRealmsClient(ctx context.Context, opts ...option.ClientOption) (*RealmsClient, error)

NewRealmsClient creates a new realms service client.

A realm is a grouping of game server clusters that are considered interchangeable.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := gaming.NewRealmsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use client.
	_ = c
}

func (*RealmsClient) Close

func (c *RealmsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RealmsClient) Connection

func (c *RealmsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RealmsClient) CreateRealm

CreateRealm creates a new realm in a given project and location.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewRealmsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.CreateRealmRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.CreateRealm(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RealmsClient) CreateRealmOperation

func (c *RealmsClient) CreateRealmOperation(name string) *CreateRealmOperation

CreateRealmOperation returns a new CreateRealmOperation from a given name. The name must be that of a previously created CreateRealmOperation, possibly from a different process.

func (*RealmsClient) DeleteRealm

DeleteRealm deletes a single realm.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewRealmsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.DeleteRealmRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.DeleteRealm(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*RealmsClient) DeleteRealmOperation

func (c *RealmsClient) DeleteRealmOperation(name string) *DeleteRealmOperation

DeleteRealmOperation returns a new DeleteRealmOperation from a given name. The name must be that of a previously created DeleteRealmOperation, possibly from a different process.

func (*RealmsClient) GetRealm

func (c *RealmsClient) GetRealm(ctx context.Context, req *gamingpb.GetRealmRequest, opts ...gax.CallOption) (*gamingpb.Realm, error)

GetRealm gets details of a single realm.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewRealmsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.GetRealmRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.GetRealm(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RealmsClient) ListRealms

ListRealms lists realms in a given project and location.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"
	"google.golang.org/api/iterator"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
	// import "google.golang.org/api/iterator"

	ctx := context.Background()
	c, err := gaming.NewRealmsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.ListRealmsRequest{
		// TODO: Fill request struct fields.
	}
	it := c.ListRealms(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RealmsClient) PreviewRealmUpdate

PreviewRealmUpdate previews patches to a single realm.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewRealmsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.PreviewRealmUpdateRequest{
		// TODO: Fill request struct fields.
	}
	resp, err := c.PreviewRealmUpdate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RealmsClient) UpdateRealm

UpdateRealm patches a single realm.

Example

package main

import (
	"context"

	gaming "cloud.google.com/go/gaming/apiv1"

	gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"
)

func main() {
	// import gamingpb "google.golang.org/genproto/googleapis/cloud/gaming/v1"

	ctx := context.Background()
	c, err := gaming.NewRealmsClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	req := &gamingpb.UpdateRealmRequest{
		// TODO: Fill request struct fields.
	}
	op, err := c.UpdateRealm(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	resp, err := op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RealmsClient) UpdateRealmOperation

func (c *RealmsClient) UpdateRealmOperation(name string) *UpdateRealmOperation

UpdateRealmOperation returns a new UpdateRealmOperation from a given name. The name must be that of a previously created UpdateRealmOperation, possibly from a different process.

UpdateGameServerClusterOperation

type UpdateGameServerClusterOperation struct {
	// contains filtered or unexported fields
}

UpdateGameServerClusterOperation manages a long-running operation from UpdateGameServerCluster.

func (*UpdateGameServerClusterOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateGameServerClusterOperation) Metadata

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 (*UpdateGameServerClusterOperation) Name

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 (*UpdateGameServerClusterOperation) Poll

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 (*UpdateGameServerClusterOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateGameServerDeploymentOperation

type UpdateGameServerDeploymentOperation struct {
	// contains filtered or unexported fields
}

UpdateGameServerDeploymentOperation manages a long-running operation from UpdateGameServerDeployment.

func (*UpdateGameServerDeploymentOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateGameServerDeploymentOperation) Metadata

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 (*UpdateGameServerDeploymentOperation) Name

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 (*UpdateGameServerDeploymentOperation) Poll

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 (*UpdateGameServerDeploymentOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateGameServerDeploymentRolloutOperation

type UpdateGameServerDeploymentRolloutOperation struct {
	// contains filtered or unexported fields
}

UpdateGameServerDeploymentRolloutOperation manages a long-running operation from UpdateGameServerDeploymentRollout.

func (*UpdateGameServerDeploymentRolloutOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateGameServerDeploymentRolloutOperation) Metadata

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 (*UpdateGameServerDeploymentRolloutOperation) Name

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 (*UpdateGameServerDeploymentRolloutOperation) Poll

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 (*UpdateGameServerDeploymentRolloutOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateRealmOperation

type UpdateRealmOperation struct {
	// contains filtered or unexported fields
}

UpdateRealmOperation manages a long-running operation from UpdateRealm.

func (*UpdateRealmOperation) Done

func (op *UpdateRealmOperation) Done() bool

Done reports whether the long-running operation has completed.

func (*UpdateRealmOperation) Metadata

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 (*UpdateRealmOperation) Name

func (op *UpdateRealmOperation) 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 (*UpdateRealmOperation) Poll

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 (*UpdateRealmOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.