Documentation ¶
Index ¶
- type Operations
- func (s *Operations) DoneLRO(ctx context.Context, prefix string, metadata proto.Message, ...) (*pb.Operation, error)
- func (s *Operations) GetOperation(ctx context.Context, req *pb.GetOperationRequest) (*pb.Operation, error)
- func (s *Operations) NewLRO(ctx context.Context) (*pb.Operation, error)
- func (s *Operations) RegisterGRPCServices(grpcServer *grpc.Server)
- func (s *Operations) RegisterOperationsPath(path string) func(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func (s *Operations) StartLRO(ctx context.Context, prefix string, metadata proto.Message, ...) (*pb.Operation, error)
- func (o *Operations) Wait(ctx context.Context, opName string, timeout time.Duration) (*longrunningpb.Operation, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operations ¶
type Operations struct { pb.UnimplementedOperationsServer // contains filtered or unexported fields }
func NewOperationsService ¶
func NewOperationsService(storage storage.Storage) *Operations
func (*Operations) GetOperation ¶
func (s *Operations) GetOperation(ctx context.Context, req *pb.GetOperationRequest) (*pb.Operation, 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.
func (*Operations) RegisterGRPCServices ¶
func (s *Operations) RegisterGRPCServices(grpcServer *grpc.Server)
func (*Operations) RegisterOperationsPath ¶
func (s *Operations) RegisterOperationsPath(path string) func(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterOperationsPath will serve the operations REST API at `path`. This is currently a GET handler; `path` should include a parameter {name} which is the operation's name, and an optional parameter {prefix} which includes whatever else the service defines as the per-operation prefix. The value of path / prefix should match whatever the API defines as its operations endpoint, which is often most conveniently determined by looking at the API documentation, or by seeing what paths clients request.