task

package
v0.0.0-...-08046e1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TkExpireTransaction expires a transaction
	TkExpireTransaction mint.TkName = "ExpireTransaction"
)
View Source
const (
	// TkPropagateBalance propagates an operation
	TkPropagateBalance mint.TkName = "PropagateBalance"
)
View Source
const (
	// TkPropagateCancellation propagates a transaction cancellation.
	TkPropagateCancellation mint.TkName = "PropagateCancellation"
)
View Source
const (
	// TkPropagateOffer propagates an operation
	TkPropagateOffer mint.TkName = "PropagateOffer"
)
View Source
const (
	// TkPropagateOperation propagates an operation
	TkPropagateOperation mint.TkName = "PropagateOperation"
)
View Source
const (
	// TkPropagateSettlement propagates a transaction settlement.
	TkPropagateSettlement mint.TkName = "PropagateSettlement"
)

Variables

This section is empty.

Functions

func NewExpireTransaction

func NewExpireTransaction(
	ctx context.Context,
	created time.Time,
	subject string,
) async.Task

NewExpireTransaction constructs and initializes the task.

func NewPropagateBalance

func NewPropagateBalance(
	ctx context.Context,
	created time.Time,
	subject string,
) async.Task

NewPropagateBalance constructs and initializes the task.

func NewPropagateCancellation

func NewPropagateCancellation(
	ctx context.Context,
	created time.Time,
	subject string,
) async.Task

NewPropagateCancellation constructs and initializes the task.

func NewPropagateOffer

func NewPropagateOffer(
	ctx context.Context,
	created time.Time,
	subject string,
) async.Task

NewPropagateOffer constructs and initializes the task.

func NewPropagateOperation

func NewPropagateOperation(
	ctx context.Context,
	created time.Time,
	subject string,
) async.Task

NewPropagateOperation constructs and initializes the task.

func NewPropagateSettlement

func NewPropagateSettlement(
	ctx context.Context,
	created time.Time,
	subject string,
) async.Task

NewPropagateSettlement constructs and initializes the task.

Types

type ExpireTransaction

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

ExpireTransaction is in charge of attempting to cancel the transcation (if possible) mint.TransactionExpiryMs after creation.

func (*ExpireTransaction) Created

func (t *ExpireTransaction) Created() time.Time

Created returns the task creation time.

func (*ExpireTransaction) DeadlineForRetry

func (t *ExpireTransaction) DeadlineForRetry(
	retry uint,
) time.Time

DeadlineForRetry returns the deadline for the provided retry count.

func (*ExpireTransaction) Execute

func (t *ExpireTransaction) Execute(
	ctx context.Context,
) error

Execute idempotently runs the task to completion or errors.

func (*ExpireTransaction) MaxRetries

func (t *ExpireTransaction) MaxRetries() uint

MaxRetries returns the max retries for the task.

func (*ExpireTransaction) Name

func (t *ExpireTransaction) Name() mint.TkName

Name returns the task name.

func (*ExpireTransaction) Subject

func (t *ExpireTransaction) Subject() string

Subject returns the task subject.

type PropagateBalance

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

PropagateBalance is in charge of propagating the balance to the holder mint if applicable.

func (*PropagateBalance) Created

func (t *PropagateBalance) Created() time.Time

Created returns the task creation time.

func (*PropagateBalance) DeadlineForRetry

func (t *PropagateBalance) DeadlineForRetry(
	retry uint,
) time.Time

DeadlineForRetry returns the deadline for the provided retry count.

func (*PropagateBalance) Execute

func (t *PropagateBalance) Execute(
	ctx context.Context,
) error

Execute idempotently runs the task to completion or errors.

func (*PropagateBalance) MaxRetries

func (t *PropagateBalance) MaxRetries() uint

MaxRetries returns the max retries for the task.

func (*PropagateBalance) Name

func (t *PropagateBalance) Name() mint.TkName

Name returns the task name.

func (*PropagateBalance) Subject

func (t *PropagateBalance) Subject() string

Subject returns the task subject.

type PropagateCancellation

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

