mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-02 11:10:47 -05:00
* bump dependencies Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * bump reva and add config options Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> --------- Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
35 lines
502 B
Go
35 lines
502 B
Go
package trace
|
|
|
|
type Options struct {
|
|
// Size is the size of ring buffer
|
|
Size int
|
|
}
|
|
|
|
type Option func(o *Options)
|
|
|
|
type ReadOptions struct {
|
|
// Trace id
|
|
Trace string
|
|
}
|
|
|
|
type ReadOption func(o *ReadOptions)
|
|
|
|
// Read the given trace.
|
|
func ReadTrace(t string) ReadOption {
|
|
return func(o *ReadOptions) {
|
|
o.Trace = t
|
|
}
|
|
}
|
|
|
|
const (
|
|
// DefaultSize of the buffer.
|
|
DefaultSize = 64
|
|
)
|
|
|
|
// DefaultOptions returns default options.
|
|
func DefaultOptions() Options {
|
|
return Options{
|
|
Size: DefaultSize,
|
|
}
|
|
}
|