github.com/omniscale/go-osm@v0.3.1/replication/replication.go (about) 1 package replication 2 3 import "time" 4 5 // A Sequence contains metadata for a replication file (diff or changeset). 6 type Sequence struct { 7 // Sequence specifies the number of this replication file. 8 Sequence int 9 // Error describes any an error that occurred the during download of the 10 // replication file. The filenames and Time are zero if Error is set. 11 Error error 12 // Filename specifies the full path to the replication file. 13 Filename string 14 // StateFilename specifies the full path to the .state.txt file for this sequence. 15 StateFilename string 16 // Time specifies the creation time of this replication sequence. The 17 // replication file will only contain data older then this timestamp. 18 Time time.Time 19 // Latest is true if the next Sequence is not yet available. 20 Latest bool 21 } 22 23 // A Source provides a stream of replication files. 24 type Source interface { 25 // Sequences returns the channel with metadata for each replication file. 26 Sequences() <-chan Sequence 27 28 // Stop signals the source that it should stop loading more replication 29 // files and that Sequences channel should be closed. 30 Stop() 31 }