Documentation ¶
Overview ¶
Package operations is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterOperationsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterOperationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OperationsClient) error
- func RegisterOperationsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterOperationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OperationsServer) error
- func RegisterOperationsServer(s grpc.ServiceRegistrar, 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 ClientOptions
- 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 GrpcClient
- type ListOperationsRequest
- func (*ListOperationsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListOperationsRequest) GetName() string
- func (x *ListOperationsRequest) GetNextToken() string
- 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) GetNextToken() string
- func (x *ListOperationsResponse) GetOperations() []*types.Operation
- func (*ListOperationsResponse) ProtoMessage()
- func (x *ListOperationsResponse) ProtoReflect() protoreflect.Message
- func (x *ListOperationsResponse) Reset()
- func (x *ListOperationsResponse) String() string
- 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) (*types.Operation, error)
- func (UnimplementedOperationsServer) ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error)
- func (UnimplementedOperationsServer) WaitOperation(context.Context, *WaitOperationRequest) (*types.Operation, error)
- type UnsafeOperationsServer
- type WaitOperationRequest
- func (*WaitOperationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WaitOperationRequest) GetName() string
- func (*WaitOperationRequest) ProtoMessage()
- func (x *WaitOperationRequest) ProtoReflect() protoreflect.Message
- func (x *WaitOperationRequest) Reset()
- func (x *WaitOperationRequest) String() string
Constants ¶
const ( Operations_ListOperations_FullMethodName = "/vortexproto.operations.v1.Operations/ListOperations" Operations_GetOperation_FullMethodName = "/vortexproto.operations.v1.Operations/GetOperation" Operations_DeleteOperation_FullMethodName = "/vortexproto.operations.v1.Operations/DeleteOperation" Operations_CancelOperation_FullMethodName = "/vortexproto.operations.v1.Operations/CancelOperation" Operations_WaitOperation_FullMethodName = "/vortexproto.operations.v1.Operations/WaitOperation" )
Variables ¶
var File_operations_v1_operations_proto protoreflect.FileDescriptor
var Operations_ServiceDesc = grpc.ServiceDesc{ ServiceName: "vortexproto.operations.v1.Operations", HandlerType: (*OperationsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListOperations", Handler: _Operations_ListOperations_Handler, }, { MethodName: "GetOperation", Handler: _Operations_GetOperation_Handler, }, { MethodName: "DeleteOperation", Handler: _Operations_DeleteOperation_Handler, }, { MethodName: "CancelOperation", Handler: _Operations_CancelOperation_Handler, }, { MethodName: "WaitOperation", Handler: _Operations_WaitOperation_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "operations/v1/operations.proto", }
Operations_ServiceDesc is the grpc.ServiceDesc for Operations service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOperationsHandler ¶
func RegisterOperationsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterOperationsHandler registers the http handlers for service Operations to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterOperationsHandlerClient ¶
func RegisterOperationsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OperationsClient) error
RegisterOperationsHandlerClient registers the http handlers for service Operations to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OperationsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OperationsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "OperationsClient" to call the correct interceptors.
func RegisterOperationsHandlerFromEndpoint ¶
func RegisterOperationsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterOperationsHandlerFromEndpoint is same as RegisterOperationsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterOperationsHandlerServer ¶
func RegisterOperationsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OperationsServer) error
RegisterOperationsHandlerServer registers the http handlers for service Operations to "mux". UnaryRPC :call OperationsServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterOperationsHandlerFromEndpoint instead.
func RegisterOperationsServer ¶
func RegisterOperationsServer(s grpc.ServiceRegistrar, srv OperationsServer)
Types ¶
type CancelOperationRequest ¶
type CancelOperationRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Request message for the CancelOperation rpc.
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 ClientOptions ¶
type ClientOptions struct {
Conn *conn.GrpcClientConn
}
ClientOptions represents the optional options to NewClient.
type DeleteOperationRequest ¶
type DeleteOperationRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Request message for the DeleteOperation rpc.
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 { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Request message for the GetOperation rpc.
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 GrpcClient ¶
type GrpcClient struct { OperationsClient // contains filtered or unexported fields }
func NewClient ¶
func NewClient(ctx context.Context, opts ...*ClientOptions) (*GrpcClient, error)
NewClient returns a client connection to the 'operations' service.
func (*GrpcClient) Close ¶
func (c *GrpcClient) Close()
type ListOperationsRequest ¶
type ListOperationsRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` NextToken string `protobuf:"bytes,2,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` // contains filtered or unexported fields }
Request message for the ListOperations rpc.
func (*ListOperationsRequest) Descriptor
deprecated
func (*ListOperationsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListOperationsRequest.ProtoReflect.Descriptor instead.
func (*ListOperationsRequest) GetName ¶
func (x *ListOperationsRequest) GetName() string
func (*ListOperationsRequest) GetNextToken ¶
func (x *ListOperationsRequest) GetNextToken() string
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 { Operations []*types.Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"` NextToken string `protobuf:"bytes,2,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"` // contains filtered or unexported fields }
Response message for the ListOperations rpc.
func (*ListOperationsResponse) Descriptor
deprecated
func (*ListOperationsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListOperationsResponse.ProtoReflect.Descriptor instead.
func (*ListOperationsResponse) GetNextToken ¶
func (x *ListOperationsResponse) GetNextToken() string
func (*ListOperationsResponse) GetOperations ¶
func (x *ListOperationsResponse) GetOperations() []*types.Operation
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 OperationsClient ¶
type OperationsClient interface { // List long-running operations. ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) // Get a long-running operation. GetOperation(ctx context.Context, in *GetOperationRequest, opts ...grpc.CallOption) (*types.Operation, error) // Delete a long-running operation. DeleteOperation(ctx context.Context, in *DeleteOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Cancel a long-running operation. CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Wait on a long-running operation. WaitOperation(ctx context.Context, in *WaitOperationRequest, opts ...grpc.CallOption) (*types.Operation, error) }
OperationsClient is the client API for Operations 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.
Operations service definition.
func NewOperationsClient ¶
func NewOperationsClient(cc grpc.ClientConnInterface) OperationsClient
type OperationsServer ¶
type OperationsServer interface { // List long-running operations. ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) // Get a long-running operation. GetOperation(context.Context, *GetOperationRequest) (*types.Operation, error) // Delete a long-running operation. DeleteOperation(context.Context, *DeleteOperationRequest) (*emptypb.Empty, error) // Cancel a long-running operation. CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error) // Wait on a long-running operation. WaitOperation(context.Context, *WaitOperationRequest) (*types.Operation, error) // contains filtered or unexported methods }
OperationsServer is the server API for Operations service. All implementations must embed UnimplementedOperationsServer for forward compatibility
Operations service definition.
type UnimplementedOperationsServer ¶
type UnimplementedOperationsServer struct { }
UnimplementedOperationsServer must 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) (*types.Operation, error)
func (UnimplementedOperationsServer) ListOperations ¶
func (UnimplementedOperationsServer) ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error)
func (UnimplementedOperationsServer) WaitOperation ¶
func (UnimplementedOperationsServer) WaitOperation(context.Context, *WaitOperationRequest) (*types.Operation, error)
type UnsafeOperationsServer ¶
type UnsafeOperationsServer interface {
// contains filtered or unexported methods
}
UnsafeOperationsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OperationsServer will result in compilation errors.
type WaitOperationRequest ¶
type WaitOperationRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Request message for the WaitOperation rpc.
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) 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