operations

package
v0.0.0-...-2610577 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Operation

type Operation func(context.Context, *longrunning.Operation, chan<- *longrunning.Operation) error

Operation is a single long running operation.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service manages longrunning api operations.

func New

func New(ctx context.Context, logger logger, sqldb *sql.DB) *Service

New returns new service.

func (*Service) CancelOperation

func (s *Service) CancelOperation(ctx context.Context, in *longrunning.CancelOperationRequest) (*empty.Empty, error)

CancelOperation cancels a running operation.

func (*Service) CreateOperation

func (s *Service) CreateOperation(ctx context.Context, metadata *any.Any, operationFunc Operation) (*longrunning.Operation, error)

CreateOperation creates an operation, and runs it.

func (*Service) DeleteOperation

func (s *Service) DeleteOperation(ctx context.Context, in *longrunning.DeleteOperationRequest) (*empty.Empty, error)

DeleteOperation deletes an operation.

func (*Service) GetOperation

GetOperation returns a single operation.

func (*Service) ListOperations

ListOperations returns list of operations.

func (*Service) WaitOperation

WaitOperation waits until operations is done, and then returns an operation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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