Documentation ¶
Index ¶
- func HttpPorts(ctx context.Context) []int
- func HttpServers(ctx context.Context) (int, map[string][]int)
- func Port(ctx context.Context) int
- func Ports(contexts []context.Context) []int
- func StreamServers(ctx context.Context) []int
- type CompletedManagerConfig
- type HttpInfo
- type ManagerConfig
- type NginxConfig
- type NginxConfigManager
- type Statistician
- type StreamInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamServers ¶
Types ¶
type CompletedManagerConfig ¶
type CompletedManagerConfig struct {
*ManagerConfig
}
func (*CompletedManagerConfig) NewNginxConfigManager ¶
func (cc *CompletedManagerConfig) NewNginxConfigManager() (NginxConfigManager, error)
type ManagerConfig ¶
type ManagerConfig struct { NginxMainConfigAbsPath string NginxHome string NginxBinFilePath string RegularlyTaskCycleDelay time.Duration BackupCycleDays int BackupRetentionDays int BackupDir string BackupPrefix string BackupTimeZone *time.Location }
func (*ManagerConfig) Complete ¶
func (c *ManagerConfig) Complete() (*CompletedManagerConfig, error)
type NginxConfig ¶
type NginxConfig interface { Main() local.MainContext UpdateFromJsonBytes(data []byte) error UpdatedTimestamp() time.Time TextLines() []string Json() []byte Dump() map[string]*bytes.Buffer }
func NewNginxConfigFromFS ¶
func NewNginxConfigFromFS(filepath string) (NginxConfig, error)
func NewNginxConfigFromJsonBytes ¶
func NewNginxConfigFromJsonBytes(data []byte) (NginxConfig, error)
type NginxConfigManager ¶
type Statistician ¶
type Statistician interface { HttpInfo() HttpInfo StreamInfo() StreamInfo Statistics() *v1.Statistics }
func NewStatistician ¶
func NewStatistician(c NginxConfig) Statistician
type StreamInfo ¶
type StreamInfo struct {
PortCount []int
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.