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

package template

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

Index

Package Files

buffer_pool.go func_map.go template_linux.go

Variables

var (

    //CustomConfigPath custom config file path
    CustomConfigPath = "/run/nginx/conf"
)

func NewNginxTemplate Uses

func NewNginxTemplate(data *model.Nginx, defaultNginxConf string) error

NewNginxTemplate creates a nginx configuration file(nginx.conf)

func NewServerTemplate Uses

func NewServerTemplate(data *ServerContext, filename string) error

NewServerTemplate creates a configuration file for the nginx server module

func NewServerTemplateWithCfgPath Uses

func NewServerTemplateWithCfgPath(data *ServerContext, cfgPath string, filename string) error

NewServerTemplateWithCfgPath creates a configuration file for the nginx server module

func NewUpdateUpsTemplate Uses

func NewUpdateUpsTemplate(data []model.Upstream, tmpl, path string, filename string) error

NewUpdateUpsTemplate creates a configuration file for the nginx upstream module

func NewUpstreamTemplate Uses

func NewUpstreamTemplate(data []model.Upstream, tmpl, filename string) error

NewUpstreamTemplate creates a configuration file for the nginx upstream module

func NewUpstreamTemplateWithCfgPath Uses

func NewUpstreamTemplateWithCfgPath(data []*model.Upstream, tmpl, cfgPath string, filename string) error

NewUpstreamTemplateWithCfgPath creates a configuration file for the nginx upstream module

func Persist Uses

func Persist(tmplFilename string, data interface{}, p string, f string) error

Persist persists the nginx configuration file to disk

type BufferPool Uses

type BufferPool struct {
    sync.Pool
}

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 ServerContext Uses

type ServerContext struct {
    Servers []*model.Server
    Set     option.Config
}

ServerContext ServerContext

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 16 packages (graph) and is imported by 1 packages. Updated 2019-07-04. Refresh now. Tools for package owners.