Documentation ¶
Overview ¶
Package metastore is an auto-generated package for the Dataproc Metastore API.
The Dataproc Metastore API is used to manage the lifecycle and configuration of metastore services.
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.
Index ¶
- func DefaultAuthScopes() []string
- type CreateMetadataImportOperation
- func (op *CreateMetadataImportOperation) Done() bool
- func (op *CreateMetadataImportOperation) Metadata() (*metastorepb.OperationMetadata, error)
- func (op *CreateMetadataImportOperation) Name() string
- func (op *CreateMetadataImportOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*metastorepb.MetadataImport, error)
- func (op *CreateMetadataImportOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*metastorepb.MetadataImport, error)
- type CreateServiceOperation
- func (op *CreateServiceOperation) Done() bool
- func (op *CreateServiceOperation) Metadata() (*metastorepb.OperationMetadata, error)
- func (op *CreateServiceOperation) Name() string
- func (op *CreateServiceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*metastorepb.Service, error)
- func (op *CreateServiceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*metastorepb.Service, error)
- type DataprocMetastoreCallOptions
- type DataprocMetastoreClient
- func (c *DataprocMetastoreClient) Close() error
- func (c *DataprocMetastoreClient) Connection() *grpc.ClientConn
- func (c *DataprocMetastoreClient) CreateMetadataImport(ctx context.Context, req *metastorepb.CreateMetadataImportRequest, ...) (*CreateMetadataImportOperation, error)
- func (c *DataprocMetastoreClient) CreateMetadataImportOperation(name string) *CreateMetadataImportOperation
- func (c *DataprocMetastoreClient) CreateService(ctx context.Context, req *metastorepb.CreateServiceRequest, ...) (*CreateServiceOperation, error)
- func (c *DataprocMetastoreClient) CreateServiceOperation(name string) *CreateServiceOperation
- func (c *DataprocMetastoreClient) DeleteService(ctx context.Context, req *metastorepb.DeleteServiceRequest, ...) (*DeleteServiceOperation, error)
- func (c *DataprocMetastoreClient) DeleteServiceOperation(name string) *DeleteServiceOperation
- func (c *DataprocMetastoreClient) ExportMetadata(ctx context.Context, req *metastorepb.ExportMetadataRequest, ...) (*ExportMetadataOperation, error)
- func (c *DataprocMetastoreClient) ExportMetadataOperation(name string) *ExportMetadataOperation
- func (c *DataprocMetastoreClient) GetMetadataImport(ctx context.Context, req *metastorepb.GetMetadataImportRequest, ...) (*metastorepb.MetadataImport, error)
- func (c *DataprocMetastoreClient) GetService(ctx context.Context, req *metastorepb.GetServiceRequest, ...) (*metastorepb.Service, error)
- func (c *DataprocMetastoreClient) ListMetadataImports(ctx context.Context, req *metastorepb.ListMetadataImportsRequest, ...) *MetadataImportIterator
- func (c *DataprocMetastoreClient) ListServices(ctx context.Context, req *metastorepb.ListServicesRequest, ...) *ServiceIterator
- func (c *DataprocMetastoreClient) UpdateMetadataImport(ctx context.Context, req *metastorepb.UpdateMetadataImportRequest, ...) (*UpdateMetadataImportOperation, error)
- func (c *DataprocMetastoreClient) UpdateMetadataImportOperation(name string) *UpdateMetadataImportOperation
- func (c *DataprocMetastoreClient) UpdateService(ctx context.Context, req *metastorepb.UpdateServiceRequest, ...) (*UpdateServiceOperation, error)
- func (c *DataprocMetastoreClient) UpdateServiceOperation(name string) *UpdateServiceOperation
- type DeleteServiceOperation
- func (op *DeleteServiceOperation) Done() bool
- func (op *DeleteServiceOperation) Metadata() (*metastorepb.OperationMetadata, error)
- func (op *DeleteServiceOperation) Name() string
- func (op *DeleteServiceOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteServiceOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type ExportMetadataOperation
- func (op *ExportMetadataOperation) Done() bool
- func (op *ExportMetadataOperation) Metadata() (*metastorepb.OperationMetadata, error)
- func (op *ExportMetadataOperation) Name() string
- func (op *ExportMetadataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*metastorepb.MetadataExport, error)
- func (op *ExportMetadataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*metastorepb.MetadataExport, error)
- type MetadataImportIterator
- type ServiceIterator
- type UpdateMetadataImportOperation
- func (op *UpdateMetadataImportOperation) Done() bool
- func (op *UpdateMetadataImportOperation) Metadata() (*metastorepb.OperationMetadata, error)
- func (op *UpdateMetadataImportOperation) Name() string
- func (op *UpdateMetadataImportOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*metastorepb.MetadataImport, error)
- func (op *UpdateMetadataImportOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*metastorepb.MetadataImport, error)
- type UpdateServiceOperation
- func (op *UpdateServiceOperation) Done() bool
- func (op *UpdateServiceOperation) Metadata() (*metastorepb.OperationMetadata, error)
- func (op *UpdateServiceOperation) Name() string
- func (op *UpdateServiceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*metastorepb.Service, error)
- func (op *UpdateServiceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*metastorepb.Service, error)
Examples ¶
- DataprocMetastoreClient.CreateMetadataImport
- DataprocMetastoreClient.CreateService
- DataprocMetastoreClient.DeleteService
- DataprocMetastoreClient.ExportMetadata
- DataprocMetastoreClient.GetMetadataImport
- DataprocMetastoreClient.GetService
- DataprocMetastoreClient.ListMetadataImports
- DataprocMetastoreClient.ListServices
- DataprocMetastoreClient.UpdateMetadataImport
- DataprocMetastoreClient.UpdateService
- NewDataprocMetastoreClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type CreateMetadataImportOperation ¶
type CreateMetadataImportOperation struct {
// contains filtered or unexported fields
}
CreateMetadataImportOperation manages a long-running operation from CreateMetadataImport.
func (*CreateMetadataImportOperation) Done ¶
func (op *CreateMetadataImportOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateMetadataImportOperation) Metadata ¶
func (op *CreateMetadataImportOperation) Metadata() (*metastorepb.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 (*CreateMetadataImportOperation) Name ¶
func (op *CreateMetadataImportOperation) 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 (*CreateMetadataImportOperation) Poll ¶
func (op *CreateMetadataImportOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*metastorepb.MetadataImport, 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 (*CreateMetadataImportOperation) Wait ¶
func (op *CreateMetadataImportOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*metastorepb.MetadataImport, 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.
type CreateServiceOperation ¶
type CreateServiceOperation struct {
// contains filtered or unexported fields
}
CreateServiceOperation manages a long-running operation from CreateService.
func (*CreateServiceOperation) Done ¶
func (op *CreateServiceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateServiceOperation) Metadata ¶
func (op *CreateServiceOperation) Metadata() (*metastorepb.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 (*CreateServiceOperation) Name ¶
func (op *CreateServiceOperation) 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 (*CreateServiceOperation) Poll ¶
func (op *CreateServiceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*metastorepb.Service, 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 (*CreateServiceOperation) Wait ¶
func (op *CreateServiceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*metastorepb.Service, 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.
type DataprocMetastoreCallOptions ¶
type DataprocMetastoreCallOptions struct { ListServices []gax.CallOption GetService []gax.CallOption CreateService []gax.CallOption UpdateService []gax.CallOption DeleteService []gax.CallOption ListMetadataImports []gax.CallOption GetMetadataImport []gax.CallOption CreateMetadataImport []gax.CallOption UpdateMetadataImport []gax.CallOption ExportMetadata []gax.CallOption }
DataprocMetastoreCallOptions contains the retry settings for each method of DataprocMetastoreClient.
type DataprocMetastoreClient ¶
type DataprocMetastoreClient struct { // The call options for this service. CallOptions *DataprocMetastoreCallOptions // 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 }
DataprocMetastoreClient is a client for interacting with Dataproc Metastore API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Configures and manages metastore services. Metastore services are fully managed, highly available, auto-scaled, auto-healing, OSS-native deployments of technical metadata management software. Each metastore service exposes a network endpoint through which metadata queries are served. Metadata queries can originate from a variety of sources, including Apache Hive, Apache Presto, and Apache Spark.
The Dataproc Metastore API defines the following resource model:
The service works with a collection of Google Cloud projects, named: /projects/* Each project has a collection of available locations, named: /locations/* (a location must refer to a Google Cloud region) Each location has a collection of services, named: /services/* Dataproc Metastore services are resources with names of the form:
/projects/{project_number}/locations/{location_id}/services/{service_id}.
func NewDataprocMetastoreClient ¶
func NewDataprocMetastoreClient(ctx context.Context, opts ...option.ClientOption) (*DataprocMetastoreClient, error)
NewDataprocMetastoreClient creates a new dataproc metastore client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Configures and manages metastore services. Metastore services are fully managed, highly available, auto-scaled, auto-healing, OSS-native deployments of technical metadata management software. Each metastore service exposes a network endpoint through which metadata queries are served. Metadata queries can originate from a variety of sources, including Apache Hive, Apache Presto, and Apache Spark.
The Dataproc Metastore API defines the following resource model:
The service works with a collection of Google Cloud projects, named: /projects/* Each project has a collection of available locations, named: /locations/* (a location must refer to a Google Cloud region) Each location has a collection of services, named: /services/* Dataproc Metastore services are resources with names of the form:
/projects/{project_number}/locations/{location_id}/services/{service_id}.
Example ¶
package main import ( "context" metastore "cloud.google.com/go/metastore/apiv1" ) func main() { ctx := context.Background() c, err := metastore.NewDataprocMetastoreClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() // TODO: Use client. _ = c }
Output:
func (*DataprocMetastoreClient) Close ¶
func (c *DataprocMetastoreClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DataprocMetastoreClient) Connection ¶
func (c *DataprocMetastoreClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated.
func (*DataprocMetastoreClient) CreateMetadataImport ¶
func (c *DataprocMetastoreClient) CreateMetadataImport(ctx context.Context, req *metastorepb.CreateMetadataImportRequest, opts ...gax.CallOption) (*CreateMetadataImportOperation, error)
CreateMetadataImport creates a new MetadataImport in a given project and location.
Example ¶
package main import ( "context" metastore "cloud.google.com/go/metastore/apiv1" metastorepb "google.golang.org/genproto/googleapis/cloud/metastore/v1" ) func main() { ctx := context.Background() c, err := metastore.NewDataprocMetastoreClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &metastorepb.CreateMetadataImportRequest{ // TODO: Fill request struct fields. } op, err := c.CreateMetadataImport(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DataprocMetastoreClient) CreateMetadataImportOperation ¶
func (c *DataprocMetastoreClient) CreateMetadataImportOperation(name string) *CreateMetadataImportOperation
CreateMetadataImportOperation returns a new CreateMetadataImportOperation from a given name. The name must be that of a previously created CreateMetadataImportOperation, possibly from a different process.
func (*DataprocMetastoreClient) CreateService ¶
func (c *DataprocMetastoreClient) CreateService(ctx context.Context, req *metastorepb.CreateServiceRequest, opts ...gax.CallOption) (*CreateServiceOperation, error)
CreateService creates a metastore service in a project and location.
Example ¶
package main import ( "context" metastore "cloud.google.com/go/metastore/apiv1" metastorepb "google.golang.org/genproto/googleapis/cloud/metastore/v1" ) func main() { ctx := context.Background() c, err := metastore.NewDataprocMetastoreClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &metastorepb.CreateServiceRequest{ // TODO: Fill request struct fields. } op, err := c.CreateService(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DataprocMetastoreClient) CreateServiceOperation ¶
func (c *DataprocMetastoreClient) CreateServiceOperation(name string) *CreateServiceOperation
CreateServiceOperation returns a new CreateServiceOperation from a given name. The name must be that of a previously created CreateServiceOperation, possibly from a different process.
func (*DataprocMetastoreClient) DeleteService ¶
func (c *DataprocMetastoreClient) DeleteService(ctx context.Context, req *metastorepb.DeleteServiceRequest, opts ...gax.CallOption) (*DeleteServiceOperation, error)
DeleteService deletes a single service.
Example ¶
package main import ( "context" metastore "cloud.google.com/go/metastore/apiv1" metastorepb "google.golang.org/genproto/googleapis/cloud/metastore/v1" ) func main() { ctx := context.Background() c, err := metastore.NewDataprocMetastoreClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &metastorepb.DeleteServiceRequest{ // TODO: Fill request struct fields. } op, err := c.DeleteService(ctx, req) if err != nil { // TODO: Handle error. } err = op.Wait(ctx) if err != nil { // TODO: Handle error. } }
Output:
func (*DataprocMetastoreClient) DeleteServiceOperation ¶
func (c *DataprocMetastoreClient) DeleteServiceOperation(name string) *DeleteServiceOperation
DeleteServiceOperation returns a new DeleteServiceOperation from a given name. The name must be that of a previously created DeleteServiceOperation, possibly from a different process.
func (*DataprocMetastoreClient) ExportMetadata ¶
func (c *DataprocMetastoreClient) ExportMetadata(ctx context.Context, req *metastorepb.ExportMetadataRequest, opts ...gax.CallOption) (*ExportMetadataOperation, error)
ExportMetadata exports metadata from a service.
Example ¶
package main import ( "context" metastore "cloud.google.com/go/metastore/apiv1" metastorepb "google.golang.org/genproto/googleapis/cloud/metastore/v1" ) func main() { ctx := context.Background() c, err := metastore.NewDataprocMetastoreClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &metastorepb.ExportMetadataRequest{ // TODO: Fill request struct fields. } op, err := c.ExportMetadata(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DataprocMetastoreClient) ExportMetadataOperation ¶
func (c *DataprocMetastoreClient) ExportMetadataOperation(name string) *ExportMetadataOperation
ExportMetadataOperation returns a new ExportMetadataOperation from a given name. The name must be that of a previously created ExportMetadataOperation, possibly from a different process.
func (*DataprocMetastoreClient) GetMetadataImport ¶
func (c *DataprocMetastoreClient) GetMetadataImport(ctx context.Context, req *metastorepb.GetMetadataImportRequest, opts ...gax.CallOption) (*metastorepb.MetadataImport, error)
GetMetadataImport gets details of a single import.
Example ¶
package main import ( "context" metastore "cloud.google.com/go/metastore/apiv1" metastorepb "google.golang.org/genproto/googleapis/cloud/metastore/v1" ) func main() { ctx := context.Background() c, err := metastore.NewDataprocMetastoreClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &metastorepb.GetMetadataImportRequest{ // TODO: Fill request struct fields. } resp, err := c.GetMetadataImport(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DataprocMetastoreClient) GetService ¶
func (c *DataprocMetastoreClient) GetService(ctx context.Context, req *metastorepb.GetServiceRequest, opts ...gax.CallOption) (*metastorepb.Service, error)
GetService gets the details of a single service.
Example ¶
package main import ( "context" metastore "cloud.google.com/go/metastore/apiv1" metastorepb "google.golang.org/genproto/googleapis/cloud/metastore/v1" ) func main() { ctx := context.Background() c, err := metastore.NewDataprocMetastoreClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &metastorepb.GetServiceRequest{ // TODO: Fill request struct fields. } resp, err := c.GetService(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DataprocMetastoreClient) ListMetadataImports ¶
func (c *DataprocMetastoreClient) ListMetadataImports(ctx context.Context, req *metastorepb.ListMetadataImportsRequest, opts ...gax.CallOption) *MetadataImportIterator
ListMetadataImports lists imports in a service.
Example ¶
package main import ( "context" metastore "cloud.google.com/go/metastore/apiv1" "google.golang.org/api/iterator" metastorepb "google.golang.org/genproto/googleapis/cloud/metastore/v1" ) func main() { ctx := context.Background() c, err := metastore.NewDataprocMetastoreClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &metastorepb.ListMetadataImportsRequest{ // TODO: Fill request struct fields. } it := c.ListMetadataImports(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*DataprocMetastoreClient) ListServices ¶
func (c *DataprocMetastoreClient) ListServices(ctx context.Context, req *metastorepb.ListServicesRequest, opts ...gax.CallOption) *ServiceIterator
ListServices lists services in a project and location.
Example ¶
package main import ( "context" metastore "cloud.google.com/go/metastore/apiv1" "google.golang.org/api/iterator" metastorepb "google.golang.org/genproto/googleapis/cloud/metastore/v1" ) func main() { ctx := context.Background() c, err := metastore.NewDataprocMetastoreClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &metastorepb.ListServicesRequest{ // TODO: Fill request struct fields. } it := c.ListServices(ctx, req) for { resp, err := it.Next() if err == iterator.Done { break } if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp } }
Output:
func (*DataprocMetastoreClient) UpdateMetadataImport ¶
func (c *DataprocMetastoreClient) UpdateMetadataImport(ctx context.Context, req *metastorepb.UpdateMetadataImportRequest, opts ...gax.CallOption) (*UpdateMetadataImportOperation, error)
UpdateMetadataImport updates a single import. Only the description field of MetadataImport is supported to be updated.
Example ¶
package main import ( "context" metastore "cloud.google.com/go/metastore/apiv1" metastorepb "google.golang.org/genproto/googleapis/cloud/metastore/v1" ) func main() { ctx := context.Background() c, err := metastore.NewDataprocMetastoreClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &metastorepb.UpdateMetadataImportRequest{ // TODO: Fill request struct fields. } op, err := c.UpdateMetadataImport(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DataprocMetastoreClient) UpdateMetadataImportOperation ¶
func (c *DataprocMetastoreClient) UpdateMetadataImportOperation(name string) *UpdateMetadataImportOperation
UpdateMetadataImportOperation returns a new UpdateMetadataImportOperation from a given name. The name must be that of a previously created UpdateMetadataImportOperation, possibly from a different process.
func (*DataprocMetastoreClient) UpdateService ¶
func (c *DataprocMetastoreClient) UpdateService(ctx context.Context, req *metastorepb.UpdateServiceRequest, opts ...gax.CallOption) (*UpdateServiceOperation, error)
UpdateService updates the parameters of a single service.
Example ¶
package main import ( "context" metastore "cloud.google.com/go/metastore/apiv1" metastorepb "google.golang.org/genproto/googleapis/cloud/metastore/v1" ) func main() { ctx := context.Background() c, err := metastore.NewDataprocMetastoreClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close() req := &metastorepb.UpdateServiceRequest{ // TODO: Fill request struct fields. } op, err := c.UpdateService(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp }
Output:
func (*DataprocMetastoreClient) UpdateServiceOperation ¶
func (c *DataprocMetastoreClient) UpdateServiceOperation(name string) *UpdateServiceOperation
UpdateServiceOperation returns a new UpdateServiceOperation from a given name. The name must be that of a previously created UpdateServiceOperation, possibly from a different process.
type DeleteServiceOperation ¶
type DeleteServiceOperation struct {
// contains filtered or unexported fields
}
DeleteServiceOperation manages a long-running operation from DeleteService.
func (*DeleteServiceOperation) Done ¶
func (op *DeleteServiceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteServiceOperation) Metadata ¶
func (op *DeleteServiceOperation) Metadata() (*metastorepb.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 (*DeleteServiceOperation) Name ¶
func (op *DeleteServiceOperation) 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 (*DeleteServiceOperation) Poll ¶
func (op *DeleteServiceOperation) 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 (*DeleteServiceOperation) Wait ¶
func (op *DeleteServiceOperation) 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.
type ExportMetadataOperation ¶
type ExportMetadataOperation struct {
// contains filtered or unexported fields
}
ExportMetadataOperation manages a long-running operation from ExportMetadata.
func (*ExportMetadataOperation) Done ¶
func (op *ExportMetadataOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*ExportMetadataOperation) Metadata ¶
func (op *ExportMetadataOperation) Metadata() (*metastorepb.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 (*ExportMetadataOperation) Name ¶
func (op *ExportMetadataOperation) 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 (*ExportMetadataOperation) Poll ¶
func (op *ExportMetadataOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*metastorepb.MetadataExport, 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 (*ExportMetadataOperation) Wait ¶
func (op *ExportMetadataOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*metastorepb.MetadataExport, 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.
type MetadataImportIterator ¶
type MetadataImportIterator 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 []*metastorepb.MetadataImport, nextPageToken string, err error) // contains filtered or unexported fields }
MetadataImportIterator manages a stream of *metastorepb.MetadataImport.
func (*MetadataImportIterator) Next ¶
func (it *MetadataImportIterator) Next() (*metastorepb.MetadataImport, 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 (*MetadataImportIterator) PageInfo ¶
func (it *MetadataImportIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ServiceIterator ¶
type ServiceIterator 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 []*metastorepb.Service, nextPageToken string, err error) // contains filtered or unexported fields }
ServiceIterator manages a stream of *metastorepb.Service.
func (*ServiceIterator) Next ¶
func (it *ServiceIterator) Next() (*metastorepb.Service, 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 (*ServiceIterator) PageInfo ¶
func (it *ServiceIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type UpdateMetadataImportOperation ¶
type UpdateMetadataImportOperation struct {
// contains filtered or unexported fields
}
UpdateMetadataImportOperation manages a long-running operation from UpdateMetadataImport.
func (*UpdateMetadataImportOperation) Done ¶
func (op *UpdateMetadataImportOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateMetadataImportOperation) Metadata ¶
func (op *UpdateMetadataImportOperation) Metadata() (*metastorepb.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 (*UpdateMetadataImportOperation) Name ¶
func (op *UpdateMetadataImportOperation) 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 (*UpdateMetadataImportOperation) Poll ¶
func (op *UpdateMetadataImportOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*metastorepb.MetadataImport, 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 (*UpdateMetadataImportOperation) Wait ¶
func (op *UpdateMetadataImportOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*metastorepb.MetadataImport, 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.
type UpdateServiceOperation ¶
type UpdateServiceOperation struct {
// contains filtered or unexported fields
}
UpdateServiceOperation manages a long-running operation from UpdateService.
func (*UpdateServiceOperation) Done ¶
func (op *UpdateServiceOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateServiceOperation) Metadata ¶
func (op *UpdateServiceOperation) Metadata() (*metastorepb.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 (*UpdateServiceOperation) Name ¶
func (op *UpdateServiceOperation) 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 (*UpdateServiceOperation) Poll ¶
func (op *UpdateServiceOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*metastorepb.Service, 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 (*UpdateServiceOperation) Wait ¶
func (op *UpdateServiceOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*metastorepb.Service, 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.