Documentation ¶
Index ¶
- type ChainAPI
- type ChangedDeals
- type DealStateChange
- type DiffDealStatesFunc
- type DiffFunc
- type DiffStateFunc
- type DiffStorageMarketStateFunc
- type StatePredicates
- func (sp *StatePredicates) DealStateChangedForIDs(dealIds []abi.DealID) DiffDealStatesFunc
- func (sp *StatePredicates) OnActorStateChanged(addr address.Address, diffStateFunc DiffStateFunc) DiffFunc
- func (sp *StatePredicates) OnDealStateChanged(diffDealStates DiffDealStatesFunc) DiffStorageMarketStateFunc
- func (sp *StatePredicates) OnStorageMarketActorChanged(diffStorageMarketState DiffStorageMarketStateFunc) DiffFunc
- type UserData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainAPI ¶
type ChainAPI interface { apibstore.ChainIO StateGetActor(ctx context.Context, actor address.Address, tsk types.TipSetKey) (*types.Actor, error) }
ChainAPI abstracts out calls made by this class to external APIs
type ChangedDeals ¶
type ChangedDeals map[abi.DealID]DealStateChange
ChangedDeals is a set of changes to deal state
type DealStateChange ¶
DealStateChange is a change in deal state from -> to
type DiffDealStatesFunc ¶
type DiffFunc ¶
type DiffFunc func(ctx context.Context, oldState, newState *types.TipSet) (changed bool, user UserData, err error)
DiffFunc check if there's a change form oldState to newState, and returns - changed: was there a change - user: user-defined data representing the state change - err
type DiffStateFunc ¶
type StatePredicates ¶
type StatePredicates struct {
// contains filtered or unexported fields
}
StatePredicates has common predicates for responding to state changes
func NewStatePredicates ¶
func NewStatePredicates(api ChainAPI) *StatePredicates
func (*StatePredicates) DealStateChangedForIDs ¶
func (sp *StatePredicates) DealStateChangedForIDs(dealIds []abi.DealID) DiffDealStatesFunc
DealStateChangedForIDs detects changes in the deal state AMT for the given deal IDs
func (*StatePredicates) OnActorStateChanged ¶
func (sp *StatePredicates) OnActorStateChanged(addr address.Address, diffStateFunc DiffStateFunc) DiffFunc
OnActorStateChanged calls diffStateFunc when the state changes for the given actor
func (*StatePredicates) OnDealStateChanged ¶
func (sp *StatePredicates) OnDealStateChanged(diffDealStates DiffDealStatesFunc) DiffStorageMarketStateFunc
OnDealStateChanged calls diffDealStates when the market state changes
func (*StatePredicates) OnStorageMarketActorChanged ¶
func (sp *StatePredicates) OnStorageMarketActorChanged(diffStorageMarketState DiffStorageMarketStateFunc) DiffFunc
OnStorageMarketActorChanged calls diffStorageMarketState when the state changes for the market actor