Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Comms ¶
type Comms interface { GetHost(hostId *id.ID) (*connect.Host, bool) RequestHistoricalRounds(host *connect.Host, message *pb.HistoricalRounds) ( *pb.HistoricalRoundsResponse, error) }
Comms interface to increase east of testing of historical rounds.
type Params ¶
type Params struct { // MaxHistoricalRounds is the number of historical rounds required to // automatically send a historical rounds query. MaxHistoricalRounds uint // HistoricalRoundsPeriod is the maximum period of time a pending historical // round query will wait before it is transmitted. HistoricalRoundsPeriod time.Duration // HistoricalRoundsBufferLen is the length of historical rounds channel // buffer. HistoricalRoundsBufferLen uint // MaxHistoricalRoundsRetries is the maximum number of times a historical // round lookup will be attempted. MaxHistoricalRoundsRetries uint }
Params contains the parameters for the rounds package.
func GetDefaultParams ¶
func GetDefaultParams() Params
GetDefaultParams returns a default set of Params.
func GetParameters ¶
GetParameters returns the default Params, or override with given parameters, if set.
func (Params) MarshalJSON ¶
MarshalJSON adheres to the json.Marshaler interface.
func (*Params) UnmarshalJSON ¶
UnmarshalJSON adheres to the json.Unmarshaler interface.
type Retriever ¶
type Round ¶
type Round struct { // ID of the round. IDs are sequential and monotonic. ID id.Round // State is the last known state of the round. Possible states are: // - PENDING - Not started yet. // - PRECOMPUTING - In the process of preparing to process messages. // - STANDBY - Completed precomputing but not yet scheduled to run. // - QUEUED - Scheduled to run at a set time. // - REALTIME - Running, actively handing messages. // - COMPLETED - Successfully deleted messages. // - FAILED - Failed to deliver messages. State states.Round // Topology contains the list of nodes in the round. Topology *connect.Circuit // Timestamps of all events that have occurred in the round (see the above // states). // // The QUEUED state's timestamp is different; it denotes when Realtime // was/is scheduled to start, not whe the QUEUED state is entered. Timestamps map[states.Round]time.Time // Errors that occurred in the round. Will only be present in the failed // state. Errors []RoundError // BatchSize is the max number of messages the round can process. BatchSize uint32 // AddressSpaceSize is the ephemeral address space size used in the round. AddressSpaceSize uint8 // UpdateID is a monotonic counter between all round updates denoting when // this updated occurred in the queue. UpdateID uint64 // Raw is raw round data, including signatures. Raw *pb.RoundInfo }
func (Round) GetEndTimestamp ¶
GetEndTimestamp returns the timestamp of the last known event, which is generally the state unless in queued, which stores the next event.
func (Round) MarshalJSON ¶ added in v4.4.4
MarshalJSON handles the JSON marshaling of the Round. This function adheres to the json.Marshaler interface.
func (*Round) UnmarshalJSON ¶ added in v4.4.4
UnmarshalJSON handles the JSON unmarshalling of the Round. This function adheres to the json.Unmarshaler interface.
type RoundError ¶
func (*RoundError) String ¶
func (re *RoundError) String() string
String prints a formatted version of the client error string. This function adheres to the fmt.Stringer interface.
type RoundResultCallback ¶
RoundResultCallback is the used callback when a round is found.