- 0.116.0 (latest)
- 0.115.1
- 0.114.0
- 0.113.0
- 0.112.2
- 0.111.0
- 0.110.10
- 0.109.0
- 0.108.0
- 0.107.0
- 0.106.0
- 0.105.0
- 0.104.0
- 0.103.0
- 0.102.1
- 0.101.1
- 0.100.2
- 0.99.0
- 0.98.0
- 0.97.0
- 0.96.0
- 0.95.0
- 0.94.1
- 0.93.3
- 0.92.3
- 0.91.1
- 0.90.0
- 0.89.0
- 0.88.0
- 0.87.0
- 0.86.0
- 0.85.0
- 0.84.0
- 0.83.0
- 0.82.0
- 0.81.0
- 0.80.0
- 0.79.0
- 0.78.0
- 0.77.0
- 0.76.0
- 0.75.0
Package gaming is an auto-generated package for the Game Services API.
Deploy and manage infrastructure for global multiplayer gaming experiences.
Use of Context
The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go.
Functions
func DefaultAuthScopes
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
CreateGameServerClusterOperation
type CreateGameServerClusterOperation struct {
// contains filtered or unexported fields
}
CreateGameServerClusterOperation manages a long-running operation from CreateGameServerCluster.
func (*CreateGameServerClusterOperation) Done
func (op *CreateGameServerClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateGameServerClusterOperation) Metadata
func (op *CreateGameServerClusterOperation) Metadata() (*gamingpb.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 (*CreateGameServerClusterOperation) Name
func (op *CreateGameServerClusterOperation) 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 (*CreateGameServerClusterOperation) Poll
func (op *CreateGameServerClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*gamingpb.GameServerCluster, 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 (*CreateGameServerClusterOperation) Wait
func (op *CreateGameServerClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*gamingpb.GameServerCluster, 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.
CreateGameServerConfigOperation
type CreateGameServerConfigOperation struct {
// contains filtered or unexported fields
}
CreateGameServerConfigOperation manages a long-running operation from CreateGameServerConfig.
func (*CreateGameServerConfigOperation) Done
func (op *CreateGameServerConfigOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateGameServerConfigOperation) Metadata
func (op *CreateGameServerConfigOperation) Metadata() (*gamingpb.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 (*CreateGameServerConfigOperation) Name
func (op *CreateGameServerConfigOperation) 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 (*CreateGameServerConfigOperation) Poll
func (op *CreateGameServerConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*gamingpb.GameServerConfig, 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 (*CreateGameServerConfigOperation) Wait
func (op *CreateGameServerConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*gamingpb.GameServerConfig, 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.
CreateGameServerDeploymentOperation
type CreateGameServerDeploymentOperation struct {
// contains filtered or unexported fields
}
CreateGameServerDeploymentOperation manages a long-running operation from CreateGameServerDeployment.
func (*CreateGameServerDeploymentOperation) Done
func (op *CreateGameServerDeploymentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateGameServerDeploymentOperation) Metadata
func (op *CreateGameServerDeploymentOperation) Metadata() (*gamingpb.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 (*CreateGameServerDeploymentOperation) Name
func (op *CreateGameServerDeploymentOperation) 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 (*CreateGameServerDeploymentOperation) Poll
func (op *CreateGameServerDeploymentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*gamingpb.GameServerDeployment, 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 (*CreateGameServerDeploymentOperation) Wait
func (op *CreateGameServerDeploymentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*gamingpb.GameServerDeployment, 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.
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
func (op *CreateRealmOperation) Metadata() (*gamingpb.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 (*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
func (op *CreateRealmOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*gamingpb.Realm, 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 (*CreateRealmOperation) Wait
func (op *CreateRealmOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*gamingpb.Realm, 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.
DeleteGameServerClusterOperation
type DeleteGameServerClusterOperation struct {
// contains filtered or unexported fields
}
DeleteGameServerClusterOperation manages a long-running operation from DeleteGameServerCluster.
func (*DeleteGameServerClusterOperation) Done
func (op *DeleteGameServerClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteGameServerClusterOperation) Metadata
func (op *DeleteGameServerClusterOperation) Metadata() (*gamingpb.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 (*DeleteGameServerClusterOperation) Name
func (op *DeleteGameServerClusterOperation) 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 (*DeleteGameServerClusterOperation) Poll
func (op *DeleteGameServerClusterOperation) 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 (*DeleteGameServerClusterOperation) Wait
func (op *DeleteGameServerClusterOperation) 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.
DeleteGameServerConfigOperation
type DeleteGameServerConfigOperation struct {
// contains filtered or unexported fields
}
DeleteGameServerConfigOperation manages a long-running operation from DeleteGameServerConfig.
func (*DeleteGameServerConfigOperation) Done
func (op *DeleteGameServerConfigOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteGameServerConfigOperation) Metadata
func (op *DeleteGameServerConfigOperation) Metadata() (*gamingpb.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 (*DeleteGameServerConfigOperation) Name
func (op *DeleteGameServerConfigOperation) 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 (*DeleteGameServerConfigOperation) Poll
func (op *DeleteGameServerConfigOperation) 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 (*DeleteGameServerConfigOperation) Wait
func (op *DeleteGameServerConfigOperation) 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.
DeleteGameServerDeploymentOperation
type DeleteGameServerDeploymentOperation struct {
// contains filtered or unexported fields
}
DeleteGameServerDeploymentOperation manages a long-running operation from DeleteGameServerDeployment.
func (*DeleteGameServerDeploymentOperation) Done
func (op *DeleteGameServerDeploymentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteGameServerDeploymentOperation) Metadata
func (op *DeleteGameServerDeploymentOperation) Metadata() (*gamingpb.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 (*DeleteGameServerDeploymentOperation) Name
func (op *DeleteGameServerDeploymentOperation) 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 (*DeleteGameServerDeploymentOperation) Poll
func (op *DeleteGameServerDeploymentOperation) 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 (*DeleteGameServerDeploymentOperation) Wait
func (op *DeleteGameServerDeploymentOperation) 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.
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
func (op *DeleteRealmOperation) Metadata() (*gamingpb.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 (*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
func (it *GameServerClusterIterator) Next() (*gamingpb.GameServerCluster, 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 (*GameServerClusterIterator) PageInfo
func (it *GameServerClusterIterator) PageInfo() *iterator.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 {
// The call options for this service.
CallOptions *GameServerClustersCallOptions
// 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
}
GameServerClustersClient is a client for interacting with Game Services API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The game server cluster maps to Kubernetes clusters running Agones and is used to manage fleets within clusters.
func NewGameServerClustersClient
func NewGameServerClustersClient(ctx context.Context, opts ...option.ClientOption) (*GameServerClustersClient, error)
NewGameServerClustersClient creates a new game server clusters service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
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.
}
defer c.Close()
// 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
func (c *GameServerClustersClient) CreateGameServerCluster(ctx context.Context, req *gamingpb.CreateGameServerClusterRequest, opts ...gax.CallOption) (*CreateGameServerClusterOperation, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerClustersClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerClustersClient) DeleteGameServerCluster(ctx context.Context, req *gamingpb.DeleteGameServerClusterRequest, opts ...gax.CallOption) (*DeleteGameServerClusterOperation, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerClustersClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerClustersClient) GetGameServerCluster(ctx context.Context, req *gamingpb.GetGameServerClusterRequest, opts ...gax.CallOption) (*gamingpb.GameServerCluster, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerClustersClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerClustersClient) ListGameServerClusters(ctx context.Context, req *gamingpb.ListGameServerClustersRequest, opts ...gax.CallOption) *GameServerClusterIterator
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() {
ctx := context.Background()
c, err := gaming.NewGameServerClustersClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerClustersClient) PreviewCreateGameServerCluster(ctx context.Context, req *gamingpb.PreviewCreateGameServerClusterRequest, opts ...gax.CallOption) (*gamingpb.PreviewCreateGameServerClusterResponse, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerClustersClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerClustersClient) PreviewDeleteGameServerCluster(ctx context.Context, req *gamingpb.PreviewDeleteGameServerClusterRequest, opts ...gax.CallOption) (*gamingpb.PreviewDeleteGameServerClusterResponse, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerClustersClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerClustersClient) PreviewUpdateGameServerCluster(ctx context.Context, req *gamingpb.PreviewUpdateGameServerClusterRequest, opts ...gax.CallOption) (*gamingpb.PreviewUpdateGameServerClusterResponse, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerClustersClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerClustersClient) UpdateGameServerCluster(ctx context.Context, req *gamingpb.UpdateGameServerClusterRequest, opts ...gax.CallOption) (*UpdateGameServerClusterOperation, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerClustersClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (it *GameServerConfigIterator) Next() (*gamingpb.GameServerConfig, 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 (*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 {
// The call options for this service.
CallOptions *GameServerConfigsCallOptions
// 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
}
GameServerConfigsClient is a client for interacting with Game Services API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The game server config configures the game servers in an Agones fleet.
func NewGameServerConfigsClient
func NewGameServerConfigsClient(ctx context.Context, opts ...option.ClientOption) (*GameServerConfigsClient, error)
NewGameServerConfigsClient creates a new game server configs service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
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.
}
defer c.Close()
// 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
func (c *GameServerConfigsClient) CreateGameServerConfig(ctx context.Context, req *gamingpb.CreateGameServerConfigRequest, opts ...gax.CallOption) (*CreateGameServerConfigOperation, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerConfigsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerConfigsClient) DeleteGameServerConfig(ctx context.Context, req *gamingpb.DeleteGameServerConfigRequest, opts ...gax.CallOption) (*DeleteGameServerConfigOperation, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerConfigsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerConfigsClient) GetGameServerConfig(ctx context.Context, req *gamingpb.GetGameServerConfigRequest, opts ...gax.CallOption) (*gamingpb.GameServerConfig, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerConfigsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerConfigsClient) ListGameServerConfigs(ctx context.Context, req *gamingpb.ListGameServerConfigsRequest, opts ...gax.CallOption) *GameServerConfigIterator
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() {
ctx := context.Background()
c, err := gaming.NewGameServerConfigsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (it *GameServerDeploymentIterator) Next() (*gamingpb.GameServerDeployment, 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 (*GameServerDeploymentIterator) PageInfo
func (it *GameServerDeploymentIterator) PageInfo() *iterator.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 {
// The call options for this service.
CallOptions *GameServerDeploymentsCallOptions
// 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
}
GameServerDeploymentsClient is a client for interacting with Game Services API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The game server deployment is used to control the deployment of Agones fleets.
func NewGameServerDeploymentsClient
func NewGameServerDeploymentsClient(ctx context.Context, opts ...option.ClientOption) (*GameServerDeploymentsClient, error)
NewGameServerDeploymentsClient creates a new game server deployments service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
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.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*GameServerDeploymentsClient) Close
func (c *GameServerDeploymentsClient) Close() error
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
func (c *GameServerDeploymentsClient) CreateGameServerDeployment(ctx context.Context, req *gamingpb.CreateGameServerDeploymentRequest, opts ...gax.CallOption) (*CreateGameServerDeploymentOperation, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerDeploymentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerDeploymentsClient) DeleteGameServerDeployment(ctx context.Context, req *gamingpb.DeleteGameServerDeploymentRequest, opts ...gax.CallOption) (*DeleteGameServerDeploymentOperation, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerDeploymentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerDeploymentsClient) FetchDeploymentState(ctx context.Context, req *gamingpb.FetchDeploymentStateRequest, opts ...gax.CallOption) (*gamingpb.FetchDeploymentStateResponse, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerDeploymentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerDeploymentsClient) GetGameServerDeployment(ctx context.Context, req *gamingpb.GetGameServerDeploymentRequest, opts ...gax.CallOption) (*gamingpb.GameServerDeployment, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerDeploymentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerDeploymentsClient) GetGameServerDeploymentRollout(ctx context.Context, req *gamingpb.GetGameServerDeploymentRolloutRequest, opts ...gax.CallOption) (*gamingpb.GameServerDeploymentRollout, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerDeploymentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerDeploymentsClient) ListGameServerDeployments(ctx context.Context, req *gamingpb.ListGameServerDeploymentsRequest, opts ...gax.CallOption) *GameServerDeploymentIterator
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() {
ctx := context.Background()
c, err := gaming.NewGameServerDeploymentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerDeploymentsClient) PreviewGameServerDeploymentRollout(ctx context.Context, req *gamingpb.PreviewGameServerDeploymentRolloutRequest, opts ...gax.CallOption) (*gamingpb.PreviewGameServerDeploymentRolloutResponse, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerDeploymentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerDeploymentsClient) UpdateGameServerDeployment(ctx context.Context, req *gamingpb.UpdateGameServerDeploymentRequest, opts ...gax.CallOption) (*UpdateGameServerDeploymentOperation, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerDeploymentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *GameServerDeploymentsClient) UpdateGameServerDeploymentRollout(ctx context.Context, req *gamingpb.UpdateGameServerDeploymentRolloutRequest, opts ...gax.CallOption) (*UpdateGameServerDeploymentRolloutOperation, error)
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() {
ctx := context.Background()
c, err := gaming.NewGameServerDeploymentsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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 {
// The call options for this service.
CallOptions *RealmsCallOptions
// 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
}
RealmsClient is a client for interacting with Game Services API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A realm is a grouping of game server clusters that are considered interchangeable.
func NewRealmsClient
func NewRealmsClient(ctx context.Context, opts ...option.ClientOption) (*RealmsClient, error)
NewRealmsClient creates a new realms service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
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.
}
defer c.Close()
// 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
func (c *RealmsClient) CreateRealm(ctx context.Context, req *gamingpb.CreateRealmRequest, opts ...gax.CallOption) (*CreateRealmOperation, error)
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() {
ctx := context.Background()
c, err := gaming.NewRealmsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *RealmsClient) DeleteRealm(ctx context.Context, req *gamingpb.DeleteRealmRequest, opts ...gax.CallOption) (*DeleteRealmOperation, error)
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() {
ctx := context.Background()
c, err := gaming.NewRealmsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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() {
ctx := context.Background()
c, err := gaming.NewRealmsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *RealmsClient) ListRealms(ctx context.Context, req *gamingpb.ListRealmsRequest, opts ...gax.CallOption) *RealmIterator
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() {
ctx := context.Background()
c, err := gaming.NewRealmsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *RealmsClient) PreviewRealmUpdate(ctx context.Context, req *gamingpb.PreviewRealmUpdateRequest, opts ...gax.CallOption) (*gamingpb.PreviewRealmUpdateResponse, error)
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() {
ctx := context.Background()
c, err := gaming.NewRealmsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (c *RealmsClient) UpdateRealm(ctx context.Context, req *gamingpb.UpdateRealmRequest, opts ...gax.CallOption) (*UpdateRealmOperation, error)
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() {
ctx := context.Background()
c, err := gaming.NewRealmsClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
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
func (op *UpdateGameServerClusterOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateGameServerClusterOperation) Metadata
func (op *UpdateGameServerClusterOperation) Metadata() (*gamingpb.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 (*UpdateGameServerClusterOperation) Name
func (op *UpdateGameServerClusterOperation) 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 (*UpdateGameServerClusterOperation) Poll
func (op *UpdateGameServerClusterOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*gamingpb.GameServerCluster, 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 (*UpdateGameServerClusterOperation) Wait
func (op *UpdateGameServerClusterOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*gamingpb.GameServerCluster, 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.
UpdateGameServerDeploymentOperation
type UpdateGameServerDeploymentOperation struct {
// contains filtered or unexported fields
}
UpdateGameServerDeploymentOperation manages a long-running operation from UpdateGameServerDeployment.
func (*UpdateGameServerDeploymentOperation) Done
func (op *UpdateGameServerDeploymentOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateGameServerDeploymentOperation) Metadata
func (op *UpdateGameServerDeploymentOperation) Metadata() (*gamingpb.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 (*UpdateGameServerDeploymentOperation) Name
func (op *UpdateGameServerDeploymentOperation) 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 (*UpdateGameServerDeploymentOperation) Poll
func (op *UpdateGameServerDeploymentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*gamingpb.GameServerDeployment, 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 (*UpdateGameServerDeploymentOperation) Wait
func (op *UpdateGameServerDeploymentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*gamingpb.GameServerDeployment, 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.
UpdateGameServerDeploymentRolloutOperation
type UpdateGameServerDeploymentRolloutOperation struct {
// contains filtered or unexported fields
}
UpdateGameServerDeploymentRolloutOperation manages a long-running operation from UpdateGameServerDeploymentRollout.
func (*UpdateGameServerDeploymentRolloutOperation) Done
func (op *UpdateGameServerDeploymentRolloutOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateGameServerDeploymentRolloutOperation) Metadata
func (op *UpdateGameServerDeploymentRolloutOperation) Metadata() (*gamingpb.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 (*UpdateGameServerDeploymentRolloutOperation) Name
func (op *UpdateGameServerDeploymentRolloutOperation) 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 (*UpdateGameServerDeploymentRolloutOperation) Poll
func (op *UpdateGameServerDeploymentRolloutOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*gamingpb.GameServerDeployment, 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 (*UpdateGameServerDeploymentRolloutOperation) Wait
func (op *UpdateGameServerDeploymentRolloutOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*gamingpb.GameServerDeployment, 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.
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
func (op *UpdateRealmOperation) Metadata() (*gamingpb.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 (*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
func (op *UpdateRealmOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*gamingpb.Realm, 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 (*UpdateRealmOperation) Wait
func (op *UpdateRealmOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*gamingpb.Realm, 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.