Skip to content
Snippets Groups Projects
dubbo_exporter.go 528 B
Newer Older
package dubbo

fangyincheng's avatar
fangyincheng committed
import (
	"context"
)

import (
	"github.com/dubbo/dubbo-go/protocol"
)

// wrapping invoker
type DubboExporter struct {
fangyincheng's avatar
fangyincheng committed
	ctx     context.Context
	key     string
	invoker protocol.Invoker
}

fangyincheng's avatar
fangyincheng committed
func NewDubboExporter(ctx context.Context, key string, invoker protocol.Invoker) *DubboExporter {
	return &DubboExporter{
		ctx:     ctx,
		key:     key,
		invoker: invoker,
	}
}

func (de *DubboExporter) GetInvoker() protocol.Invoker {
	return de.invoker

}

func (de *DubboExporter) Unexport() {
fangyincheng's avatar
fangyincheng committed
	de.invoker.Destroy()