ceremonyclient/node/consensus/time/time_reel.go
petricadaipegsp 44ccd14871
Use buffered channels when applicable (#373)
* Use buffered channels when applicable

* Do not start additional goroutines for processing

* Use context to stop ongoing loops
2024-11-21 19:32:04 -06:00

17 lines
351 B
Go

package time
import (
"context"
"source.quilibrium.com/quilibrium/monorepo/node/protobufs"
)
type TimeReel interface {
Start() error
Stop()
Insert(ctx context.Context, frame *protobufs.ClockFrame, isSync bool) error
Head() (*protobufs.ClockFrame, error)
NewFrameCh() <-chan *protobufs.ClockFrame
BadFrameCh() <-chan *protobufs.ClockFrame
}