func (xwebimpl *XwebImpl) Shutdown() {
	for _, server := range xwebimpl.servers {
		localServer := server
		go func() {
			ctx, cancel := context.WithTimeout(context.Background(), time.Second*15)
			defer cancel()
			localServer.Shutdown(ctx)
		}()
	}
}
Shutdown stop all running xweb.Server's
package xweb
import (
	"context"
	"github.com/michaelquigley/pfxlog"
	"github.com/openziti/foundation/identity/identity"
	"time"
)
type Xweb interface {
	Enabled() bool
	LoadConfig(cfgmap map[interface{}]interface{}) error
	Run()
	Shutdown()
}
const (
	DefaultIdentitySection = "identity"
	WebSection             = "web"
)
type XwebImpl struct {
	Config       *Config
	servers      []*Server
	Registry     WebHandlerFactoryRegistry
	DemuxFactory DemuxFactory
}
func NewXwebImpl(registry WebHandlerFactoryRegistry, defaultIdentity identity.Identity) *XwebImpl {
	return &XwebImpl{
		Registry:     registry,
		DemuxFactory: &IsHandledDemuxFactory{},
		Config: &Config{
			DefaultIdentitySection: DefaultIdentitySection,
			DefaultIdentity:        defaultIdentity,
			WebSection:             WebSection,
		},
	}
}
func (xwebimpl *XwebImpl) Enabled() bool {
	return xwebimpl.Config.Enabled()
}
func (xwebimpl *XwebImpl) LoadConfig(cfgmap map[interface{}]interface{}) error {
	if err := xwebimpl.Config.Parse(cfgmap); err != nil {
		return err
	}
	if err := xwebimpl.Config.Validate(xwebimpl.Registry); err != nil {
		return err
	}
	return nil
}
func (xwebimpl *XwebImpl) Run() {
	for _, webListener := range xwebimpl.Config.WebListeners {
		server, err := NewServer(webListener, xwebimpl.DemuxFactory, xwebimpl.Registry, xwebimpl.Config)
		if err != nil {
			pfxlog.Logger().Fatalf("error starting xweb server for %s: %v", webListener.Name, err)
		}
		xwebimpl.servers = append(xwebimpl.servers, server)
		name := webListener.Name
		go func() {
			if err := server.Start(); err != nil {
				pfxlog.Logger().Errorf("error starting xweb_rest server %s: %v", name, err)
			}
		}()
	}
}