PropagateCancellation is in charge of propagating the cancellation of a tranasaction asyncrhonously if synchronous propagation failed.

func (*PropagateCancellation) Created

func (t *PropagateCancellation) Created() time.Time

Created returns the task creation time.

func (*PropagateCancellation) DeadlineForRetry

func (t *PropagateCancellation) DeadlineForRetry(
	retry uint,
) time.Time

DeadlineForRetry returns the deadline for the provided retry count.

func (*PropagateCancellation) Execute

func (t *PropagateCancellation) Execute(
	ctx context.Context,
) error

Execute idempotently runs the task to completion or errors.

func (*PropagateCancellation) MaxRetries

func (t *PropagateCancellation) MaxRetries() uint

MaxRetries returns the max retries for the task.

func (*PropagateCancellation) Name

func (t *PropagateCancellation) Name() mint.TkName

Name returns the task name.

func (*PropagateCancellation) Subject

func (t *PropagateCancellation) Subject() string

Subject returns the task subject.

type PropagateOffer

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

PropagateOffer is in charge of propagating the offer to all required mints (up to one mint since the base asset of an offer must be owned by the offer owner).

func (*PropagateOffer) Created

func (t *PropagateOffer) Created() time.Time

Created returns the task creation time.

func (*PropagateOffer) DeadlineForRetry

func (t *PropagateOffer) DeadlineForRetry(
	retry uint,
) time.Time

DeadlineForRetry returns the deadline for the provided retry count.

func (*PropagateOffer) Execute

func (t *PropagateOffer) Execute(
	ctx context.Context,
) error

Execute idempotently runs the task to completion or errors.

func (*PropagateOffer) MaxRetries

func (t *PropagateOffer) MaxRetries() uint

MaxRetries returns the max retries for the task.

func (*PropagateOffer) Name

func (t *PropagateOffer) Name() mint.TkName

Name returns the task name.

func (*PropagateOffer) Subject

func (t *PropagateOffer) Subject() string

Subject returns the task subject.

type PropagateOperation

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

PropagateOperation is in charge of propagating the operation to all required mints (up to two other mints, the source's and destination's if they are not the same as the operation's owner).

func (*PropagateOperation) Created

func (t *PropagateOperation) Created() time.Time

Created returns the task creation time.

func (*PropagateOperation) DeadlineForRetry

func (t *PropagateOperation) DeadlineForRetry(
	retry uint,
) time.Time

DeadlineForRetry returns the deadline for the provided retry count.

func (*PropagateOperation) Execute

func (t *PropagateOperation) Execute(
	ctx context.Context,
) error

Execute idempotently runs the task to completion or errors.

func (*PropagateOperation) MaxRetries

func (t *PropagateOperation) MaxRetries() uint

MaxRetries returns the max retries for the task.

func (*PropagateOperation) Name

func (t *PropagateOperation) Name() mint.TkName

Name returns the task name.

func (*PropagateOperation) Subject

func (t *PropagateOperation) Subject() string

Subject returns the task subject.

type PropagateSettlement

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

PropagateSettlement is in charge of propagating the settlement of a tranasaction asyncrhonously if synchronous propagation failed.

func (*PropagateSettlement) Created

func (t *PropagateSettlement) Created() time.Time

Created returns the task creation time.

func (*PropagateSettlement) DeadlineForRetry

func (t *PropagateSettlement) DeadlineForRetry(
	retry uint,
) time.Time

DeadlineForRetry returns the deadline for the provided retry count.

func (*PropagateSettlement) Execute

func (t *PropagateSettlement) Execute(
	ctx context.Context,
) error

Execute idempotently runs the task to completion or errors.

func (*PropagateSettlement) MaxRetries

func (t *PropagateSettlement) MaxRetries() uint

MaxRetries returns the max retries for the task.

func (*PropagateSettlement) Name

func (t *PropagateSettlement) Name() mint.TkName

Name returns the task name.

func (*PropagateSettlement) Subject

func (t *PropagateSettlement) Subject() string

Subject returns the task subject.

Jump to

Keyboard shortcuts

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