import "go.chromium.org/chromiumos/config/go/api/test/tls/dependencies/longrunning"
var E_OperationInfo = &proto.ExtensionDesc{ ExtendedType: (*descriptor.MethodOptions)(nil), ExtensionType: (*OperationInfo)(nil), Field: 1049, Name: "google.longrunning.operation_info", Tag: "bytes,1049,opt,name=operation_info", Filename: "chromiumos/config/api/test/tls/dependencies/longrunning/operations.proto", }
func RegisterOperationsServer(s *grpc.Server, srv OperationsServer)
type CancelOperationRequest struct { // The name of the operation resource to be cancelled. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation].
func (*CancelOperationRequest) Descriptor() ([]byte, []int)
func (m *CancelOperationRequest) GetName() string
func (*CancelOperationRequest) ProtoMessage()
func (m *CancelOperationRequest) Reset()
func (m *CancelOperationRequest) String() string
func (m *CancelOperationRequest) XXX_DiscardUnknown()
func (m *CancelOperationRequest) XXX_Merge(src proto.Message)
func (m *CancelOperationRequest) XXX_Size() int
func (m *CancelOperationRequest) XXX_Unmarshal(b []byte) error
type DeleteOperationRequest struct { // The name of the operation resource to be deleted. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation].
func (*DeleteOperationRequest) Descriptor() ([]byte, []int)
func (m *DeleteOperationRequest) GetName() string
func (*DeleteOperationRequest) ProtoMessage()
func (m *DeleteOperationRequest) Reset()
func (m *DeleteOperationRequest) String() string
func (m *DeleteOperationRequest) XXX_DiscardUnknown()
func (m *DeleteOperationRequest) XXX_Merge(src proto.Message)
func (m *DeleteOperationRequest) XXX_Size() int
func (m *DeleteOperationRequest) XXX_Unmarshal(b []byte) error
type GetOperationRequest struct { // The name of the operation resource. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation].
func (*GetOperationRequest) Descriptor() ([]byte, []int)
func (m *GetOperationRequest) GetName() string
func (*GetOperationRequest) ProtoMessage()
func (m *GetOperationRequest) Reset()
func (m *GetOperationRequest) String() string
func (m *GetOperationRequest) XXX_DiscardUnknown()
func (m *GetOperationRequest) XXX_Merge(src proto.Message)
func (m *GetOperationRequest) XXX_Size() int
func (m *GetOperationRequest) XXX_Unmarshal(b []byte) error
type ListOperationsRequest struct { // The name of the operation collection. 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
func (*ListOperationsRequest) Descriptor() ([]byte, []int)
func (m *ListOperationsRequest) GetFilter() string
func (m *ListOperationsRequest) GetName() string
func (m *ListOperationsRequest) GetPageSize() int32
func (m *ListOperationsRequest) GetPageToken() string
func (*ListOperationsRequest) ProtoMessage()
func (m *ListOperationsRequest) Reset()
func (m *ListOperationsRequest) String() string
func (m *ListOperationsRequest) XXX_DiscardUnknown()
func (m *ListOperationsRequest) XXX_Merge(src proto.Message)
func (m *ListOperationsRequest) XXX_Size() int
func (m *ListOperationsRequest) XXX_Unmarshal(b []byte) error
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations].
func (*ListOperationsResponse) Descriptor() ([]byte, []int)
func (m *ListOperationsResponse) GetNextPageToken() string
func (m *ListOperationsResponse) GetOperations() []*Operation
func (*ListOperationsResponse) ProtoMessage()
func (m *ListOperationsResponse) Reset()
func (m *ListOperationsResponse) String() string
func (m *ListOperationsResponse) XXX_DiscardUnknown()
func (m *ListOperationsResponse) XXX_Merge(src proto.Message)
func (m *ListOperationsResponse) XXX_Size() int
func (m *ListOperationsResponse) XXX_Unmarshal(b []byte) error
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 have the format of `operations/some/unique/name`. 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 *any.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` is set. // // Types that are valid to be assigned to Result: // *Operation_Error // *Operation_Response Result isOperation_Result `protobuf_oneof:"result"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
This resource represents a long-running operation that is the result of a network API call.
XXX_OneofWrappers is for the internal use of the proto package.
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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A message representing the message types used by a long-running operation.
Example:
rpc LongRunningRecognize(LongRunningRecognizeRequest) returns (google.longrunning.Operation) { option (google.longrunning.operation_info) = { response_type: "LongRunningRecognizeResponse" metadata_type: "LongRunningRecognizeMetadata" }; }
func (*OperationInfo) Descriptor() ([]byte, []int)
func (m *OperationInfo) GetMetadataType() string
func (m *OperationInfo) GetResponseType() string
func (*OperationInfo) ProtoMessage()
func (m *OperationInfo) Reset()
func (m *OperationInfo) String() string
func (m *OperationInfo) XXX_DiscardUnknown()
func (m *OperationInfo) XXX_Merge(src proto.Message)
func (m *OperationInfo) XXX_Size() int
func (m *OperationInfo) XXX_Unmarshal(b []byte) error
type Operation_Response struct { Response *any.Any `protobuf:"bytes,5,opt,name=response,proto3,oneof"` }
type OperationsClient interface { // Lists operations that match the specified filter in the request. If the // server doesn't support this method, it returns `UNIMPLEMENTED`. // // NOTE: the `name` binding below allows API services to override the binding // to use different resource name schemes, such as `users/*/operations`. 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) (*empty.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) (*empty.Empty, error) // Waits for the specified long-running operation until it 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(cc *grpc.ClientConn) OperationsClient
type OperationsServer interface { // Lists operations that match the specified filter in the request. If the // server doesn't support this method, it returns `UNIMPLEMENTED`. // // NOTE: the `name` binding below allows API services to override the binding // to use different resource name schemes, such as `users/*/operations`. 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) (*empty.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) (*empty.Empty, error) // Waits for the specified long-running operation until it 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 Status struct { // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // A developer-facing error message, which should be in English. Any // user-facing error message should be localized and sent in the // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // A list of messages that carry the error details. There is a common set of // message types for APIs to use. Details []*any.Any `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). The error model is designed to be:
- Simple to use and understand for most users - Flexible enough to meet unexpected needs
# Overview
The `Status` message contains three pieces of data: error code, error message, and error details. The error code should be an enum value of [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The error message should be a developer-facing English message that helps developers *understand* and *resolve* the error. If a localized user-facing error message is needed, put the localized message in the error details or localize it in the client. The optional error details may contain arbitrary information about the error. There is a predefined set of error detail types in the package `google.rpc` that can be used for common error conditions.
# Language mapping
The `Status` message is the logical representation of the error model, but it is not necessarily the actual wire format. When the `Status` message is exposed in different client libraries and different wire protocols, it can be mapped differently. For example, it will likely be mapped to some exceptions in Java, but more likely mapped to some error codes in C.
# Other uses
The error model and the `Status` message can be used in a variety of environments, either with or without APIs, to provide a consistent developer experience across different environments.
Example uses of this error model include:
- Partial errors. If a service needs to return partial errors to the client,
it may embed the `Status` in the normal response to indicate the partial errors.
- Workflow errors. A typical workflow has multiple steps. Each step may
have a `Status` message for error reporting.
- Batch operations. If a client uses batch request and batch response, the
`Status` message should be used directly inside batch response, one for each error sub-response.
- Asynchronous operations. If an API call embeds asynchronous operation
results in its response, the status of those operations should be represented directly using the `Status` message.
- Logging. If some API errors are stored in logs, the message `Status` could
be used directly after any stripping needed for security/privacy reasons.
type UnimplementedOperationsServer struct { }
UnimplementedOperationsServer can be embedded to have forward compatible implementations.
func (*UnimplementedOperationsServer) CancelOperation(ctx context.Context, req *CancelOperationRequest) (*empty.Empty, error)
func (*UnimplementedOperationsServer) DeleteOperation(ctx context.Context, req *DeleteOperationRequest) (*empty.Empty, error)
func (*UnimplementedOperationsServer) GetOperation(ctx context.Context, req *GetOperationRequest) (*Operation, error)
func (*UnimplementedOperationsServer) ListOperations(ctx context.Context, req *ListOperationsRequest) (*ListOperationsResponse, error)
func (*UnimplementedOperationsServer) WaitOperation(ctx context.Context, req *WaitOperationRequest) (*Operation, error)
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 *duration.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The request message for [Operations.WaitOperation][google.longrunning.Operations.WaitOperation].
func (*WaitOperationRequest) Descriptor() ([]byte, []int)
func (m *WaitOperationRequest) GetName() string
func (m *WaitOperationRequest) GetTimeout() *duration.Duration
func (*WaitOperationRequest) ProtoMessage()
func (m *WaitOperationRequest) Reset()
func (m *WaitOperationRequest) String() string
func (m *WaitOperationRequest) XXX_DiscardUnknown()
func (m *WaitOperationRequest) XXX_Merge(src proto.Message)
func (m *WaitOperationRequest) XXX_Size() int
func (m *WaitOperationRequest) XXX_Unmarshal(b []byte) error
Package longrunning imports 11 packages (graph) and is imported by 3 packages. Updated 2021-01-19. Refresh now. Tools for package owners.