operation

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 12 Imported by: 9 modules, 9 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultPollInterval = time.Second

Variables

This section is empty.

Functions

func UnmarshalAny

func UnmarshalAny(msg *anypb.Any) (proto.Message, error)

Copy from bb.yandex-team.ru/cloud/cloud-go/pkg/protoutil/any.go

Types

type Operation

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

func New

func New(client Client, proto *Proto) *Operation

func (*Operation) Cancel

func (o *Operation) Cancel(ctx context.Context, opts ...grpc.CallOption) error

Cancel requests operation cancel. On success operation state is updated. Returns error if cancel failed.

func (*Operation) Client

func (o *Operation) Client() Client

func (*Operation) CreatedAt

func (o *Operation) CreatedAt() time.Time

func (*Operation) CreatedBy

func (o *Operation) CreatedBy() string

func (*Operation) Description

func (o *Operation) Description() string

func (*Operation) Done

func (o *Operation) Done() bool

func (*Operation) Error

func (o *Operation) Error() error

func (*Operation) ErrorStatus

func (o *Operation) ErrorStatus() *status.Status

func (*Operation) Failed

func (o *Operation) Failed() bool

func (*Operation) Id

func (o *Operation) Id() string

func (*Operation) Metadata

func (o *Operation) Metadata() (proto.Message, error)

func (*Operation) Ok

func (o *Operation) Ok() bool

func (*Operation) Poll

func (o *Operation) Poll(ctx context.Context, opts ...grpc.CallOption) error

Poll gets new state of operation from operation client. On success the operation state is updated. Returns error if update request failed.

func (*Operation) Proto

func (o *Operation) Proto() *Proto

func (*Operation) RawMetadata

func (o *Operation) RawMetadata() *anypb.Any

func (*Operation) RawResponse

func (o *Operation) RawResponse() *anypb.Any

func (*Operation) Response

func (o *Operation) Response() (proto.Message, error)

func (*Operation) Wait

func (o *Operation) Wait(ctx context.Context, opts ...grpc.CallOption) error

func (*Operation) WaitInterval

func (o *Operation) WaitInterval(ctx context.Context, pollInterval time.Duration, opts ...grpc.CallOption) error

type Proto

type Proto = operation.Operation

Jump to

Keyboard shortcuts

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