Documentation
¶
Index ¶
- type EventBatch
- type GossipOptions
- type Identity
- type InboxEventResult
- type InboxResponse
- type Logger
- type Options
- type OutboxPage
- type Result
- type Service
- func (s *Service) GossipOnce(ctx context.Context, opts GossipOptions) (result Result, err error)
- func (s *Service) PushOnce(ctx context.Context, limit int) (result Result, err error)
- func (s *Service) RetryPendingProjections(ctx context.Context, limit int) (int, error)
- func (s *Service) Run(ctx context.Context, interval time.Duration) error
- func (s *Service) RunGossip(ctx context.Context, interval time.Duration, opts GossipOptions) error
- func (s *Service) RunPush(ctx context.Context, interval time.Duration, limit int) error
- func (s *Service) SyncOnce(ctx context.Context) (result Result, err error)
- func (s *Service) UpsertManualPeers(ctx context.Context, peerURLs []string) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventBatch ¶
type EventBatch struct {
SchemaVersion string `json:"schema_version"`
Type string `json:"type"`
Events []*events.SignedEvent `json:"events"`
}
type GossipOptions ¶
type InboxEventResult ¶
type InboxResponse ¶
type InboxResponse struct {
SchemaVersion string `json:"schema_version"`
Type string `json:"type"`
Accepted []InboxEventResult `json:"accepted"`
Duplicate []InboxEventResult `json:"duplicate"`
Rejected []InboxEventResult `json:"rejected"`
Cursor string `json:"cursor,omitempty"`
}
type OutboxPage ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewWithOptions ¶
func (*Service) GossipOnce ¶
func (*Service) RetryPendingProjections ¶
RetryPendingProjections replays durable projection failures against the immutable accepted event log. It is safe to call repeatedly.
type Store ¶
type Store interface {
UpsertFederationPeerURL(ctx context.Context, peerURL string) (int64, error)
ListEnabledFederationPeers(ctx context.Context) ([]pgindex.FederationPeerRecord, error)
UpsertFederationNode(ctx context.Context, node pgindex.FederationNodeRecord) error
AppendVerifiedFederationEvent(ctx context.Context, event *events.SignedEvent, validation *events.ValidationResult) error
AppendRejectedFederationEvent(ctx context.Context, eventID, authorNodeID, eventType string, rawEventJSON []byte, reason string) error
UpsertFederatedReleaseCardProjection(ctx context.Context, projection releasecard.Projection) error
ProjectValidatorCapacity(ctx context.Context, projection pgindex.ValidatorCapacityProjection) error
ProjectArticleAvailabilityAttestation(ctx context.Context, projection pgindex.ArticleAvailabilityProjection) error
ProjectChecksumAttestation(ctx context.Context, projection pgindex.ChecksumAttestationProjection) error
ProjectManifestAvailability(ctx context.Context, projection pgindex.ManifestAvailabilityProjection) error
ProjectTrustAttestation(ctx context.Context, projection pgindex.TrustAttestationProjection) error
ProjectHealthAttestation(ctx context.Context, projection pgindex.HealthAttestationProjection) error
ProjectTombstone(ctx context.Context, projection pgindex.TombstoneProjection) error
ProjectCoverageEvent(ctx context.Context, event *events.SignedEvent) error
MarkFederationPeerSyncSuccess(ctx context.Context, peerID int64, nodeID, cursor, lastEventID string) error
MarkFederationPeerSyncFailure(ctx context.Context, peerID int64, errText string) error
ListUndeliveredFederationEvents(ctx context.Context, peerID int64, nodeID string, limit int) ([]*events.SignedEvent, error)
RecordFederationPeerDelivery(ctx context.Context, result pgindex.FederationDeliveryResult) error
ValidateFederationPoolControlEvent(ctx context.Context, event *events.SignedEvent) error
ProjectFederationPoolEvent(ctx context.Context, event *events.SignedEvent) error
CanAcceptFederationEventForPools(ctx context.Context, authorNodeID string, poolIDs []string, eventType string) (pgindex.PoolAuthorizationResult, error)
IsActivePoolMember(ctx context.Context, poolID, nodeID string) (bool, error)
}
Click to show internal directories.
Click to hide internal directories.