Documentation ¶
Index ¶
- type BufferPool
- type NginxConfigFileTemplete
- func (n *NginxConfigFileTemplete) ClearByTenantEnv(tenantEnv string) error
- func (n *NginxConfigFileTemplete) GetConfigFileDirPath() string
- func (n *NginxConfigFileTemplete) NewNginxTemplate(data *model.Nginx) error
- func (n *NginxConfigFileTemplete) WriteServer(c option.Config, configtype, tenantEnv string, servers ...*model.Server) 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) ClearByTenantEnv ¶ added in v1.1.0
func (n *NginxConfigFileTemplete) ClearByTenantEnv(tenantEnv string) error
ClearByTenantEnv clear tenant env 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, tenantEnv string, servers ...*model.Server) error
WriteServer write server config
type NginxServerContext ¶
type NginxServerContext struct { Servers []*model.Server TCPBackends []*model.Server UDPBackends []*model.Server Set option.Config }
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