nginx

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultNginxDir = "/usr/local/nginx/conf/nginx.conf"

DefaultNginxDir ...

Functions

This section is empty.

Types

type ConfScanner

type ConfScanner struct {
	// contains filtered or unexported fields
}

ConfScanner ...

func NewScanner

func NewScanner(confDir string, enable bool) *ConfScanner

NewScanner ...

func (*ConfScanner) C

func (c *ConfScanner) C() <-chan *structs.NginxConfExt

C consume the chan program

func (*ConfScanner) Close

func (c *ConfScanner) Close() error

Close ...

func (*ConfScanner) Scan

func (c *ConfScanner) Scan() ([]*structs.NginxConfExt, error)

Scan ...

func (*ConfScanner) Start

func (c *ConfScanner) Start() error

Start ...

type Config

type Config struct {
	Dir    string `json:"dir"`    // 配置中心nginx具体配置路径
	Enable bool   `json:"enable"` // 是否开启开插件
}

Config ...

func DefaultConfig

func DefaultConfig() Config

DefaultConfig return default config

func RawConfig

func RawConfig(key string) *Config

RawConfig ...

func StdConfig

func StdConfig(key string) *Config

StdConfig 返回标准配置信息

func (*Config) Build

func (c *Config) Build() *ConfScanner

Build new a instance

type ConfigBlock

type ConfigBlock = parser.NginxConfigureBlock

Config nginx config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL