Documentation
¶
Index ¶
- Variables
- func RegisterOperationsServer(s *grpc.Server, srv OperationsServer)
- type CancelOperationRequest
- func (*CancelOperationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CancelOperationRequest) GetName() string
- func (*CancelOperationRequest) ProtoMessage()
- func (x *CancelOperationRequest) ProtoReflect() protoreflect.Message
- func (x *CancelOperationRequest) Reset()
- func (x *CancelOperationRequest) String() string
- type DeleteOperationRequest
- func (*DeleteOperationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteOperationRequest) GetName() string
- func (*DeleteOperationRequest) ProtoMessage()
- func (x *DeleteOperationRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteOperationRequest) Reset()
- func (x *DeleteOperationRequest) String() string
- type GetOperationRequest
- func (*GetOperationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetOperationRequest) GetName() string
- func (*GetOperationRequest) ProtoMessage()
- func (x *GetOperationRequest) ProtoReflect() protoreflect.Message
- func (x *GetOperationRequest) Reset()
- func (x *GetOperationRequest) String() string
- type ListOperationsRequest
- func (*ListOperationsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListOperationsRequest) GetFilter() string
- func (x *ListOperationsRequest) GetName() string
- func (x *ListOperationsRequest) GetPageSize() int32
- func (x *ListOperationsRequest) GetPageToken() string
- func (x *ListOperationsRequest) GetReturnPartialSuccess() bool
- func (*ListOperationsRequest) ProtoMessage()
- func (x *ListOperationsRequest) ProtoReflect() protoreflect.Message
- func (x *ListOperationsRequest) Reset()
- func (x *ListOperationsRequest) String() string
- type ListOperationsResponse
- func (*ListOperationsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListOperationsResponse) GetNextPageToken() string
- func (x *ListOperationsResponse) GetOperations() []*Operation
- func (x *ListOperationsResponse) GetUnreachable() []string
- func (*ListOperationsResponse) ProtoMessage()
- func (x *ListOperationsResponse) ProtoReflect() protoreflect.Message
- func (x *ListOperationsResponse) Reset()
- func (x *ListOperationsResponse) String() string
- type Operation
- func (*Operation) Descriptor() ([]byte, []int)deprecated
- func (x *Operation) GetDone() bool
- func (x *Operation) GetError() *status.Status
- func (x *Operation) GetMetadata() *anypb.Any
- func (x *Operation) GetName() string
- func (x *Operation) GetResponse() *anypb.Any
- func (m *Operation) GetResult() isOperation_Result
- func (*Operation) ProtoMessage()
- func (x *Operation) ProtoReflect() protoreflect.Message
- func (x *Operation) Reset()
- func (x *Operation) String() string
- type OperationInfo
- func (*OperationInfo) Descriptor() ([]byte, []int)deprecated
- func (x *OperationInfo) GetMetadataType() string
- func (x *OperationInfo) GetResponseType() string
- func (*OperationInfo) ProtoMessage()
- func (x *OperationInfo) ProtoReflect() protoreflect.Message
- func (x *OperationInfo) Reset()
- func (x *OperationInfo) String() string
- type Operation_Error
- type Operation_Response
- type OperationsClient
- type OperationsServer
- type UnimplementedOperationsServer
- func (*UnimplementedOperationsServer) CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error)
- func (*UnimplementedOperationsServer) DeleteOperation(context.Context, *DeleteOperationRequest) (*emptypb.Empty, error)
- func (*UnimplementedOperationsServer) GetOperation(context.Context, *GetOperationRequest) (*Operation, error)
- func (*UnimplementedOperationsServer) ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error)
- func (*UnimplementedOperationsServer) WaitOperation(context.Context, *WaitOperationRequest) (*Operation, error)
- type WaitOperationRequest
- func (*WaitOperationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WaitOperationRequest) GetName() string
- func (x *WaitOperationRequest) GetTimeout() *durationpb.Duration
- func (*WaitOperationRequest) ProtoMessage()
- func (x *WaitOperationRequest) ProtoReflect() protoreflect.Message
- func (x *WaitOperationRequest) Reset()
- func (x *WaitOperationRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var ( // Additional information regarding long-running operations. // In particular, this specifies the types that are returned from // long-running operations. // // Required for methods that return `google.longrunning.Operation`; invalid // otherwise. // // optional google.longrunning.OperationInfo operation_info = 1049; E_OperationInfo = &file_google_longrunning_operations_proto_extTypes[0] )
Extension fields to descriptorpb.MethodOptions.
var File_google_longrunning_operations_proto protoreflect.FileDescriptor
Functions ¶
func RegisterOperationsServer ¶
func RegisterOperationsServer(s *grpc.Server, srv OperationsServer)
Types ¶
type CancelOperationRequest ¶
type CancelOperationRequest struct {
// The name of the operation resource to be cancelled.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
func (*CancelOperationRequest) Descriptor
deprecated
func (*CancelOperationRequest) Descriptor() ([]byte, []int)
Deprecated: Use CancelOperationRequest.ProtoReflect.Descriptor instead.
func (*CancelOperationRequest) GetName ¶
func (x *CancelOperationRequest) GetName() string
func (*CancelOperationRequest) ProtoMessage ¶
func (*CancelOperationRequest) ProtoMessage()
func (*CancelOperationRequest) ProtoReflect ¶
func (x *CancelOperationRequest) ProtoReflect() protoreflect.Message
func (*CancelOperationRequest) Reset ¶
func (x *CancelOperationRequest) Reset()
func (*CancelOperationRequest) String ¶
func (x *CancelOperationRequest) String() string
type DeleteOperationRequest ¶
type DeleteOperationRequest struct {
// The name of the operation resource to be deleted.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
func (*DeleteOperationRequest) Descriptor
deprecated
func (*DeleteOperationRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteOperationRequest.ProtoReflect.Descriptor instead.
func (*DeleteOperationRequest) GetName ¶
func (x *DeleteOperationRequest) GetName() string
func (*DeleteOperationRequest) ProtoMessage ¶
func (*DeleteOperationRequest) ProtoMessage()
func (*DeleteOperationRequest) ProtoReflect ¶
func (x *DeleteOperationRequest) ProtoReflect() protoreflect.Message
func (*DeleteOperationRequest) Reset ¶
func (x *DeleteOperationRequest) Reset()
func (*DeleteOperationRequest) String ¶
func (x *DeleteOperationRequest) String() string
type GetOperationRequest ¶
type GetOperationRequest struct {
// The name of the operation resource.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation].
func (*GetOperationRequest) Descriptor
deprecated
func (*GetOperationRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetOperationRequest.ProtoReflect.Descriptor instead.
func (*GetOperationRequest) GetName ¶
func (x *GetOperationRequest) GetName() string
func (*GetOperationRequest) ProtoMessage ¶
func (*GetOperationRequest) ProtoMessage()
func (*GetOperationRequest) ProtoReflect ¶
func (x *GetOperationRequest) ProtoReflect() protoreflect.Message
func (*GetOperationRequest) Reset ¶
func (x *GetOperationRequest) Reset()
func (*GetOperationRequest) String ¶
func (x *GetOperationRequest) String() string
type ListOperationsRequest ¶
type ListOperationsRequest struct {
// The name of the operation's parent resource.
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
// The standard list filter.
Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
// The standard list page size.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// The standard list page token.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
// When set to `true`, operations that are reachable are returned as normal,
// and those that are unreachable are returned in the
// [ListOperationsResponse.unreachable] field.
//
// This can only be `true` when reading across collections e.g. when `parent`
// is set to `"projects/example/locations/-"`.
//
// This field is not by default supported and will result in an
// `UNIMPLEMENTED` error if set unless explicitly documented otherwise in
// service or product specific documentation.
ReturnPartialSuccess bool `protobuf:"varint,5,opt,name=return_partial_success,json=returnPartialSuccess,proto3" json:"return_partial_success,omitempty"`
// contains filtered or unexported fields
}
The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
func (*ListOperationsRequest) Descriptor
deprecated
func (*ListOperationsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListOperationsRequest.ProtoReflect.Descriptor instead.
func (*ListOperationsRequest) GetFilter ¶
func (x *ListOperationsRequest) GetFilter() string
func (*ListOperationsRequest) GetName ¶
func (x *ListOperationsRequest) GetName() string
func (*ListOperationsRequest) GetPageSize ¶
func (x *ListOperationsRequest) GetPageSize() int32
func (*ListOperationsRequest) GetPageToken ¶
func (x *ListOperationsRequest) GetPageToken() string
func (*ListOperationsRequest) GetReturnPartialSuccess ¶ added in v0.7.0
func (x *ListOperationsRequest) GetReturnPartialSuccess() bool
func (*ListOperationsRequest) ProtoMessage ¶
func (*ListOperationsRequest) ProtoMessage()
func (*ListOperationsRequest) ProtoReflect ¶
func (x *ListOperationsRequest) ProtoReflect() protoreflect.Message
func (*ListOperationsRequest) Reset ¶
func (x *ListOperationsRequest) Reset()
func (*ListOperationsRequest) String ¶
func (x *ListOperationsRequest) String() string
type ListOperationsResponse ¶
type ListOperationsResponse struct {
// A list of operations that matches the specified filter in the request.
Operations []*Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"`
// The standard List next-page token.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
// Unordered list. Unreachable resources. Populated when the request sets
// `ListOperationsRequest.return_partial_success` and reads across
// collections e.g. when attempting to list all resources across all supported
// locations.
Unreachable []string `protobuf:"bytes,3,rep,name=unreachable,proto3" json:"unreachable,omitempty"`
// contains filtered or unexported fields
}
The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
func (*ListOperationsResponse) Descriptor
deprecated
func (*ListOperationsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListOperationsResponse.ProtoReflect.Descriptor instead.
func (*ListOperationsResponse) GetNextPageToken ¶
func (x *ListOperationsResponse) GetNextPageToken() string
func (*ListOperationsResponse) GetOperations ¶
func (x *ListOperationsResponse) GetOperations() []*Operation
func (*ListOperationsResponse) GetUnreachable ¶ added in v0.7.0
func (x *ListOperationsResponse) GetUnreachable() []string
func (*ListOperationsResponse) ProtoMessage ¶
func (*ListOperationsResponse) ProtoMessage()
func (*ListOperationsResponse) ProtoReflect ¶
func (x *ListOperationsResponse) ProtoReflect() protoreflect.Message
func (*ListOperationsResponse) Reset ¶
func (x *ListOperationsResponse) Reset()
func (*ListOperationsResponse) String ¶
func (x *ListOperationsResponse) String() string
type Operation ¶
type Operation struct {
// The server-assigned name, which is only unique within the same service that
// originally returns it. If you use the default HTTP mapping, the
// `name` should be a resource name ending with `operations/{unique_id}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Service-specific metadata associated with the operation. It typically
// contains progress information and common metadata such as create time.
// Some services might not provide such metadata. Any method that returns a
// long-running operation should document the metadata type, if any.
Metadata *anypb.Any `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"`
// If the value is `false`, it means the operation is still in progress.
// If `true`, the operation is completed, and either `error` or `response` is
// available.
Done bool `protobuf:"varint,3,opt,name=done,proto3" json:"done,omitempty"`
// The operation result, which can be either an `error` or a valid `response`.
// If `done` == `false`, neither `error` nor `response` is set.
// If `done` == `true`, exactly one of `error` or `response` can be set.
// Some services might not provide the result.
//
// Types that are assignable to Result:
//
// *Operation_Error
// *Operation_Response
Result isOperation_Result `protobuf_oneof:"result"`
// contains filtered or unexported fields
}
This resource represents a long-running operation that is the result of a network API call.
func (*Operation) Descriptor
deprecated
func (*Operation) GetMetadata ¶
func (*Operation) GetResponse ¶
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
func (*Operation) ProtoReflect ¶
func (x *Operation) ProtoReflect() protoreflect.Message
type OperationInfo ¶
type OperationInfo struct {
// Required. The message name of the primary return type for this
// long-running operation.
// This type will be used to deserialize the LRO's response.
//
// If the response is in a different package from the rpc, a fully-qualified
// message name must be used (e.g. `google.protobuf.Struct`).
//
// Note: Altering this value constitutes a breaking change.
ResponseType string `protobuf:"bytes,1,opt,name=response_type,json=responseType,proto3" json:"response_type,omitempty"`
// Required. The message name of the metadata type for this long-running
// operation.
//
// If the response is in a different package from the rpc, a fully-qualified
// message name must be used (e.g. `google.protobuf.Struct`).
//
// Note: Altering this value constitutes a breaking change.
MetadataType string `protobuf:"bytes,2,opt,name=metadata_type,json=metadataType,proto3" json:"metadata_type,omitempty"`
// contains filtered or unexported fields
}
A message representing the message types used by a long-running operation.
Example:
rpc Export(ExportRequest) returns (google.longrunning.Operation) {
option (google.longrunning.operation_info) = {
response_type: "ExportResponse"
metadata_type: "ExportMetadata"
};
}
func (*OperationInfo) Descriptor
deprecated
func (*OperationInfo) Descriptor() ([]byte, []int)
Deprecated: Use OperationInfo.ProtoReflect.Descriptor instead.
func (*OperationInfo) GetMetadataType ¶
func (x *OperationInfo) GetMetadataType() string
func (*OperationInfo) GetResponseType ¶
func (x *OperationInfo) GetResponseType() string
func (*OperationInfo) ProtoMessage ¶
func (*OperationInfo) ProtoMessage()
func (*OperationInfo) ProtoReflect ¶
func (x *OperationInfo) ProtoReflect() protoreflect.Message
func (*OperationInfo) Reset ¶
func (x *OperationInfo) Reset()
func (*OperationInfo) String ¶
func (x *OperationInfo) String() string
type Operation_Error ¶
type Operation_Response ¶
type Operation_Response struct {
// The normal, successful response of the operation. If the original
// method returns no data on success, such as `Delete`, the response is
// `google.protobuf.Empty`. If the original method is standard
// `Get`/`Create`/`Update`, the response should be the resource. For other
// methods, the response should have the type `XxxResponse`, where `Xxx`
// is the original method name. For example, if the original method name
// is `TakeSnapshot()`, the inferred response type is
// `TakeSnapshotResponse`.
Response *anypb.Any `protobuf:"bytes,5,opt,name=response,proto3,oneof"`
}
type OperationsClient ¶
type OperationsClient interface {
// Lists operations that match the specified filter in the request. If the
// server doesn't support this method, it returns `UNIMPLEMENTED`.
ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error)
// Gets the latest state of a long-running operation. Clients can use this
// method to poll the operation result at intervals as recommended by the API
// service.
GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error)
// Deletes a long-running operation. This method indicates that the client is
// no longer interested in the operation result. It does not cancel the
// operation. If the server doesn't support this method, it returns
// `google.rpc.Code.UNIMPLEMENTED`.
DeleteOperation(ctx context.Context, in *DeleteOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Starts asynchronous cancellation on a long-running operation. The server
// makes a best effort to cancel the operation, but success is not
// guaranteed. If the server doesn't support this method, it returns
// `google.rpc.Code.UNIMPLEMENTED`. Clients can use
// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
// other methods to check whether the cancellation succeeded or whether the
// operation completed despite cancellation. On successful cancellation,
// the operation is not deleted; instead, it becomes an operation with
// an [Operation.error][google.longrunning.Operation.error] value with a
// [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to
// `Code.CANCELLED`.
CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Waits until the specified long-running operation is done or reaches at most
// a specified timeout, returning the latest state. If the operation is
// already done, the latest state is immediately returned. If the timeout
// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
// timeout is used. If the server does not support this method, it returns
// `google.rpc.Code.UNIMPLEMENTED`.
// Note that this method is on a best-effort basis. It may return the latest
// state before the specified timeout (including immediately), meaning even an
// immediate response is no guarantee that the operation is done.
WaitOperation(ctx context.Context, in *WaitOperationRequest, opts ...grpc.CallOption) (*Operation, error)
}
OperationsClient is the client API for Operations service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewOperationsClient ¶
func NewOperationsClient(cc grpc.ClientConnInterface) OperationsClient
type OperationsServer ¶
type OperationsServer interface {
// Lists operations that match the specified filter in the request. If the
// server doesn't support this method, it returns `UNIMPLEMENTED`.
ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error)
// Gets the latest state of a long-running operation. Clients can use this
// method to poll the operation result at intervals as recommended by the API
// service.
GetOperation(context.Context, *GetOperationRequest) (*Operation, error)
// Deletes a long-running operation. This method indicates that the client is
// no longer interested in the operation result. It does not cancel the
// operation. If the server doesn't support this method, it returns
// `google.rpc.Code.UNIMPLEMENTED`.
DeleteOperation(context.Context, *DeleteOperationRequest) (*emptypb.Empty, error)
// Starts asynchronous cancellation on a long-running operation. The server
// makes a best effort to cancel the operation, but success is not
// guaranteed. If the server doesn't support this method, it returns
// `google.rpc.Code.UNIMPLEMENTED`. Clients can use
// [Operations.GetOperation][google.longrunning.Operations.GetOperation] or
// other methods to check whether the cancellation succeeded or whether the
// operation completed despite cancellation. On successful cancellation,
// the operation is not deleted; instead, it becomes an operation with
// an [Operation.error][google.longrunning.Operation.error] value with a
// [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to
// `Code.CANCELLED`.
CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error)
// Waits until the specified long-running operation is done or reaches at most
// a specified timeout, returning the latest state. If the operation is
// already done, the latest state is immediately returned. If the timeout
// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC
// timeout is used. If the server does not support this method, it returns
// `google.rpc.Code.UNIMPLEMENTED`.
// Note that this method is on a best-effort basis. It may return the latest
// state before the specified timeout (including immediately), meaning even an
// immediate response is no guarantee that the operation is done.
WaitOperation(context.Context, *WaitOperationRequest) (*Operation, error)
}
OperationsServer is the server API for Operations service.
type UnimplementedOperationsServer ¶
type UnimplementedOperationsServer struct {
}
UnimplementedOperationsServer can be embedded to have forward compatible implementations.
func (*UnimplementedOperationsServer) CancelOperation ¶
func (*UnimplementedOperationsServer) CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error)
func (*UnimplementedOperationsServer) DeleteOperation ¶
func (*UnimplementedOperationsServer) DeleteOperation(context.Context, *DeleteOperationRequest) (*emptypb.Empty, error)
func (*UnimplementedOperationsServer) GetOperation ¶
func (*UnimplementedOperationsServer) GetOperation(context.Context, *GetOperationRequest) (*Operation, error)
func (*UnimplementedOperationsServer) ListOperations ¶
func (*UnimplementedOperationsServer) ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error)
func (*UnimplementedOperationsServer) WaitOperation ¶
func (*UnimplementedOperationsServer) WaitOperation(context.Context, *WaitOperationRequest) (*Operation, error)
type WaitOperationRequest ¶
type WaitOperationRequest struct {
// The name of the operation resource to wait on.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The maximum duration to wait before timing out. If left blank, the wait
// will be at most the time permitted by the underlying HTTP/RPC protocol.
// If RPC context deadline is also specified, the shorter one will be used.
Timeout *durationpb.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"`
// contains filtered or unexported fields
}
The request message for [Operations.WaitOperation][google.longrunning.Operations.WaitOperation].
func (*WaitOperationRequest) Descriptor
deprecated
func (*WaitOperationRequest) Descriptor() ([]byte, []int)
Deprecated: Use WaitOperationRequest.ProtoReflect.Descriptor instead.
func (*WaitOperationRequest) GetName ¶
func (x *WaitOperationRequest) GetName() string
func (*WaitOperationRequest) GetTimeout ¶
func (x *WaitOperationRequest) GetTimeout() *durationpb.Duration
func (*WaitOperationRequest) ProtoMessage ¶
func (*WaitOperationRequest) ProtoMessage()
func (*WaitOperationRequest) ProtoReflect ¶
func (x *WaitOperationRequest) ProtoReflect() protoreflect.Message
func (*WaitOperationRequest) Reset ¶
func (x *WaitOperationRequest) Reset()
func (*WaitOperationRequest) String ¶
func (x *WaitOperationRequest) String() string