func (c *Config) CreateListener() (*lis.Listener, error) {
	tool.PanicIfNil(c)
	l, err := net.Listen(c.Network, c.Address)
	if err != nil {
		return nil, errors.Wrapf(err, "failed to listen %s %s", c.Network, c.Address)
	}
	tool.PanicIfNil(l)
	return lis.NewListner(l), nil
}
CreateListener creates a network listener from the network and address config
package config
import (
	"github.com/autom8ter/engine/driver"
	"github.com/autom8ter/engine/lis"
	"github.com/autom8ter/objectify"
	"github.com/autom8ter/util"
	"github.com/grpc-ecosystem/go-grpc-middleware"
	"github.com/pkg/errors"
	"google.golang.org/grpc"
	"net"
	"os"
)
var tool = objectify.Default()
type Config struct {
	Network            string `json:"network" validate:"required"`
	Address            string `json:"address" validate:"required"`
	Plugins            []driver.Plugin
	UnaryInterceptors  []grpc.UnaryServerInterceptor
	StreamInterceptors []grpc.StreamServerInterceptor
	Option             []grpc.ServerOption
}
func New(network, addr string, debug bool) *Config {
	if debug {
		_ = os.Setenv("DEBUG", "t")
		_ = os.Setenv("debug", "t")
	}
	if network == "" || addr == "" {
		tool.Debugf("empty network or address detected, setting defaults %s", "tcp :3000")
		network = "tcp"
		addr = ":3000"
	}
	c := &Config{
		Network: network,
		Address: addr,
	}
	tool.PanicIfNil(c)
	if err := tool.Validate(c); err != nil {
		panic(errors.New("failed to valid config"))
	}
	return c
}