app

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultEnvoyConfigPath          = "C:\\etc\\cf-assets\\envoy_config\\envoy.yaml"
	DefaultSdsCertAndKeysPath       = "C:\\etc\\cf-assets\\envoy_config\\sds-server-cert-and-key.yaml"
	DefaultSdsValidationContextPath = "C:\\etc\\cf-assets\\envoy_config\\sds-server-validation-context.yaml"
)

Variables

This section is empty.

Functions

func WatchFile

func WatchFile(filepath string, readyChan chan bool, callback func() error) error

readyChan tell when the watcher is ready

Types

type App

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

func NewApp

func NewApp(logger logger, cmd cmd, tailer tailer, envoyConfig string) App

func (App) GetNginxPath

func (a App) GetNginxPath() (path string, err error)

Searching for nginx.exe in the same directory that our app binary is running in.

func (App) Run added in v0.6.0

func (a App) Run(nginxConfDir, nginxBinPath, sdsCreds, sdsValidation string) error

Setting up nginx config and directory. Creating two goroutines: one to watch the sds creds file and reload nginx when the creds rotate, the other to start nginx.

func (*App) SetNginxBin added in v0.6.0

func (a *App) SetNginxBin(nginxPath string)

type Cmd

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

func NewCmd

func NewCmd(stdout, stderr io.Writer) Cmd

func (Cmd) Run

func (c Cmd) Run(binary string, arg ...string) (err error)

type Flags

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

func NewFlags

func NewFlags() Flags

func (Flags) Parse

func (f Flags) Parse(args []string) Options

type LogTailer added in v0.2.0

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

func NewLogTailer added in v0.2.0

func NewLogTailer(logger logger) LogTailer

func (LogTailer) Tail added in v0.2.0

func (l LogTailer) Tail(errorLog string) error

type Logger

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

func NewLogger

func NewLogger(writer io.Writer) *Logger

func (*Logger) Println

func (l *Logger) Println(v ...interface{})

type Options

type Options struct {
	EnvoyConfig   string
	SdsCreds      string
	SdsValidation string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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