Documentation
¶
Overview ¶
Copyright (c) 2020 Shuo Ding Open Source: MIT License Author: SDing <deen.job@qq.com> License that can be found in the LICENSE file.
Index ¶
Constants ¶
View Source
const ( // DefaultPort default port DefaultPort = "9598" // DefaultAddress default address DefaultAddress = "127.0.0.1" // DefaultPath default config file path DefaultPath = "./config.ini" )
View Source
const ( // RuleKindNumber is Number RuleKindNumber = iota // RuleKindLower is letter lower RuleKindLower // RuleKindUpper is letter upper RuleKindUpper // RuleKindAll is all rule RuleKindAll )
Variables ¶
View Source
var ( // DefaultAllow default allow address DefaultAllow = make([]string, 0, 8) // DefaultPassword default password DefaultPassword = string(Krand(16, RuleKindAll)) )
Functions ¶
Types ¶
type Option ¶
type Option struct {
// Bind IP
Address string
// Bind Port 0-65535
Port string
// Allow access IP
AllowIP []string
// Auth password
Password string
}
Option is create FastMQ server parameter
func DefaultConfig ¶
func DefaultConfig() *Option
DefaultConfig genreate server option default cofing
func LoadOption ¶
func LoadOption() *Option
LoadOption load Configuration File,return option pointer
Click to show internal directories.
Click to hide internal directories.