otomnipotent

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 4 Imported by: 0

README

otomnipotent

The omnipotent plugin of OpenTracing.

Usage

package main

import (
	"context"
	"fmt"
	"github.com/yuewokeji/opentracing-go-plugins/module/otomnipotent"
)

func doAnything(ctx context.Context) (interface{}, error) {
	return "do anything", nil
}

func main() {
	wrapper := otomnipotent.Wrap(context.Background(), "do-anything", doAnything)
	v, err := wrapper.Do()
	if err != nil {
		panic(err)
	}

	if s, ok := v.(string); ok {
		fmt.Println(s)
	}
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(ctx context.Context, spanName string, doer doer) *wrapper

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL