Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterOperationServiceServer(s grpc.ServiceRegistrar, srv OperationServiceServer)
- type CancelOperationRequest
- func (*CancelOperationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CancelOperationRequest) GetOperationId() string
- func (*CancelOperationRequest) ProtoMessage()
- func (x *CancelOperationRequest) ProtoReflect() protoreflect.Message
- func (x *CancelOperationRequest) Reset()
- func (m *CancelOperationRequest) SetOperationId(v string)
- func (x *CancelOperationRequest) String() string
- type GetOperationRequest
- func (*GetOperationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetOperationRequest) GetOperationId() string
- func (*GetOperationRequest) ProtoMessage()
- func (x *GetOperationRequest) ProtoReflect() protoreflect.Message
- func (x *GetOperationRequest) Reset()
- func (m *GetOperationRequest) SetOperationId(v string)
- func (x *GetOperationRequest) String() string
- type Operation
- func (*Operation) Descriptor() ([]byte, []int)deprecated
- func (x *Operation) GetCreatedAt() *timestamppb.Timestamp
- func (x *Operation) GetCreatedBy() string
- func (x *Operation) GetDescription() string
- func (x *Operation) GetDone() bool
- func (x *Operation) GetError() *status.Status
- func (x *Operation) GetId() string
- func (x *Operation) GetMetadata() *anypb.Any
- func (x *Operation) GetModifiedAt() *timestamppb.Timestamp
- 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 (m *Operation) SetCreatedAt(v *timestamppb.Timestamp)
- func (m *Operation) SetCreatedBy(v string)
- func (m *Operation) SetDescription(v string)
- func (m *Operation) SetDone(v bool)
- func (m *Operation) SetError(v *status.Status)
- func (m *Operation) SetId(v string)
- func (m *Operation) SetMetadata(v *anypb.Any)
- func (m *Operation) SetModifiedAt(v *timestamppb.Timestamp)
- func (m *Operation) SetResponse(v *anypb.Any)
- func (m *Operation) SetResult(v Operation_Result)
- func (x *Operation) String() string
- type OperationServiceClient
- type OperationServiceServer
- type Operation_Error
- type Operation_Response
- type Operation_Result
- type UnimplementedOperationServiceServer
- type UnsafeOperationServiceServer
Constants ¶
const ( OperationService_Get_FullMethodName = "/yandex.cloud.operation.OperationService/Get" OperationService_Cancel_FullMethodName = "/yandex.cloud.operation.OperationService/Cancel" )
Variables ¶
var File_yandex_cloud_operation_operation_proto protoreflect.FileDescriptor
var File_yandex_cloud_operation_operation_service_proto protoreflect.FileDescriptor
var OperationService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "yandex.cloud.operation.OperationService", HandlerType: (*OperationServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _OperationService_Get_Handler, }, { MethodName: "Cancel", Handler: _OperationService_Cancel_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "yandex/cloud/operation/operation_service.proto", }
OperationService_ServiceDesc is the grpc.ServiceDesc for OperationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOperationServiceServer ¶
func RegisterOperationServiceServer(s grpc.ServiceRegistrar, srv OperationServiceServer)
Types ¶
type CancelOperationRequest ¶
type CancelOperationRequest struct { // ID of the operation to cancel. OperationId string `protobuf:"bytes,1,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` // contains filtered or unexported fields }
func (*CancelOperationRequest) Descriptor
deprecated
func (*CancelOperationRequest) Descriptor() ([]byte, []int)
Deprecated: Use CancelOperationRequest.ProtoReflect.Descriptor instead.
func (*CancelOperationRequest) GetOperationId ¶
func (x *CancelOperationRequest) GetOperationId() 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) SetOperationId ¶
func (m *CancelOperationRequest) SetOperationId(v string)
func (*CancelOperationRequest) String ¶
func (x *CancelOperationRequest) String() string
type GetOperationRequest ¶
type GetOperationRequest struct { // ID of the Operation resource to return. OperationId string `protobuf:"bytes,1,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` // contains filtered or unexported fields }
func (*GetOperationRequest) Descriptor
deprecated
func (*GetOperationRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetOperationRequest.ProtoReflect.Descriptor instead.
func (*GetOperationRequest) GetOperationId ¶
func (x *GetOperationRequest) GetOperationId() 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) SetOperationId ¶
func (m *GetOperationRequest) SetOperationId(v string)
func (*GetOperationRequest) String ¶
func (x *GetOperationRequest) String() string
type Operation ¶
type Operation struct { // ID of the operation. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Description of the operation. 0-256 characters long. Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` // ex: Create VM, Stop VM, Delete Disk, Snapshot Disk, etc // Creation timestamp. CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // ID of the user or service account who initiated the operation. CreatedBy string `protobuf:"bytes,4,opt,name=created_by,json=createdBy,proto3" json:"created_by,omitempty"` // The time when the Operation resource was last modified. ModifiedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=modified_at,json=modifiedAt,proto3" json:"modified_at,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,6,opt,name=done,proto3" json:"done,omitempty"` // Service-specific metadata associated with the operation. // It typically contains the ID of the target resource that the operation is performed on. // Any method that returns a long-running operation should document the metadata type, if any. Metadata *anypb.Any `protobuf:"bytes,7,opt,name=metadata,proto3" json:"metadata,omitempty"` // The operation result. // If `done == false` and there was no failure detected, neither `error` nor `response` is set. // If `done == false` and there was a failure detected, `error` is set. // If `done == true`, exactly one of `error` or `response` is set. // // Types that are assignable to Result: // // *Operation_Error // *Operation_Response Result isOperation_Result `protobuf_oneof:"result"` // contains filtered or unexported fields }
An Operation resource. For more information, see Operation(/docs/api-design-guide/concepts/operation).
func (*Operation) Descriptor
deprecated
func (*Operation) GetCreatedAt ¶
func (x *Operation) GetCreatedAt() *timestamppb.Timestamp
func (*Operation) GetCreatedBy ¶
func (*Operation) GetDescription ¶
func (*Operation) GetMetadata ¶
func (*Operation) GetModifiedAt ¶
func (x *Operation) GetModifiedAt() *timestamppb.Timestamp
func (*Operation) GetResponse ¶
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
func (*Operation) ProtoReflect ¶
func (x *Operation) ProtoReflect() protoreflect.Message
func (*Operation) SetCreatedAt ¶
func (m *Operation) SetCreatedAt(v *timestamppb.Timestamp)
func (*Operation) SetCreatedBy ¶
func (*Operation) SetDescription ¶
func (*Operation) SetMetadata ¶
func (*Operation) SetModifiedAt ¶
func (m *Operation) SetModifiedAt(v *timestamppb.Timestamp)
func (*Operation) SetResponse ¶
func (*Operation) SetResult ¶
func (m *Operation) SetResult(v Operation_Result)
type OperationServiceClient ¶
type OperationServiceClient interface { // Returns the specified Operation resource. Get(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*Operation, error) // Cancels the specified operation. // // Note that currently Object Storage API does not support cancelling operations. Cancel(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*Operation, error) }
OperationServiceClient is the client API for OperationService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
A set of methods for managing operations for asynchronous API requests.
func NewOperationServiceClient ¶
func NewOperationServiceClient(cc grpc.ClientConnInterface) OperationServiceClient
type OperationServiceServer ¶
type OperationServiceServer interface { // Returns the specified Operation resource. Get(context.Context, *GetOperationRequest) (*Operation, error) // Cancels the specified operation. // // Note that currently Object Storage API does not support cancelling operations. Cancel(context.Context, *CancelOperationRequest) (*Operation, error) }
OperationServiceServer is the server API for OperationService service. All implementations should embed UnimplementedOperationServiceServer for forward compatibility.
A set of methods for managing operations for asynchronous API requests.
type Operation_Error ¶
type Operation_Response ¶
type Operation_Response struct { // The normal response of the operation in case of success. // If the original method returns no data on success, such as Delete, // the response is [google.protobuf.Empty]. // If the original method is the standard Create/Update, // the response should be the target resource of the operation. // Any method that returns a long-running operation should document the response type, if any. Response *anypb.Any `protobuf:"bytes,9,opt,name=response,proto3,oneof"` }
type Operation_Result ¶
type Operation_Result = isOperation_Result
type UnimplementedOperationServiceServer ¶
type UnimplementedOperationServiceServer struct{}
UnimplementedOperationServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedOperationServiceServer) Cancel ¶
func (UnimplementedOperationServiceServer) Cancel(context.Context, *CancelOperationRequest) (*Operation, error)
func (UnimplementedOperationServiceServer) Get ¶
func (UnimplementedOperationServiceServer) Get(context.Context, *GetOperationRequest) (*Operation, error)
type UnsafeOperationServiceServer ¶
type UnsafeOperationServiceServer interface {
// contains filtered or unexported methods
}
UnsafeOperationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OperationServiceServer will result in compilation errors.