Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsensusRequest ¶
type ConsensusResponse ¶
type ConsensusResponse interface {
RequestID() string
}
type Handler ¶
type Handler[T ConsensusRequest[T, R], R ConsensusResponse] struct { services.Service // contains filtered or unexported fields }
func NewHandler ¶
func NewHandler[T ConsensusRequest[T, R], R ConsensusResponse](lggr logger.Logger, s *Store[T, R], clock clockwork.Clock, responseExpiryTime time.Duration) *Handler[T, R]
func (*Handler[T, R]) SendRequest ¶
func (*Handler[T, R]) SendResponse ¶
type Store ¶
type Store[T ConsensusRequest[T, R], R ConsensusResponse] struct { // contains filtered or unexported fields }
Store is a generic store for ongoing consensus requests. It is thread-safe and uses a map to store requests.
func NewStore ¶
func NewStore[T ConsensusRequest[T, R], R ConsensusResponse]() *Store[T, R]
func (*Store[T, R]) FirstN ¶
FirstN retrieves up to `batchSize` requests. The method deep-copies requests before returning them.
Click to show internal directories.
Click to hide internal directories.