Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusOn = 1 StatusOff = 0 )
Variables ¶
View Source
var ( //ErrServAlreadyRunning error than run method UP if server already started ErrServAlreadyRunning = errors.New("server already running") //ErrServAlreadyStopped error than run method Down if server already stopped ErrServAlreadyStopped = errors.New("server already stopped") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
HTTP ConfigItem `yaml:"http" json:"http"`
}
Config model
func (Config) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Config) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Config) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Config) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type ConfigItem ¶
type ConfigItem struct {
Addr string `yaml:"addr" json:"addr"`
ReadTimeout time.Duration `yaml:"read_timeout" json:"read_timeout"`
WriteTimeout time.Duration `yaml:"write_timeout" json:"write_timeout"`
IdleTimeout time.Duration `yaml:"idle_timeout" json:"idle_timeout"`
ShutdownTimeout time.Duration `yaml:"shutdown_timeout" json:"shutdown_timeout"`
}
ConfigItem model
func (ConfigItem) MarshalEasyJSON ¶
func (v ConfigItem) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ConfigItem) MarshalJSON ¶
func (v ConfigItem) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ConfigItem) UnmarshalEasyJSON ¶
func (v *ConfigItem) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ConfigItem) UnmarshalJSON ¶
func (v *ConfigItem) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.