-
Notifications
You must be signed in to change notification settings - Fork 7
Add log client implementation #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pkg/client/log/log.go
Outdated
| type Index uint64 | ||
|
|
||
| // Version is the version of an entry | ||
| type Version uint64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don’t need a version because entries are immutable. Versions are only needed for optimistic locking when updating objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
pkg/client/log/log.go
Outdated
| Remove(ctx context.Context, index int64, opts ...RemoveOption) (*Entry, error) | ||
|
|
||
| // Len returns the number of entries in the log | ||
| Len(ctx context.Context) (int, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like Size would be more appropriate if this is the number of entries. Len feels like it would be equal to LastIndex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
24ff723 to
c5f89ff
Compare
f3b7b63 to
3715ca5
Compare
|
lgtm |
d72b82c to
a415573
Compare
No description provided.