ce080d76c6
* add debug/profile package * set service+version for profile
24 lines
352 B
Go
24 lines
352 B
Go
// Package profile is for profilers
|
|
package profile
|
|
|
|
type Profile interface {
|
|
// Start the profiler
|
|
Start() error
|
|
// Stop the profiler
|
|
Stop() error
|
|
}
|
|
|
|
type Options struct {
|
|
// Name to use for the profile
|
|
Name string
|
|
}
|
|
|
|
type Option func(o *Options)
|
|
|
|
// Name of the profile
|
|
func Name(n string) Option {
|
|
return func(o *Options) {
|
|
o.Name = n
|
|
}
|
|
}
|