func (config *Config) Build() *Server {
	var listener, err = net.Listen(config.Network, config.Address())
	if err != nil {
		logger.Logger.Panic(err)
	}
	info := server.ApplyOptions(
		server.WithScheme("http"),
		server.WithAddress(config.Address()),
		server.WithName(config.Name),
	)
	return &Server{
		Server: &http.Server{
			Addr:    config.Address(),
			Handler: DefaultServeMux,
		},
		listener:   listener,
		Config:     config,
		serverInfo: &info,
	}
}
Build create server instance, then initialize it with necessary interceptor
package monitor
import (
	"context"
	"fmt"
	"net"
	"net/http"
	"github.com/abulo/ratel/v2/logger"
	"github.com/abulo/ratel/v2/server"
)
type Config struct {
	Host    string
	Port    int
	Network string
	Enable  bool
	Name    string
}
type Server struct {
	*http.Server
	listener net.Listener
	*Config
	serverInfo *server.ServiceInfo
}
var (
	DefaultServeMux = http.NewServeMux()
)
func (config *Config) WithHost(host string) *Config {
	config.Host = host
	return config
}
func (config *Config) WithPort(port int) *Config {
	config.Port = port
	return config
}
func (config *Config) WithName(name string) *Config {
	config.Name = name
	return config
}
func (config *Config) Address() string {
	return fmt.Sprintf("%s:%d", config.Host, config.Port)
}