func (m methodInfo) NewArgs() interface{} {
	return m.newArgsFunc()
}
NewArgs implements the MethodInfo interface.
package serviceinfo
import (
	"context"
)
type PayloadCodec int
const (
	Thrift PayloadCodec = iota
	Protobuf
)
const (
	GenericService = "$GenericService"  
	GenericMethod = "$GenericCall"
)
type ServiceInfo struct {
	PackageName string
	ServiceName string
	HandlerType interface{}
	Methods map[string]MethodInfo
	PayloadCodec PayloadCodec
	KiteXGenVersion string
	Extra map[string]interface{}
}
func (i *ServiceInfo) GetPackageName() (pkg string) {
	if i.PackageName != "" {
		return i.PackageName
	}
	pkg, _ = i.Extra["PackageName"].(string)
	return
}
func (i *ServiceInfo) MethodInfo(name string) MethodInfo {
	if i.ServiceName == GenericService {
		return i.Methods[GenericMethod]
	}
	return i.Methods[name]
}
type MethodInfo interface {
	Handler() MethodHandler
	NewArgs() interface{}
	NewResult() interface{}
	OneWay() bool
}
type MethodHandler func(ctx context.Context, handler, args, result interface{}) error
func NewMethodInfo(methodHandler MethodHandler, newArgsFunc, newResultFunc func() interface{}, oneWay bool) MethodInfo {
	return methodInfo{
		handler:       methodHandler,
		newArgsFunc:   newArgsFunc,
		newResultFunc: newResultFunc,
		oneWay:        oneWay,
	}
}
type methodInfo struct {
	handler       MethodHandler
	newArgsFunc   func() interface{}
	newResultFunc func() interface{}
	oneWay        bool
}
func (m methodInfo) Handler() MethodHandler {
	return m.handler
}