Created
February 1, 2016 00:58
-
-
Save josephglanville/9fab9a7b44cf0e6d286e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package xlog | |
type Position string | |
type XLog interface { | |
// Returns the zero position for this xlog | |
Zero() Position | |
// Increment increments an xlog position by the given number. | |
// Returns the new position of the xlog. | |
Increment(Position, int) (Position, error) | |
// Compare compares two xlog positions returning -1 if xlog1 < xlog2, 0 if xlog1 | |
// == xlog2, and 1 if xlog1 > xlog2. | |
Compare(Position, Position) (int, error) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment