micro: rewrite options to support multiple building blocks
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -6,6 +6,10 @@ type noopTracer struct {
|
||||
opts Options
|
||||
}
|
||||
|
||||
func (n *noopTracer) Name() string {
|
||||
return n.opts.Name
|
||||
}
|
||||
|
||||
// Init initilize tracer
|
||||
func (n *noopTracer) Init(opts ...Option) error {
|
||||
for _, o := range opts {
|
||||
@@ -19,6 +23,11 @@ func (n *noopTracer) Start(ctx context.Context, name string) (context.Context, *
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// Lookup get span from context
|
||||
func (n *noopTracer) Lookup(ctx context.Context) (*Span, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// Finish finishes span
|
||||
func (n *noopTracer) Finish(*Span) error {
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user