Documentation ¶
Index ¶
- type BufferPool
- type NginxConfigFileTemplete
- func (n *NginxConfigFileTemplete) ClearByTenant(tenant string) error
- func (n *NginxConfigFileTemplete) GetConfigFileDirPath() string
- func (n *NginxConfigFileTemplete) NewNginxTemplate(data *model.Nginx) error
- func (n *NginxConfigFileTemplete) WriteServer(c option.Config, configtype, tenant string, servers ...*model.Server) error
- func (n *NginxConfigFileTemplete) WriteServerAndUpstream(first bool, c option.Config, configType, tenant string, server *model.Server, ...) error
- func (n *NginxConfigFileTemplete) WriteUpstream(set option.Config, tenant string, upstrems ...*model.Upstream) error
- type NginxServerContext
- type NginxUpstreamContext
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferPool ¶
BufferPool defines a Pool of Buffers
func NewBufferPool ¶
func NewBufferPool(s int) *BufferPool
NewBufferPool creates a new BufferPool with a custom buffer size
func (*BufferPool) Get ¶
func (bp *BufferPool) Get() *bytes.Buffer
Get returns a Buffer from the pool
func (*BufferPool) Put ¶
func (bp *BufferPool) Put(b *bytes.Buffer)
Put resets ans returns a Buffer to the pool
type NginxConfigFileTemplete ¶
type NginxConfigFileTemplete struct {
// contains filtered or unexported fields
}
NginxConfigFileTemplete nginx config file manage write by templete
func NewNginxConfigFileTemplete ¶
func NewNginxConfigFileTemplete() (*NginxConfigFileTemplete, error)
NewNginxConfigFileTemplete new nginx config file manage
func (*NginxConfigFileTemplete) ClearByTenant ¶
func (n *NginxConfigFileTemplete) ClearByTenant(tenant string) error
ClearByTenant clear tenant config
func (*NginxConfigFileTemplete) GetConfigFileDirPath ¶
func (n *NginxConfigFileTemplete) GetConfigFileDirPath() string
GetConfigFileDirPath get configfile dir path
func (*NginxConfigFileTemplete) NewNginxTemplate ¶
func (n *NginxConfigFileTemplete) NewNginxTemplate(data *model.Nginx) error
NewNginxTemplate new nginx main config
func (*NginxConfigFileTemplete) WriteServer ¶
func (n *NginxConfigFileTemplete) WriteServer(c option.Config, configtype, tenant string, servers ...*model.Server) error
WriteServer write server config
func (*NginxConfigFileTemplete) WriteServerAndUpstream ¶
func (n *NginxConfigFileTemplete) WriteServerAndUpstream(first bool, c option.Config, configType, tenant string, server *model.Server, upstream *model.Upstream) error
WriteServerAndUpstream wriete server
func (*NginxConfigFileTemplete) WriteUpstream ¶
func (n *NginxConfigFileTemplete) WriteUpstream(set option.Config, tenant string, upstrems ...*model.Upstream) error
WriteUpstream write upstream config
type NginxServerContext ¶
NginxServerContext nginx server config
type NginxUpstreamContext ¶
NginxUpstreamContext nginx upstream config
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template ...
func NewTemplate ¶
NewTemplate returns a new Template instance or an error if the specified template file contains errors