Refactor debug/trace ready for Jaeger
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package trace
|
||||
|
||||
type Options struct{}
|
||||
type Options struct {
|
||||
// Size is the size of ring buffer
|
||||
Size int
|
||||
}
|
||||
|
||||
type Option func(o *Options)
|
||||
|
||||
@@ -17,3 +20,15 @@ func ReadTrace(t string) ReadOption {
|
||||
o.Trace = t
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
// DefaultSize of the buffer
|
||||
DefaultSize = 64
|
||||
)
|
||||
|
||||
// DefaultOptions returns default options
|
||||
func DefaultOptions() Options {
|
||||
return Options{
|
||||
Size: DefaultSize,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user