Simplified Logs RPC. Cleaned up code. Added comments.

This commit is contained in:
Milos Gajdos
2019-11-28 18:08:48 +00:00
parent 612f872f76
commit 7f1dea72f2
6 changed files with 51 additions and 18 deletions

View File

@@ -31,6 +31,8 @@ type ReadOptions struct {
Since time.Time
// Count specifies number of logs to return
Count int
// Stream requests continuous log stream
Stream bool
}
// ReadOption used for reading the logs
@@ -49,3 +51,10 @@ func Count(c int) ReadOption {
o.Count = c
}
}
// Stream requests continuous log stream
func Stream(s bool) ReadOption {
return func(o *ReadOptions) {
o.Stream = s
}
}