Package cloud.google.com/go/gaming/apiv1 (v1.10.1) Stay organized with collections Save and categorize content based on your preferences.
Package gaming is an auto-generated package for theGame Services API.
Deploy and manage infrastructure for global multiplayer gamingexperiences.
General documentation
For information about setting deadlines, reusing contexts, and moreplease visithttps://pkg.go.dev/cloud.google.com/go.
Example usage
To get started with this package, create a client.
ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerClustersClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed.The methods of Client are safe for concurrent use by multiple goroutines.The returned client must be Closed when it is done being used.
Using the Client
The following is an example of making an API call with the newly created client.
ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerClustersClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.ListGameServerClustersRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#ListGameServerClustersRequest.}it:=c.ListGameServerClusters(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}
Inspecting errors
To see examples of how to inspect errors returned by this package please reference[Inspecting errors](https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors).
Use of Context
The ctx passed to NewGameServerClustersClient is used for authentication requests andfor creating the underlying connection, but is not used for subsequent calls.Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Functions
func DefaultAuthScopes
funcDefaultAuthScopes()[]stringDefaultAuthScopes reports the default set of authentication scopes to use with this package.
CreateGameServerClusterOperation
typeCreateGameServerClusterOperationstruct{// contains filtered or unexported fields}CreateGameServerClusterOperation manages a long-running operation from CreateGameServerCluster.
func (*CreateGameServerClusterOperation) Done
func(op*CreateGameServerClusterOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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
typeCreateGameServerConfigOperationstruct{// contains filtered or unexported fields}CreateGameServerConfigOperation manages a long-running operation from CreateGameServerConfig.
func (*CreateGameServerConfigOperation) Done
func(op*CreateGameServerConfigOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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
typeCreateGameServerDeploymentOperationstruct{// contains filtered or unexported fields}CreateGameServerDeploymentOperation manages a long-running operation from CreateGameServerDeployment.
func (*CreateGameServerDeploymentOperation) Done
func(op*CreateGameServerDeploymentOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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
typeCreateRealmOperationstruct{// contains filtered or unexported fields}CreateRealmOperation manages a long-running operation from CreateRealm.
func (*CreateRealmOperation) Done
func(op*CreateRealmOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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
typeDeleteGameServerClusterOperationstruct{// contains filtered or unexported fields}DeleteGameServerClusterOperation manages a long-running operation from DeleteGameServerCluster.
func (*DeleteGameServerClusterOperation) Done
func(op*DeleteGameServerClusterOperation)Done()boolDone 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()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteGameServerConfigOperation
typeDeleteGameServerConfigOperationstruct{// contains filtered or unexported fields}DeleteGameServerConfigOperation manages a long-running operation from DeleteGameServerConfig.
func (*DeleteGameServerConfigOperation) Done
func(op*DeleteGameServerConfigOperation)Done()boolDone 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()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteGameServerDeploymentOperation
typeDeleteGameServerDeploymentOperationstruct{// contains filtered or unexported fields}DeleteGameServerDeploymentOperation manages a long-running operation from DeleteGameServerDeployment.
func (*DeleteGameServerDeploymentOperation) Done
func(op*DeleteGameServerDeploymentOperation)Done()boolDone 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()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteRealmOperation
typeDeleteRealmOperationstruct{// contains filtered or unexported fields}DeleteRealmOperation manages a long-running operation from DeleteRealm.
func (*DeleteRealmOperation) Done
func(op*DeleteRealmOperation)Done()boolDone 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()stringName 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(ctxcontext.Context,opts...gax.CallOption)errorPoll 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 andthe 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(ctxcontext.Context,opts...gax.CallOption)errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
GameServerClusterIterator
typeGameServerClusterIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gamingpb.GameServerCluster,nextPageTokenstring,errerror)// 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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*GameServerClusterIterator) PageInfo
func(it*GameServerClusterIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the google.golang.org/api/iterator package for details.
GameServerClustersCallOptions
typeGameServerClustersCallOptionsstruct{ListGameServerClusters[]gax.CallOptionGetGameServerCluster[]gax.CallOptionCreateGameServerCluster[]gax.CallOptionPreviewCreateGameServerCluster[]gax.CallOptionDeleteGameServerCluster[]gax.CallOptionPreviewDeleteGameServerCluster[]gax.CallOptionUpdateGameServerCluster[]gax.CallOptionPreviewUpdateGameServerCluster[]gax.CallOption}GameServerClustersCallOptions contains the retry settings for each method of GameServerClustersClient.
GameServerClustersClient
typeGameServerClustersClientstruct{// 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 isused to manage fleets within clusters.
func NewGameServerClustersClient
funcNewGameServerClustersClient(ctxcontext.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 isused to manage fleets within clusters.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerClustersClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewGameServerClustersRESTClient
funcNewGameServerClustersRESTClient(ctxcontext.Context,opts...option.ClientOption)(*GameServerClustersClient,error)NewGameServerClustersRESTClient creates a new game server clusters service rest client.
The game server cluster maps to Kubernetes clusters running Agones and isused to manage fleets within clusters.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerClustersRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*GameServerClustersClient) Close
func(c*GameServerClustersClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*GameServerClustersClient) Connection (deprecated)
func(c*GameServerClustersClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*GameServerClustersClient) CreateGameServerCluster
func(c*GameServerClustersClient)CreateGameServerCluster(ctxcontext.Context,req*gamingpb.CreateGameServerClusterRequest,opts...gax.CallOption)(*CreateGameServerClusterOperation,error)CreateGameServerCluster creates a new game server cluster in a given project and location.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerClustersClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.CreateGameServerClusterRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#CreateGameServerClusterRequest.}op,err:=c.CreateGameServerCluster(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerClustersClient) CreateGameServerClusterOperation
func(c*GameServerClustersClient)CreateGameServerClusterOperation(namestring)*CreateGameServerClusterOperationCreateGameServerClusterOperation 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(ctxcontext.Context,req*gamingpb.DeleteGameServerClusterRequest,opts...gax.CallOption)(*DeleteGameServerClusterOperation,error)DeleteGameServerCluster deletes a single game server cluster.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerClustersClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.DeleteGameServerClusterRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#DeleteGameServerClusterRequest.}op,err:=c.DeleteGameServerCluster(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*GameServerClustersClient) DeleteGameServerClusterOperation
func(c*GameServerClustersClient)DeleteGameServerClusterOperation(namestring)*DeleteGameServerClusterOperationDeleteGameServerClusterOperation 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(ctxcontext.Context,req*gamingpb.GetGameServerClusterRequest,opts...gax.CallOption)(*gamingpb.GameServerCluster,error)GetGameServerCluster gets details of a single game server cluster.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerClustersClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.GetGameServerClusterRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#GetGameServerClusterRequest.}resp,err:=c.GetGameServerCluster(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerClustersClient) ListGameServerClusters
func(c*GameServerClustersClient)ListGameServerClusters(ctxcontext.Context,req*gamingpb.ListGameServerClustersRequest,opts...gax.CallOption)*GameServerClusterIteratorListGameServerClusters lists game server clusters in a given project and location.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerClustersClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.ListGameServerClustersRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#ListGameServerClustersRequest.}it:=c.ListGameServerClusters(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}}func (*GameServerClustersClient) PreviewCreateGameServerCluster
func(c*GameServerClustersClient)PreviewCreateGameServerCluster(ctxcontext.Context,req*gamingpb.PreviewCreateGameServerClusterRequest,opts...gax.CallOption)(*gamingpb.PreviewCreateGameServerClusterResponse,error)PreviewCreateGameServerCluster previews creation of a new game server cluster in a given project andlocation.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerClustersClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.PreviewCreateGameServerClusterRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#PreviewCreateGameServerClusterRequest.}resp,err:=c.PreviewCreateGameServerCluster(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerClustersClient) PreviewDeleteGameServerCluster
func(c*GameServerClustersClient)PreviewDeleteGameServerCluster(ctxcontext.Context,req*gamingpb.PreviewDeleteGameServerClusterRequest,opts...gax.CallOption)(*gamingpb.PreviewDeleteGameServerClusterResponse,error)PreviewDeleteGameServerCluster previews deletion of a single game server cluster.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerClustersClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.PreviewDeleteGameServerClusterRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#PreviewDeleteGameServerClusterRequest.}resp,err:=c.PreviewDeleteGameServerCluster(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerClustersClient) PreviewUpdateGameServerCluster
func(c*GameServerClustersClient)PreviewUpdateGameServerCluster(ctxcontext.Context,req*gamingpb.PreviewUpdateGameServerClusterRequest,opts...gax.CallOption)(*gamingpb.PreviewUpdateGameServerClusterResponse,error)PreviewUpdateGameServerCluster previews updating a GameServerCluster.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerClustersClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.PreviewUpdateGameServerClusterRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#PreviewUpdateGameServerClusterRequest.}resp,err:=c.PreviewUpdateGameServerCluster(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerClustersClient) UpdateGameServerCluster
func(c*GameServerClustersClient)UpdateGameServerCluster(ctxcontext.Context,req*gamingpb.UpdateGameServerClusterRequest,opts...gax.CallOption)(*UpdateGameServerClusterOperation,error)UpdateGameServerCluster patches a single game server cluster.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerClustersClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.UpdateGameServerClusterRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#UpdateGameServerClusterRequest.}op,err:=c.UpdateGameServerCluster(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerClustersClient) UpdateGameServerClusterOperation
func(c*GameServerClustersClient)UpdateGameServerClusterOperation(namestring)*UpdateGameServerClusterOperationUpdateGameServerClusterOperation returns a new UpdateGameServerClusterOperation from a given name.The name must be that of a previously created UpdateGameServerClusterOperation, possibly from a different process.
GameServerConfigIterator
typeGameServerConfigIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gamingpb.GameServerConfig,nextPageTokenstring,errerror)// 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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*GameServerConfigIterator) PageInfo
func(it*GameServerConfigIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the google.golang.org/api/iterator package for details.
GameServerConfigsCallOptions
typeGameServerConfigsCallOptionsstruct{ListGameServerConfigs[]gax.CallOptionGetGameServerConfig[]gax.CallOptionCreateGameServerConfig[]gax.CallOptionDeleteGameServerConfig[]gax.CallOption}GameServerConfigsCallOptions contains the retry settings for each method of GameServerConfigsClient.
GameServerConfigsClient
typeGameServerConfigsClientstruct{// 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
funcNewGameServerConfigsClient(ctxcontext.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
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerConfigsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewGameServerConfigsRESTClient
funcNewGameServerConfigsRESTClient(ctxcontext.Context,opts...option.ClientOption)(*GameServerConfigsClient,error)NewGameServerConfigsRESTClient creates a new game server configs service rest client.
The game server config configures the game servers in an Agones fleet.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerConfigsRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*GameServerConfigsClient) Close
func(c*GameServerConfigsClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*GameServerConfigsClient) Connection (deprecated)
func(c*GameServerConfigsClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*GameServerConfigsClient) CreateGameServerConfig
func(c*GameServerConfigsClient)CreateGameServerConfig(ctxcontext.Context,req*gamingpb.CreateGameServerConfigRequest,opts...gax.CallOption)(*CreateGameServerConfigOperation,error)CreateGameServerConfig creates a new game server config in a given project, location, and gameserver deployment. Game server configs are immutable, and are not applieduntil referenced in the game server deployment rollout resource.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerConfigsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.CreateGameServerConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#CreateGameServerConfigRequest.}op,err:=c.CreateGameServerConfig(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerConfigsClient) CreateGameServerConfigOperation
func(c*GameServerConfigsClient)CreateGameServerConfigOperation(namestring)*CreateGameServerConfigOperationCreateGameServerConfigOperation 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(ctxcontext.Context,req*gamingpb.DeleteGameServerConfigRequest,opts...gax.CallOption)(*DeleteGameServerConfigOperation,error)DeleteGameServerConfig deletes a single game server config. The deletion will fail if the gameserver config is referenced in a game server deployment rollout.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerConfigsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.DeleteGameServerConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#DeleteGameServerConfigRequest.}op,err:=c.DeleteGameServerConfig(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*GameServerConfigsClient) DeleteGameServerConfigOperation
func(c*GameServerConfigsClient)DeleteGameServerConfigOperation(namestring)*DeleteGameServerConfigOperationDeleteGameServerConfigOperation 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(ctxcontext.Context,req*gamingpb.GetGameServerConfigRequest,opts...gax.CallOption)(*gamingpb.GameServerConfig,error)GetGameServerConfig gets details of a single game server config.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerConfigsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.GetGameServerConfigRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#GetGameServerConfigRequest.}resp,err:=c.GetGameServerConfig(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerConfigsClient) ListGameServerConfigs
func(c*GameServerConfigsClient)ListGameServerConfigs(ctxcontext.Context,req*gamingpb.ListGameServerConfigsRequest,opts...gax.CallOption)*GameServerConfigIteratorListGameServerConfigs lists game server configs in a given project, location, and game serverdeployment.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerConfigsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.ListGameServerConfigsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#ListGameServerConfigsRequest.}it:=c.ListGameServerConfigs(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}}GameServerDeploymentIterator
typeGameServerDeploymentIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gamingpb.GameServerDeployment,nextPageTokenstring,errerror)// 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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*GameServerDeploymentIterator) PageInfo
func(it*GameServerDeploymentIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the google.golang.org/api/iterator package for details.
GameServerDeploymentsCallOptions
typeGameServerDeploymentsCallOptionsstruct{ListGameServerDeployments[]gax.CallOptionGetGameServerDeployment[]gax.CallOptionCreateGameServerDeployment[]gax.CallOptionDeleteGameServerDeployment[]gax.CallOptionUpdateGameServerDeployment[]gax.CallOptionGetGameServerDeploymentRollout[]gax.CallOptionUpdateGameServerDeploymentRollout[]gax.CallOptionPreviewGameServerDeploymentRollout[]gax.CallOptionFetchDeploymentState[]gax.CallOption}GameServerDeploymentsCallOptions contains the retry settings for each method of GameServerDeploymentsClient.
GameServerDeploymentsClient
typeGameServerDeploymentsClientstruct{// 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 Agonesfleets.
func NewGameServerDeploymentsClient
funcNewGameServerDeploymentsClient(ctxcontext.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 Agonesfleets.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerDeploymentsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewGameServerDeploymentsRESTClient
funcNewGameServerDeploymentsRESTClient(ctxcontext.Context,opts...option.ClientOption)(*GameServerDeploymentsClient,error)NewGameServerDeploymentsRESTClient creates a new game server deployments service rest client.
The game server deployment is used to control the deployment of Agonesfleets.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerDeploymentsRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*GameServerDeploymentsClient) Close
func(c*GameServerDeploymentsClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*GameServerDeploymentsClient) Connection (deprecated)
func(c*GameServerDeploymentsClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*GameServerDeploymentsClient) CreateGameServerDeployment
func(c*GameServerDeploymentsClient)CreateGameServerDeployment(ctxcontext.Context,req*gamingpb.CreateGameServerDeploymentRequest,opts...gax.CallOption)(*CreateGameServerDeploymentOperation,error)CreateGameServerDeployment creates a new game server deployment in a given project and location.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerDeploymentsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.CreateGameServerDeploymentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#CreateGameServerDeploymentRequest.}op,err:=c.CreateGameServerDeployment(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerDeploymentsClient) CreateGameServerDeploymentOperation
func(c*GameServerDeploymentsClient)CreateGameServerDeploymentOperation(namestring)*CreateGameServerDeploymentOperationCreateGameServerDeploymentOperation 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(ctxcontext.Context,req*gamingpb.DeleteGameServerDeploymentRequest,opts...gax.CallOption)(*DeleteGameServerDeploymentOperation,error)DeleteGameServerDeployment deletes a single game server deployment.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerDeploymentsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.DeleteGameServerDeploymentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#DeleteGameServerDeploymentRequest.}op,err:=c.DeleteGameServerDeployment(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*GameServerDeploymentsClient) DeleteGameServerDeploymentOperation
func(c*GameServerDeploymentsClient)DeleteGameServerDeploymentOperation(namestring)*DeleteGameServerDeploymentOperationDeleteGameServerDeploymentOperation 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(ctxcontext.Context,req*gamingpb.FetchDeploymentStateRequest,opts...gax.CallOption)(*gamingpb.FetchDeploymentStateResponse,error)FetchDeploymentState retrieves information about the current state of the game serverdeployment. Gathers all the Agones fleets and Agones autoscalers,including fleets running an older version of the game server deployment.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerDeploymentsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.FetchDeploymentStateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#FetchDeploymentStateRequest.}resp,err:=c.FetchDeploymentState(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerDeploymentsClient) GetGameServerDeployment
func(c*GameServerDeploymentsClient)GetGameServerDeployment(ctxcontext.Context,req*gamingpb.GetGameServerDeploymentRequest,opts...gax.CallOption)(*gamingpb.GameServerDeployment,error)GetGameServerDeployment gets details of a single game server deployment.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerDeploymentsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.GetGameServerDeploymentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#GetGameServerDeploymentRequest.}resp,err:=c.GetGameServerDeployment(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerDeploymentsClient) GetGameServerDeploymentRollout
func(c*GameServerDeploymentsClient)GetGameServerDeploymentRollout(ctxcontext.Context,req*gamingpb.GetGameServerDeploymentRolloutRequest,opts...gax.CallOption)(*gamingpb.GameServerDeploymentRollout,error)GetGameServerDeploymentRollout gets details a single game server deployment rollout.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerDeploymentsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.GetGameServerDeploymentRolloutRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#GetGameServerDeploymentRolloutRequest.}resp,err:=c.GetGameServerDeploymentRollout(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerDeploymentsClient) ListGameServerDeployments
func(c*GameServerDeploymentsClient)ListGameServerDeployments(ctxcontext.Context,req*gamingpb.ListGameServerDeploymentsRequest,opts...gax.CallOption)*GameServerDeploymentIteratorListGameServerDeployments lists game server deployments in a given project and location.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerDeploymentsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.ListGameServerDeploymentsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#ListGameServerDeploymentsRequest.}it:=c.ListGameServerDeployments(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}}func (*GameServerDeploymentsClient) PreviewGameServerDeploymentRollout
func(c*GameServerDeploymentsClient)PreviewGameServerDeploymentRollout(ctxcontext.Context,req*gamingpb.PreviewGameServerDeploymentRolloutRequest,opts...gax.CallOption)(*gamingpb.PreviewGameServerDeploymentRolloutResponse,error)PreviewGameServerDeploymentRollout previews the game server deployment rollout. This API does not mutate therollout resource.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerDeploymentsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.PreviewGameServerDeploymentRolloutRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#PreviewGameServerDeploymentRolloutRequest.}resp,err:=c.PreviewGameServerDeploymentRollout(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerDeploymentsClient) UpdateGameServerDeployment
func(c*GameServerDeploymentsClient)UpdateGameServerDeployment(ctxcontext.Context,req*gamingpb.UpdateGameServerDeploymentRequest,opts...gax.CallOption)(*UpdateGameServerDeploymentOperation,error)UpdateGameServerDeployment patches a game server deployment.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerDeploymentsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.UpdateGameServerDeploymentRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#UpdateGameServerDeploymentRequest.}op,err:=c.UpdateGameServerDeployment(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerDeploymentsClient) UpdateGameServerDeploymentOperation
func(c*GameServerDeploymentsClient)UpdateGameServerDeploymentOperation(namestring)*UpdateGameServerDeploymentOperationUpdateGameServerDeploymentOperation 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(ctxcontext.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 anyexisting realms. For example - if the default_game_server_config is changedbut all existing realms use the override, that is valid. Similarly, if anon existing realm is explicitly called out in game_server_config_overridesfield, that will also not result in an error.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewGameServerDeploymentsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.UpdateGameServerDeploymentRolloutRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#UpdateGameServerDeploymentRolloutRequest.}op,err:=c.UpdateGameServerDeploymentRollout(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*GameServerDeploymentsClient) UpdateGameServerDeploymentRolloutOperation
func(c*GameServerDeploymentsClient)UpdateGameServerDeploymentRolloutOperation(namestring)*UpdateGameServerDeploymentRolloutOperationUpdateGameServerDeploymentRolloutOperation returns a new UpdateGameServerDeploymentRolloutOperation from a given name.The name must be that of a previously created UpdateGameServerDeploymentRolloutOperation, possibly from a different process.
RealmIterator
typeRealmIteratorstruct{// 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.Responseinterface{}// 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.InternalFetchfunc(pageSizeint,pageTokenstring)(results[]*gamingpb.Realm,nextPageTokenstring,errerror)// 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 moreresults. Once Next returns Done, all subsequent calls will return Done.
func (*RealmIterator) PageInfo
func(it*RealmIterator)PageInfo()*iterator.PageInfoPageInfo supports pagination. See the google.golang.org/api/iterator package for details.
RealmsCallOptions
typeRealmsCallOptionsstruct{ListRealms[]gax.CallOptionGetRealm[]gax.CallOptionCreateRealm[]gax.CallOptionDeleteRealm[]gax.CallOptionUpdateRealm[]gax.CallOptionPreviewRealmUpdate[]gax.CallOption}RealmsCallOptions contains the retry settings for each method of RealmsClient.
RealmsClient
typeRealmsClientstruct{// 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 consideredinterchangeable.
func NewRealmsClient
funcNewRealmsClient(ctxcontext.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 consideredinterchangeable.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewRealmsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func NewRealmsRESTClient
funcNewRealmsRESTClient(ctxcontext.Context,opts...option.ClientOption)(*RealmsClient,error)NewRealmsRESTClient creates a new realms service rest client.
A realm is a grouping of game server clusters that are consideredinterchangeable.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewRealmsRESTClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()// TODO: Use client._=c}func (*RealmsClient) Close
func(c*RealmsClient)Close()errorClose closes the connection to the API service. The user should invoke this whenthe client is no longer required.
func (*RealmsClient) Connection (deprecated)
func(c*RealmsClient)Connection()*grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not alwaysreturn the same resource.
func (*RealmsClient) CreateRealm
func(c*RealmsClient)CreateRealm(ctxcontext.Context,req*gamingpb.CreateRealmRequest,opts...gax.CallOption)(*CreateRealmOperation,error)CreateRealm creates a new realm in a given project and location.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewRealmsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.CreateRealmRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#CreateRealmRequest.}op,err:=c.CreateRealm(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*RealmsClient) CreateRealmOperation
func(c*RealmsClient)CreateRealmOperation(namestring)*CreateRealmOperationCreateRealmOperation 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(ctxcontext.Context,req*gamingpb.DeleteRealmRequest,opts...gax.CallOption)(*DeleteRealmOperation,error)DeleteRealm deletes a single realm.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewRealmsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.DeleteRealmRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#DeleteRealmRequest.}op,err:=c.DeleteRealm(ctx,req)iferr!=nil{// TODO: Handle error.}err=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}}func (*RealmsClient) DeleteRealmOperation
func(c*RealmsClient)DeleteRealmOperation(namestring)*DeleteRealmOperationDeleteRealmOperation 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(ctxcontext.Context,req*gamingpb.GetRealmRequest,opts...gax.CallOption)(*gamingpb.Realm,error)GetRealm gets details of a single realm.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewRealmsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.GetRealmRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#GetRealmRequest.}resp,err:=c.GetRealm(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*RealmsClient) ListRealms
func(c*RealmsClient)ListRealms(ctxcontext.Context,req*gamingpb.ListRealmsRequest,opts...gax.CallOption)*RealmIteratorListRealms lists realms in a given project and location.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb""google.golang.org/api/iterator")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewRealmsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.ListRealmsRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#ListRealmsRequest.}it:=c.ListRealms(ctx,req)for{resp,err:=it.Next()iferr==iterator.Done{break}iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}}func (*RealmsClient) PreviewRealmUpdate
func(c*RealmsClient)PreviewRealmUpdate(ctxcontext.Context,req*gamingpb.PreviewRealmUpdateRequest,opts...gax.CallOption)(*gamingpb.PreviewRealmUpdateResponse,error)PreviewRealmUpdate previews patches to a single realm.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewRealmsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.PreviewRealmUpdateRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#PreviewRealmUpdateRequest.}resp,err:=c.PreviewRealmUpdate(ctx,req)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*RealmsClient) UpdateRealm
func(c*RealmsClient)UpdateRealm(ctxcontext.Context,req*gamingpb.UpdateRealmRequest,opts...gax.CallOption)(*UpdateRealmOperation,error)UpdateRealm patches a single realm.
Example
packagemainimport("context"gaming"cloud.google.com/go/gaming/apiv1"gamingpb"cloud.google.com/go/gaming/apiv1/gamingpb")funcmain(){ctx:=context.Background()// This snippet has been automatically generated and should be regarded as a code template only.// It will require modifications to work:// - It may require correct/in-range values for request initialization.// - It may require specifying regional endpoints when creating the service client as shown in:// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Optionsc,err:=gaming.NewRealmsClient(ctx)iferr!=nil{// TODO: Handle error.}deferc.Close()req:=&gamingpb.UpdateRealmRequest{// TODO: Fill request struct fields.// See https://pkg.go.dev/cloud.google.com/go/gaming/apiv1/gamingpb#UpdateRealmRequest.}op,err:=c.UpdateRealm(ctx,req)iferr!=nil{// TODO: Handle error.}resp,err:=op.Wait(ctx)iferr!=nil{// TODO: Handle error.}// TODO: Use resp._=resp}func (*RealmsClient) UpdateRealmOperation
func(c*RealmsClient)UpdateRealmOperation(namestring)*UpdateRealmOperationUpdateRealmOperation returns a new UpdateRealmOperation from a given name.The name must be that of a previously created UpdateRealmOperation, possibly from a different process.
UpdateGameServerClusterOperation
typeUpdateGameServerClusterOperationstruct{// contains filtered or unexported fields}UpdateGameServerClusterOperation manages a long-running operation from UpdateGameServerCluster.
func (*UpdateGameServerClusterOperation) Done
func(op*UpdateGameServerClusterOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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
typeUpdateGameServerDeploymentOperationstruct{// contains filtered or unexported fields}UpdateGameServerDeploymentOperation manages a long-running operation from UpdateGameServerDeployment.
func (*UpdateGameServerDeploymentOperation) Done
func(op*UpdateGameServerDeploymentOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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
typeUpdateGameServerDeploymentRolloutOperationstruct{// contains filtered or unexported fields}UpdateGameServerDeploymentRolloutOperation manages a long-running operation from UpdateGameServerDeploymentRollout.
func (*UpdateGameServerDeploymentRolloutOperation) Done
func(op*UpdateGameServerDeploymentRolloutOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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
typeUpdateRealmOperationstruct{// contains filtered or unexported fields}UpdateRealmOperation manages a long-running operation from UpdateRealm.
func (*UpdateRealmOperation) Done
func(op*UpdateRealmOperation)Done()boolDone 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()stringName 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(ctxcontext.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 andthe 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(ctxcontext.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.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.