Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultBatchSize = 10
View Source
const DefaultQueryBatchSize = 10
View Source
const ErrorSendingGraphileRequest = `` /* 200-byte string literal not displayed */
View Source
const ErrorSendingRequest = `` /* 200-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanSynchronizer ¶ added in v1.3.0
type CleanSynchronizer struct { SynchronizerRepository *repository.SynchronizerRepository Period time.Duration }
func NewCleanSynchronizer ¶ added in v1.3.0
func NewCleanSynchronizer( SynchronizerRepository *repository.SynchronizerRepository, period *time.Duration, ) *CleanSynchronizer
func (CleanSynchronizer) Start ¶ added in v1.3.0
func (x CleanSynchronizer) Start(ctx context.Context, ready chan<- struct{}) error
func (CleanSynchronizer) String ¶ added in v1.3.0
func (x CleanSynchronizer) String() string
type GraphileFetcher ¶ added in v1.3.0
type GraphileFetcher struct { CursorAfter string CursorInputAfter string CursorReportAfter string BatchSize int Query string QueryWithCursor string GraphileClient graphile.GraphileClient }
func NewGraphileFetcher ¶ added in v1.3.0
func NewGraphileFetcher(graphileClient graphile.GraphileClient) *GraphileFetcher
func (*GraphileFetcher) Fetch ¶ added in v1.3.0
func (v *GraphileFetcher) Fetch() (*OutputResponse, error)
func (*GraphileFetcher) GetFullQuery ¶ added in v1.3.0
func (v *GraphileFetcher) GetFullQuery() string
func (*GraphileFetcher) GetInputQuery ¶ added in v1.3.0
func (v *GraphileFetcher) GetInputQuery() string
func (*GraphileFetcher) GetReportQuery ¶ added in v1.3.0
func (v *GraphileFetcher) GetReportQuery() string
type GraphileSynchronizer ¶ added in v1.3.0
type GraphileSynchronizer struct { Decoder model.DecoderInterface SynchronizerRepository model.RepoSynchronizer GraphileFetcher *GraphileFetcher }
func NewGraphileSynchronizer ¶ added in v1.3.0
func NewGraphileSynchronizer( decoder model.DecoderInterface, synchronizerRepository model.RepoSynchronizer, graphileFetcher *GraphileFetcher, ) *GraphileSynchronizer
func (GraphileSynchronizer) Start ¶ added in v1.3.0
func (x GraphileSynchronizer) Start(ctx context.Context, ready chan<- struct{}) error
func (GraphileSynchronizer) String ¶ added in v1.3.0
func (x GraphileSynchronizer) String() string
type OutputResponse ¶ added in v1.3.0
type OutputResponse struct { Data struct { Outputs struct { PageInfo struct { StartCursor string `json:"startCursor"` EndCursor string `json:"endCursor"` HasNextPage bool `json:"hasNextPage"` HasPreviousPage bool `json:"hasPreviousPage"` } Edges []struct { Cursor string `json:"cursor"` Node struct { Index int `json:"index"` Blob string `json:"blob"` InputIndex int `json:"inputIndex"` } `json:"node"` } `json:"edges"` } `json:"outputs"` Inputs struct { PageInfo struct { StartCursor string `json:"startCursor"` EndCursor string `json:"endCursor"` HasNextPage bool `json:"hasNextPage"` HasPreviousPage bool `json:"hasPreviousPage"` } Edges []struct { Cursor string `json:"cursor"` Node struct { Index int `json:"index"` Blob string `json:"blob"` } `json:"node"` } `json:"edges"` } `json:"inputs"` Reports struct { Edges []struct { Node struct { Index int `json:"index"` InputIndex int `json:"inputIndex"` Blob string `json:"blob"` } `json:"node"` } PageInfo struct { StartCursor string `json:"startCursor"` EndCursor string `json:"endCursor"` HasNextPage bool `json:"hasNextPage"` HasPreviousPage bool `json:"hasPreviousPage"` } } } `json:"data"` }
type OutputValidityProof ¶
type OutputValidityProof struct { InputIndexWithinEpoch int `json:"inputIndexWithinEpoch"` OutputIndexWithinInput int `json:"outputIndexWithinInput"` OutputHashesRootHash string `json:"outputHashesRootHash"` VouchersEpochRootHash string `json:"vouchersEpochRootHash"` NoticesEpochRootHash string `json:"noticesEpochRootHash"` MachineStateHash string `json:"machineStateHash"` OutputHashInOutputHashesSiblings []string `json:"outputHashInOutputHashesSiblings"` OutputHashesInEpochSiblings []string `json:"outputHashesInEpochSiblings"` }
type Proof ¶
type Proof struct { Validity OutputValidityProof `json:"validity"` Context string `json:"context"` }
type Synchronizer ¶
type Synchronizer struct { VoucherFetcher *VoucherFetcher SynchronizerRepository *repository.SynchronizerRepository // contains filtered or unexported fields }
func NewSynchronizer ¶
func NewSynchronizer( decoder *decoder.OutputDecoder, voucherFetcher *VoucherFetcher, SynchronizerRepository *repository.SynchronizerRepository, ) *Synchronizer
func (Synchronizer) Start ¶
func (x Synchronizer) Start(ctx context.Context, ready chan<- struct{}) error
func (Synchronizer) String ¶
func (x Synchronizer) String() string
String implements supervisor.Worker.
func (*Synchronizer) VoucherPolling ¶
func (x *Synchronizer) VoucherPolling(ctx context.Context) error
type VoucherConnection ¶
type VoucherConnection struct { TotalCount int `json:"totalCount"` Edges []VoucherEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` }
type VoucherData ¶
type VoucherData struct {
Vouchers VoucherConnection `json:"vouchers"`
}
type VoucherEdge ¶
type VoucherFetcher ¶
func NewVoucherFetcher ¶
func NewVoucherFetcher() *VoucherFetcher
func (*VoucherFetcher) Fetch ¶
func (v *VoucherFetcher) Fetch() (*VoucherResponse, error)
type VoucherResponse ¶
type VoucherResponse struct {
Data VoucherData `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.