Vasiliy Tolstov
14c97d59c1
* add many options helpers * fix noop client to allow publish messages to topic in broker * fix noop server to allow registering in registry * fix noop server to allow subscribe to topic in broker * fix new service initialization Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
26 lines
430 B
Go
26 lines
430 B
Go
package tracer
|
|
|
|
import "context"
|
|
|
|
type NoopTracer struct{}
|
|
|
|
func (n *NoopTracer) Init(...Option) error {
|
|
return nil
|
|
}
|
|
|
|
func (n *NoopTracer) Start(ctx context.Context, name string) (context.Context, *Span) {
|
|
return nil, nil
|
|
}
|
|
|
|
func (n *NoopTracer) Finish(*Span) error {
|
|
return nil
|
|
}
|
|
|
|
func (n *NoopTracer) Read(...ReadOption) ([]*Span, error) {
|
|
return nil, nil
|
|
}
|
|
|
|
func NewTracer(opts ...Option) Tracer {
|
|
return &NoopTracer{}
|
|
}
|