ops

package
v1.2.3-hotfix-20241010 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

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