operations

package
v0.0.0-...-bd60449 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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) DoneLRO

func (s *Operations) DoneLRO(ctx context.Context, prefix string, metadata proto.Message, result proto.Message) (*pb.Operation, error)

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) NewLRO

func (s *Operations) NewLRO(ctx context.Context) (*pb.Operation, error)

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.

func (*Operations) StartLRO

func (s *Operations) StartLRO(ctx context.Context, prefix string, metadata proto.Message, callback func() (proto.Message, error)) (*pb.Operation, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL