Documentation ¶
Index ¶
Constants ¶
View Source
const ( EOF tokenType = iota Word Comment )
Variables ¶
View Source
var ( EOFToken = Token{Typ: EOF} BraceOpenToken = Token{Typ: braceOpen, Lit: "{"} BraceCloseToken = Token{Typ: braceClose, Lit: "}"} SemicolonToken = Token{Typ: semicolon, Lit: ";"} )
View Source
var ErrSyntax = errors.New("syntax error")
Functions ¶
This section is empty.
Types ¶
type NginxConfigureBlock ¶
type NginxConfigureBlock []NginxConfigureCommand
NginxConfigureBlock represent a block in nginx configure file. The content of a nginx configure file should be a block.
func Parse ¶
func Parse(content []byte) (blk NginxConfigureBlock, err error)
Parse the content of nginx configure file into NginxConfigureBlock.
func (NginxConfigureBlock) ParseServers ¶
func (conf NginxConfigureBlock) ParseServers() []NginxServer
type NginxConfigureCommand ¶
type NginxConfigureCommand struct { // Words compose the command Words []string // Block follow the command Block NginxConfigureBlock }
NginxConfigureCommand represenct a command in nginx configure file.
type NginxServer ¶
func (NginxServer) ServeHTTP ¶
func (s NginxServer) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RunningServers ¶
type RunningServers struct {
Servers map[int]*container
}
func NewRunningServers ¶
func NewRunningServers() *RunningServers
func (*RunningServers) Register ¶
func (s *RunningServers) Register(server NginxServer)
func (*RunningServers) Start ¶
func (s *RunningServers) Start()
Click to show internal directories.
Click to hide internal directories.