Documentation
¶
Index ¶
Constants ¶
View Source
const ( Server = "server" Location = "location" Upstream = "upstream" CommentStart = "#" Empty = "" If = "if" )
Variables ¶
This section is empty.
Functions ¶
func GetNginxConfPath ¶
func ReloadNginx ¶
func ReloadNginx() string
func TestNginxConf ¶
func TestNginxConf() error
Types ¶
type CommentQueue ¶
type CommentQueue struct {
*linkedlistqueue.Queue
}
func (*CommentQueue) DequeueAllComments ¶
func (c *CommentQueue) DequeueAllComments() (comments string)
type NgxConfig ¶
type NgxConfig struct {
FileName string `json:"file_name"`
Upstreams []*NgxUpstream `json:"upstreams"`
Servers []*NgxServer `json:"servers"`
Custom string `json:"custom"`
// contains filtered or unexported fields
}
func NewNgxConfig ¶
func ParseNgxConfig ¶
func ParseNgxConfigByScanner ¶
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) TrimParams ¶
func (d *NgxDirective) TrimParams()
type NgxLocation ¶
type NgxServer ¶
type NgxServer struct {
Directives []*NgxDirective `json:"directives"`
Locations []*NgxLocation `json:"locations"`
Comments string `json:"comments"`
// contains filtered or unexported fields
}
func NewNgxServer ¶
func NewNgxServer() *NgxServer
type NgxUpstream ¶
type NgxUpstream struct {
Name string `json:"name"`
Directives []*NgxDirective `json:"directives"`
Comments string `json:"comments"`
}
Click to show internal directories.
Click to hide internal directories.