Documentation
¶
Index ¶
- type ChainIDFromIndex
- type ChainIndexFromID
- type DependencySet
- type DependencySetSource
- type JsonDependencySetLoader
- type StaticConfigDependency
- type StaticConfigDependencySet
- func (ds *StaticConfigDependencySet) CanExecuteAt(chainID eth.ChainID, execTimestamp uint64) (bool, error)
- func (ds *StaticConfigDependencySet) CanInitiateAt(chainID eth.ChainID, initTimestamp uint64) (bool, error)
- func (ds *StaticConfigDependencySet) ChainIDFromIndex(index types.ChainIndex) (eth.ChainID, error)
- func (ds *StaticConfigDependencySet) ChainIndexFromID(id eth.ChainID) (types.ChainIndex, error)
- func (ds *StaticConfigDependencySet) Chains() []eth.ChainID
- func (ds *StaticConfigDependencySet) Dependencies() map[eth.ChainID]*StaticConfigDependency
- func (ds *StaticConfigDependencySet) HasChain(chainID eth.ChainID) bool
- func (ds *StaticConfigDependencySet) LoadDependencySet(ctx context.Context) (DependencySet, error)
- func (ds *StaticConfigDependencySet) MarshalJSON() ([]byte, error)
- func (ds *StaticConfigDependencySet) MarshalTOML() ([]byte, error)
- func (ds *StaticConfigDependencySet) MessageExpiryWindow() uint64
- func (ds *StaticConfigDependencySet) UnmarshalJSON(data []byte) error
- func (ds *StaticConfigDependencySet) UnmarshalTOML(v interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainIDFromIndex ¶ added in v1.11.0
type ChainIDFromIndex interface { // ChainIDFromIndex converts a ChainIndex to a ChainID. ChainIDFromIndex(index types.ChainIndex) (eth.ChainID, error) }
type ChainIndexFromID ¶ added in v1.11.0
type ChainIndexFromID interface { // ChainIndexFromID converts a ChainID to a ChainIndex. ChainIndexFromID(id eth.ChainID) (types.ChainIndex, error) }
type DependencySet ¶
type DependencySet interface { // CanExecuteAt determines if an executing message is valid at all. // I.e. if the chain may be executing messages at the given timestamp. // This may return an error if the query temporarily cannot be answered. // E.g. if the DependencySet is syncing new changes. CanExecuteAt(chainID eth.ChainID, execTimestamp uint64) (bool, error) // CanInitiateAt determines if an initiating message is valid to pull in. // I.e. if the message of the given chain is readable or not. // This may return an error if the query temporarily cannot be answered. // E.g. if the DependencySet is syncing new changes. CanInitiateAt(chainID eth.ChainID, initTimestamp uint64) (bool, error) // Chains returns the list of chains that are part of the dependency set. Chains() []eth.ChainID // HasChain determines if a chain is being tracked for interop purposes. // See CanExecuteAt and CanInitiateAt to check if a chain may message at a given time. HasChain(chainID eth.ChainID) bool ChainIndexFromID(id eth.ChainID) (types.ChainIndex, error) // MessageExpiryWindow returns the message expiry window to use for this dependency set. MessageExpiryWindow() uint64 ChainIndexFromID ChainIDFromIndex }
DependencySet is an initialized dependency set, ready to answer queries of what is and what is not part of the dependency set.
type DependencySetSource ¶
type DependencySetSource interface {
LoadDependencySet(ctx context.Context) (DependencySet, error)
}
type JsonDependencySetLoader ¶
type JsonDependencySetLoader struct {
Path string
}
JsonDependencySetLoader loads a dependency set from a file-path.
func (*JsonDependencySetLoader) LoadDependencySet ¶
func (j *JsonDependencySetLoader) LoadDependencySet(ctx context.Context) (DependencySet, error)
type StaticConfigDependency ¶
type StaticConfigDependency struct { // ChainIndex is the unique short identifier of this chain. ChainIndex types.ChainIndex `json:"chainIndex" toml:"chain_index"` // ActivationTime is when the chain becomes part of the dependency set. // This is the minimum timestamp of the inclusion of an executing message. ActivationTime uint64 `json:"activationTime" toml:"activation_time"` // HistoryMinTime is what the lower bound of data is to store. // This is the minimum timestamp of an initiating message to be accessible to others. // This is set to 0 when all data since genesis is executable. HistoryMinTime uint64 `json:"historyMinTime" toml:"history_min_time"` }
type StaticConfigDependencySet ¶
type StaticConfigDependencySet struct {
// contains filtered or unexported fields
}
StaticConfigDependencySet statically declares a DependencySet. It can be used as a DependencySetSource itself, by simply returning the itself when loading the set.
func NewStaticConfigDependencySet ¶
func NewStaticConfigDependencySet(dependencies map[eth.ChainID]*StaticConfigDependency) (*StaticConfigDependencySet, error)
func NewStaticConfigDependencySetWithMessageExpiryOverride ¶ added in v1.12.0
func NewStaticConfigDependencySetWithMessageExpiryOverride(dependencies map[eth.ChainID]*StaticConfigDependency, overrideMessageExpiryWindow uint64) (*StaticConfigDependencySet, error)
NewStaticConfigDependencySetWithMessageExpiryOverride creates a new StaticConfigDependencySet with a message expiry window override. To be used only for testing.
func (*StaticConfigDependencySet) CanExecuteAt ¶
func (*StaticConfigDependencySet) CanInitiateAt ¶
func (*StaticConfigDependencySet) ChainIDFromIndex ¶
func (ds *StaticConfigDependencySet) ChainIDFromIndex(index types.ChainIndex) (eth.ChainID, error)
func (*StaticConfigDependencySet) ChainIndexFromID ¶
func (ds *StaticConfigDependencySet) ChainIndexFromID(id eth.ChainID) (types.ChainIndex, error)
func (*StaticConfigDependencySet) Chains ¶
func (ds *StaticConfigDependencySet) Chains() []eth.ChainID
func (*StaticConfigDependencySet) Dependencies ¶ added in v1.13.3
func (ds *StaticConfigDependencySet) Dependencies() map[eth.ChainID]*StaticConfigDependency
Dependencies returns a deep copy of the dependencies map
func (*StaticConfigDependencySet) HasChain ¶
func (ds *StaticConfigDependencySet) HasChain(chainID eth.ChainID) bool
func (*StaticConfigDependencySet) LoadDependencySet ¶
func (ds *StaticConfigDependencySet) LoadDependencySet(ctx context.Context) (DependencySet, error)
func (*StaticConfigDependencySet) MarshalJSON ¶
func (ds *StaticConfigDependencySet) MarshalJSON() ([]byte, error)
func (*StaticConfigDependencySet) MarshalTOML ¶ added in v1.13.3
func (ds *StaticConfigDependencySet) MarshalTOML() ([]byte, error)
func (*StaticConfigDependencySet) MessageExpiryWindow ¶ added in v1.12.0
func (ds *StaticConfigDependencySet) MessageExpiryWindow() uint64
func (*StaticConfigDependencySet) UnmarshalJSON ¶
func (ds *StaticConfigDependencySet) UnmarshalJSON(data []byte) error
func (*StaticConfigDependencySet) UnmarshalTOML ¶ added in v1.13.3
func (ds *StaticConfigDependencySet) UnmarshalTOML(v interface{}) error
Click to show internal directories.
Click to hide internal directories.