func PluginRegister(p Plugin, pt PluginWorkTime) {
	DefaultBasket.PluginRegister(p, pt)
}
register a plugin to basket
package summer
import (
	"github.com/cocotyty/tdc"
	"log"
	"math/rand"
	"os"
	"os/signal"
	"reflect"
	"time"
)
var DefaultBasket = NewBasket()
func init() {
	PluginRegister(&ProviderPlugin{}, AfterInit)
	PluginRegister(&FieldReferencePlugin{}, AfterInit)
}
func TomlFile(path string) error {
	plugin, err := NewTomlPluginByFilePath(path)
	if err != nil {
		return err
	}
	PluginRegister(plugin, BeforeInit)
	return nil
}
func DynamicTomlFile(path string, solver tdc.ResourceSolver, listener tdc.Listener) error {
	src, err := tdc.NewDynamicToml(solver, listener).Load(path)
	if err != nil {
		return err
	}
	return Toml(string(src))
}
var FailFastConfigEnvMode = "mode"
var rd = rand.New(rand.NewSource(time.Now().UnixNano()))
func FailFastConfig(path string, resolverAddr string) {
	err := DynamicTomlFile(
		path,
		tdc.NewHTTPResourceSolver(resolverAddr, os.Getenv(FailFastConfigEnvMode), time.Second),
		func(name string, data []byte, version uint64, exist bool) {
			time.Sleep(time.Millisecond * time.Duration(rd.Int63n(30*1000)))
			ShutDown()
			os.Exit(0)
		})
	if err != nil {
		panic(err)
	}
}
func Toml(src string) error {
	plugin, err := NewTomlPluginBySource(src)
	if err != nil {
		return err
	}
	PluginRegister(plugin, BeforeInit)
	return nil
}
func AddNotStrict(name string, stone Stone, value ...interface{}) {
	if len(value) == 0 {
		DefaultBasket.AddNotStrict(name, stone, nil)
	} else {
		DefaultBasket.AddNotStrict(name, stone, value[0])
	}
}
func PutNotStrict(stone Stone, value ...interface{}) {
	if len(value) == 0 {
		DefaultBasket.PutNotStrict(stone, nil)
	} else {
		DefaultBasket.PutNotStrict(stone, value[0])
	}
}
func Add(name string, stone Stone, value ...interface{}) {
	if len(value) == 0 {
		DefaultBasket.Add(name, stone)
	} else {
		DefaultBasket.AddWithValue(name, stone, value[0], false)
	}
}
func Put(stone Stone, value ...interface{}) {
	if len(value) == 0 {
		DefaultBasket.Put(stone)
	} else {
		DefaultBasket.PutWithValue(stone, value[0], false)
	}
}
func GetStone(name string, t reflect.Type) (stone Stone) {
	return DefaultBasket.GetStone(name, t)
}
func GetStoneWithName(name string) (stone Stone) {
	return DefaultBasket.GetStoneWithName(name)
}
func GetStoneByType(typ interface{}) (stone Stone) {
	return DefaultBasket.GetStoneByType(typ)
}