Documentation ¶
Overview ¶
Package provider implements the cchain.Provider interface.
Index ¶
- type FetchFunc
- type LatestFunc
- type Provider
- func (p Provider) AttestationsFrom(ctx context.Context, sourceChainID uint64, sourceHeight uint64) ([]xchain.Attestation, error)
- func (p Provider) LatestAttestation(ctx context.Context, sourceChainID uint64) (xchain.Attestation, bool, error)
- func (p Provider) Subscribe(in context.Context, srcChainID uint64, height uint64, workerName string, ...)
- func (p Provider) WindowCompare(ctx context.Context, sourceChainID uint64, height uint64) (int, error)
- type WindowFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FetchFunc ¶ added in v0.1.0
type FetchFunc func(ctx context.Context, chainID uint64, fromHeight uint64, ) ([]xchain.Attestation, error)
FetchFunc abstracts fetching attestations from the consensus chain.
type LatestFunc ¶ added in v0.1.0
LatestFunc abstracts fetching the latest attestation from the consensus chain.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements cchain.Provider.
func NewABCIProvider ¶
func NewABCIProvider(abci rpcclient.ABCIClient, chains map[uint64]string) Provider
func NewProviderForT ¶
func NewProviderForT(_ *testing.T, fetch FetchFunc, latest LatestFunc, window WindowFunc, backoffFunc func(context.Context) (func(), func()), ) Provider
NewProviderForT creates a new provider for testing.
func (Provider) AttestationsFrom ¶
func (Provider) LatestAttestation ¶
Click to show internal directories.
Click to hide internal directories.