Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decidable ¶
type Decidable interface {
// ID returns the unique ID of this element
ID() []byte
// Accept accepts this element and changes its status to Accepted
Accept() error
// Reject rejects this element and changes its status to Rejected
Reject() error
// Status returns the current status
Status() Status
}
Decidable represents an element that can be decided
type Status ¶
type Status uint32
Status represents the status of a decision
func (Status) IsAccepted ¶ added in v0.1.1
IsAccepted returns true if the status is Accepted
func (Status) IsProcessing ¶ added in v0.1.1
IsProcessing returns true if the status is Processing
func (Status) IsRejected ¶ added in v0.1.1
IsRejected returns true if the status is Rejected
type TestDecidable ¶ added in v0.1.1
TestDecidable is a test implementation of Decidable
func (*TestDecidable) Accept ¶ added in v0.1.1
func (d *TestDecidable) Accept() error
Accept implements Decidable
func (*TestDecidable) ID ¶ added in v0.1.1
func (d *TestDecidable) ID() []byte
ID implements Decidable
func (*TestDecidable) Reject ¶ added in v0.1.1
func (d *TestDecidable) Reject() error
Reject implements Decidable
func (*TestDecidable) Status ¶ added in v0.1.1
func (d *TestDecidable) Status() Status
Status implements Decidable
Click to show internal directories.
Click to hide internal directories.