micro/tracer/noop.go
Vasiliy Tolstov 14c97d59c1 many improvements with options and noop stuff
* 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>
2020-10-16 09:38:57 +03:00

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{}
}