import "github.com/goodrain/rainbond/gateway/controller/openresty/template"
buffer_pool.go func_map.go templete_manage.go
BufferPool defines a Pool of Buffers
func NewBufferPool(s int) *BufferPool
NewBufferPool creates a new BufferPool with a custom buffer size
func (bp *BufferPool) Get() *bytes.Buffer
Get returns a Buffer from the pool
func (bp *BufferPool) Put(b *bytes.Buffer)
Put resets ans returns a Buffer to the pool
type NginxConfigFileTemplete struct {
// contains filtered or unexported fields
}
NginxConfigFileTemplete nginx config file manage write by templete
func NewNginxConfigFileTemplete() (*NginxConfigFileTemplete, error)
NewNginxConfigFileTemplete new nginx config file manage
func (n *NginxConfigFileTemplete) ClearByTenant(tenant string) error
ClearByTenant clear tenant config
func (n *NginxConfigFileTemplete) GetConfigFileDirPath() string
GetConfigFileDirPath get configfile dir path
func (n *NginxConfigFileTemplete) NewNginxTemplate(data *model.Nginx) error
NewNginxTemplate new nginx main config
func (n *NginxConfigFileTemplete) WriteServer(c option.Config, configtype, tenant string, servers ...*model.Server) error
WriteServer write server config
func (n *NginxConfigFileTemplete) WriteUpstream(set option.Config, tenant string, upstrems ...*model.Upstream) error
WriteUpstream write upstream config
NginxServerContext nginx server config
NginxUpstreamContext nginx upstream config
type Template struct {
// contains filtered or unexported fields
}
Template ...
NewTemplate returns a new Template instance or an error if the specified template file contains errors
Package template imports 18 packages (graph) and is imported by 1 packages. Updated 2019-10-16. Refresh now. Tools for package owners.