Versions in this module Expand all Collapse all v1 v1.1.0 Apr 6, 2022 v1.0.0 Mar 23, 2022 Changes in this version + var ErrConfigNil = errors.New("config nil") + var ErrLogDir = errors.New("log dir is nil") + var ErrLogLevel = errors.New("log level is illegal") + var ErrLogPrefix = errors.New("log prefix is nil") + var ErrMysqlIpNil = errors.New("mysql ip is nil") + var ErrMysqlNameNil = errors.New("mysql name is nil") + var ErrRedisNameNil = errors.New("redis name is nil") + var ErrServerNameNil = errors.New("server name is nil") + type DefaultServer struct + Typ ServerTyp + func NewDefaultServer(ctx context.Context, typ ServerTyp, configPath string) (*DefaultServer, error) + func (d *DefaultServer) AfterInit(serverFunc ...ServerFunc) + func (d *DefaultServer) BeforeInit(serverFunc ...ServerFunc) + func (d *DefaultServer) GetConfig() config.ConfigParser + func (d *DefaultServer) Run(ctx context.Context, cancel context.CancelFunc) error + type Server interface + AfterInit func(serverFunc ...ServerFunc) + BeforeInit func(serverFunc ...ServerFunc) + GetConfig func() config.ConfigParser + Run func(ctx context.Context, cancel context.CancelFunc) error + func NewServer(ctx context.Context, typ ServerTyp, configPath string) (Server, error) + type ServerFunc func(ctx context.Context, config config.ConfigParser) + type ServerTyp string + const DEFAULT_TYPE + const NULL_TYPE