Simplified Logs RPC. Cleaned up code. Added comments.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user