Documentation
¶
Overview ¶
Package stdcrpclongrunning serves and calls Google's google.longrunning.Operations service (AIP-151) with connect-go v2, in the shape protoc-gen-connect-go generates for other services. buf generates only from a module's own protobuf files, and this service is Google's, defined in google/longrunning/operations.proto; its messages come from longrunningpb. The method descriptors carry that file's google.api.http annotations, so a REST transcoder such as Vanguard serves the service like any other.
Index ¶
- Constants
- func RegisterOperationsHandler(server *connect.Server, svc OperationsHandler)
- type OperationsClient
- type OperationsHandler
- type UnimplementedOperationsHandler
- func (UnimplementedOperationsHandler) CancelOperation(context.Context, *longrunningpb.CancelOperationRequest) (*emptypb.Empty, error)
- func (UnimplementedOperationsHandler) DeleteOperation(context.Context, *longrunningpb.DeleteOperationRequest) (*emptypb.Empty, error)
- func (UnimplementedOperationsHandler) GetOperation(context.Context, *longrunningpb.GetOperationRequest) (*longrunningpb.Operation, error)
- func (UnimplementedOperationsHandler) ListOperations(context.Context, *longrunningpb.ListOperationsRequest) (*longrunningpb.ListOperationsResponse, error)
- func (UnimplementedOperationsHandler) WaitOperation(context.Context, *longrunningpb.WaitOperationRequest) (*longrunningpb.Operation, error)
Constants ¶
const ( OperationsListOperationsProcedure = "/google.longrunning.Operations/ListOperations" OperationsGetOperationProcedure = "/google.longrunning.Operations/GetOperation" OperationsDeleteOperationProcedure = "/google.longrunning.Operations/DeleteOperation" OperationsCancelOperationProcedure = "/google.longrunning.Operations/CancelOperation" OperationsWaitOperationProcedure = "/google.longrunning.Operations/WaitOperation" )
The procedure names of the Operations service's RPCs.
const OperationsServiceName = "google.longrunning.Operations"
OperationsServiceName is the fully-qualified name of the Operations service.
Variables ¶
This section is empty.
Functions ¶
func RegisterOperationsHandler ¶
func RegisterOperationsHandler(server *connect.Server, svc OperationsHandler)
RegisterOperationsHandler registers svc as the Operations implementation on server.
Types ¶
type OperationsClient ¶
type OperationsClient = OperationsHandler
OperationsClient is a client for the Operations service, which has the methods of OperationsHandler.
func NewOperationsClient ¶
func NewOperationsClient(client *connect.Client) OperationsClient
NewOperationsClient constructs a client for the Operations service.
type OperationsHandler ¶
type OperationsHandler interface {
ListOperations(
ctx context.Context, req *longrunningpb.ListOperationsRequest,
) (*longrunningpb.ListOperationsResponse, error)
GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest) (*longrunningpb.Operation, error)
DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest) (*emptypb.Empty, error)
CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest) (*emptypb.Empty, error)
WaitOperation(ctx context.Context, req *longrunningpb.WaitOperationRequest) (*longrunningpb.Operation, error)
}
OperationsHandler is an implementation of the Operations service. Embed UnimplementedOperationsHandler for the methods a server does not support, which then fail with UNIMPLEMENTED, as operations.proto allows for every method but GetOperation.
type UnimplementedOperationsHandler ¶
type UnimplementedOperationsHandler struct{}
UnimplementedOperationsHandler returns UNIMPLEMENTED from every method.
func (UnimplementedOperationsHandler) CancelOperation ¶
func (UnimplementedOperationsHandler) CancelOperation( context.Context, *longrunningpb.CancelOperationRequest, ) (*emptypb.Empty, error)
CancelOperation implements OperationsHandler.
func (UnimplementedOperationsHandler) DeleteOperation ¶
func (UnimplementedOperationsHandler) DeleteOperation( context.Context, *longrunningpb.DeleteOperationRequest, ) (*emptypb.Empty, error)
DeleteOperation implements OperationsHandler.
func (UnimplementedOperationsHandler) GetOperation ¶
func (UnimplementedOperationsHandler) GetOperation( context.Context, *longrunningpb.GetOperationRequest, ) (*longrunningpb.Operation, error)
GetOperation implements OperationsHandler.
func (UnimplementedOperationsHandler) ListOperations ¶
func (UnimplementedOperationsHandler) ListOperations( context.Context, *longrunningpb.ListOperationsRequest, ) (*longrunningpb.ListOperationsResponse, error)
ListOperations implements OperationsHandler.
func (UnimplementedOperationsHandler) WaitOperation ¶
func (UnimplementedOperationsHandler) WaitOperation( context.Context, *longrunningpb.WaitOperationRequest, ) (*longrunningpb.Operation, error)
WaitOperation implements OperationsHandler.