Documentation ¶
Index ¶
- Constants
- func FmtCode(content string) (fmtContent string)
- func GetConfPath(dir ...string) string
- func GetLogLevel(output string) int
- func GetNginxPIDPath() string
- func Reload() string
- func Restart() string
- func TestConf() string
- type NgxConfig
- type NgxDirective
- type NgxLocation
- type NgxServer
- type NgxUpstream
Constants ¶
View Source
const ( Debug = iota Info Notice Warn Error Crit Alert Emerg )
View Source
const ( Server = "server" Location = "location" Upstream = "upstream" )
Variables ¶
This section is empty.
Functions ¶
func GetConfPath ¶ added in v1.7.2
func GetLogLevel ¶ added in v1.7.4
func GetNginxPIDPath ¶ added in v1.7.6
func GetNginxPIDPath() string
Types ¶
type NgxConfig ¶
type NgxConfig struct { FileName string `json:"file_name"` Name string `json:"name"` Upstreams []*NgxUpstream `json:"upstreams"` Servers []*NgxServer `json:"servers"` Custom string `json:"custom"` // contains filtered or unexported fields }
func NewNgxConfig ¶
func ParseNgxConfig ¶
func ParseNgxConfigByContent ¶ added in v1.7.0
func (*NgxConfig) BuildConfig ¶
type NgxDirective ¶
type NgxDirective struct { Directive string `json:"directive"` Params string `json:"params"` Comments string `json:"comments"` }
func (*NgxDirective) Orig ¶
func (d *NgxDirective) Orig() string
func (*NgxDirective) ParseDirective ¶ added in v1.7.0
func (d *NgxDirective) ParseDirective(directive gonginx.IDirective, deep int)
func (*NgxDirective) TrimParams ¶
func (d *NgxDirective) TrimParams()
type NgxLocation ¶
type NgxLocation struct { Path string `json:"path"` Content string `json:"content"` Comments string `json:"comments"` }
func (*NgxLocation) ParseLocation ¶ added in v1.7.0
func (l *NgxLocation) ParseLocation(directive gonginx.IDirective, deep int)
type NgxServer ¶
type NgxServer struct { Directives []*NgxDirective `json:"directives"` Locations []*NgxLocation `json:"locations"` Comments string `json:"comments"` }
func NewNgxServer ¶
func NewNgxServer() *NgxServer
func (*NgxServer) ParseServer ¶ added in v1.7.0
func (s *NgxServer) ParseServer(directive gonginx.IDirective)
type NgxUpstream ¶
type NgxUpstream struct { Name string `json:"name"` Directives []*NgxDirective `json:"directives"` Comments string `json:"comments"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.