// NewDefaultDispatcher create a new DefaultDispatcher.
NewDefaultDispatcher create a new DefaultDispatcher.
// NewDefaultDispatcher create a new DefaultDispatcher .
func NewDefaultDispatcher(ctx context.Context, config *Config) (*DefaultDispatcher, error) {
	v := core.MustFromContext(ctx)
	d := &DefaultDispatcher{
		ohm:    v.OutboundHandlerManager(),
		router: v.Router(),
		policy: v.PolicyManager(),
		stats:  v.Stats(),
	}
	if err := v.RegisterFeature((*core.Dispatcher)(nil), d); err != nil {
		return nil, newError("unable to register Dispatcher").Base(err)
	}
	return d, nil
}
func NewDefaultDispatcher ( ctx context . Context , config * Config ) ( * DefaultDispatcher , error ) { v := core . MustFromContext ( ctx ) d := & DefaultDispatcher { ohm : v . OutboundHandlerManager ( ) , router : v . Router ( ) , policy : v . PolicyManager ( ) , stats : v . Stats ( ) , } if err := v . RegisterFeature ( ( * core . Dispatcher ) ( nil ) , d ) ; err != nil { return nil , newError ( " " ) . Base ( err ) } return d , nil }
NewDefaultDispatcher create a new DefaultDispatcher.
NewDefaultDispatcher create a new DefaultDispatcher .