ops

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Op

type Op struct {
	Impl       iops.IOpInternal
	ErrorC     chan error
	WaitedOnce atomic.Bool
	Worker     iworker.IOpWorker
	Err        error
	Result     any
	CreateTime time.Time
	StartTime  time.Time
	EndTime    time.Time
	DoneCB     OpDoneCB
	Observers  []iops.Observer
}

func NewOp

func NewOp(impl iops.IOpInternal, w iworker.IOpWorker) *Op

func (*Op) AddObserver

func (op *Op) AddObserver(o iops.Observer)

func (*Op) Execute

func (op *Op) Execute() error

func (*Op) GetCreateTime

func (op *Op) GetCreateTime() time.Time

func (*Op) GetEndTime

func (op *Op) GetEndTime() time.Time

func (*Op) GetError

func (op *Op) GetError() error

func (*Op) GetExecutTime

func (op *Op) GetExecutTime() int64

func (*Op) GetStartTime

func (op *Op) GetStartTime() time.Time

func (*Op) OnExec

func (op *Op) OnExec(ctx context.Context) error

func (*Op) PostExecute

func (op *Op) PostExecute() error

func (*Op) PreExecute

func (op *Op) PreExecute() error

func (*Op) Push

func (op *Op) Push() error

func (*Op) SetError

func (op *Op) SetError(err error)

func (*Op) WaitDone

func (op *Op) WaitDone(ctx context.Context) error

func (*Op) Waitable

func (op *Op) Waitable() bool

type OpDoneCB

type OpDoneCB = func(iops.IOp)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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