Documentation ¶
Index ¶
- func AddPortsToFirewall(ports []int)
- func ContainsStringInsensitive(list []string, search string) bool
- func DumpResponse(resp *http.Response) (header []byte, body []byte, err error)
- func IP2Long(ip string) uint64
- func IsIPv6(ip string) bool
- func NewHTTPClient(timeout time.Duration) *http.Client
- func ParseDomainFromKey(key string) (domain string)
- func PrintError(err error)
- func RangeDays(dayFrom string, dayTo string) ([]string, error)
- func RangeHours(hourFrom string, hourTo string) ([]string, error)
- func RangeMonths(dayFrom string, dayTo string) ([]string, error)
- func SetRLimit(limit uint64) error
- func SetSuitableRLimit()
- func SharedHttpClient(timeout time.Duration) *http.Client
- func SplitStrings(s string, glue string) []string
- func VersionToLong(version string) uint32
- type CacheMap
- type ServiceManager
- func (this *ServiceManager) Close() error
- func (this *ServiceManager) Execute(args []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (ssec bool, errno uint32)
- func (this *ServiceManager) Install(exePath string, args []string) error
- func (this *ServiceManager) Log(msg string)
- func (this *ServiceManager) LogError(msg string)
- func (this *ServiceManager) PauseWindow()
- func (this *ServiceManager) Run()
- func (this *ServiceManager) Start() error
- func (this *ServiceManager) Uninstall() error
- type Ticker
- type Unzip
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPortsToFirewall ¶
func AddPortsToFirewall(ports []int)
func ContainsStringInsensitive ¶
ContainsStringInsensitive 检查是否包含某个字符串,并且不区分大小写
func DumpResponse ¶
DumpResponse 导出响应
func NewHTTPClient ¶
NewHTTPClient 获取一个新的Client
func ParseDomainFromKey ¶
ParseDomainFromKey 从Key中获取域名
func RangeHours ¶
RangeHours 计算小时之间的所有小时,格式为YYYYMMDDHH
func RangeMonths ¶
RangeMonths 计算日期之间的所有月份,格式为YYYYMM
func SharedHttpClient ¶
SharedHttpClient 获取一个公用的Client
Types ¶
type CacheMap ¶
type CacheMap struct {
// contains filtered or unexported fields
}
func NewCacheMap ¶
func NewCacheMap() *CacheMap
type ServiceManager ¶
type ServiceManager struct { Name string Description string // contains filtered or unexported fields }
服务管理器
func (*ServiceManager) Execute ¶
func (this *ServiceManager) Execute(args []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (ssec bool, errno uint32)
同服务管理器的交互
Source Files ¶
Click to show internal directories.
Click to hide internal directories.