rainbond: github.com/goodrain/rainbond/gateway/controller/openresty/template Index | Files

package template

import "github.com/goodrain/rainbond/gateway/controller/openresty/template"


Package Files

buffer_pool.go func_map.go templete_manage.go

type BufferPool Uses

type BufferPool struct {

BufferPool defines a Pool of Buffers

func NewBufferPool Uses

func NewBufferPool(s int) *BufferPool

NewBufferPool creates a new BufferPool with a custom buffer size

func (*BufferPool) Get Uses

func (bp *BufferPool) Get() *bytes.Buffer

Get returns a Buffer from the pool

func (*BufferPool) Put Uses

func (bp *BufferPool) Put(b *bytes.Buffer)

Put resets ans returns a Buffer to the pool

type NginxConfigFileTemplete Uses

type NginxConfigFileTemplete struct {
    // contains filtered or unexported fields

NginxConfigFileTemplete nginx config file manage write by templete

func NewNginxConfigFileTemplete Uses

func NewNginxConfigFileTemplete() (*NginxConfigFileTemplete, error)

NewNginxConfigFileTemplete new nginx config file manage

func (*NginxConfigFileTemplete) ClearByTenant Uses

func (n *NginxConfigFileTemplete) ClearByTenant(tenant string) error

ClearByTenant clear tenant config

func (*NginxConfigFileTemplete) GetConfigFileDirPath Uses

func (n *NginxConfigFileTemplete) GetConfigFileDirPath() string

GetConfigFileDirPath get configfile dir path

func (*NginxConfigFileTemplete) NewNginxTemplate Uses

func (n *NginxConfigFileTemplete) NewNginxTemplate(data *model.Nginx) error

NewNginxTemplate new nginx main config

func (*NginxConfigFileTemplete) WriteServer Uses

func (n *NginxConfigFileTemplete) WriteServer(c option.Config, configtype, tenant string, servers ...*model.Server) error

WriteServer write server config

func (*NginxConfigFileTemplete) WriteUpstream Uses

func (n *NginxConfigFileTemplete) WriteUpstream(set option.Config, tenant string, upstrems ...*model.Upstream) error

WriteUpstream write upstream config

type NginxServerContext Uses

type NginxServerContext struct {
    Server *model.Server
    Set    option.Config

NginxServerContext nginx server config

type NginxUpstreamContext Uses

type NginxUpstreamContext struct {
    Upstream *model.Upstream
    Set      option.Config

NginxUpstreamContext nginx upstream config

type Template Uses

type Template struct {
    // contains filtered or unexported fields

Template ...

func NewTemplate Uses

func NewTemplate(fileName string) (*Template, error)

NewTemplate returns a new Template instance or an error if the specified template file contains errors

func (*Template) Write Uses

func (t *Template) Write(conf interface{}) ([]byte, error)

Package template imports 18 packages (graph) and is imported by 1 packages. Updated 2019-10-16. Refresh now. Tools for package owners.