extensions

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NginxConfigDir      = "/etc/nginx"
	NginxConfigFilePath = NginxConfigDir + "/nginx.conf"
)

Nginx consts

Functions

This section is empty.

Types

type Watcher

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

Watcher is the extension that watches for kubernetes services changes

func NewWatcher

func NewWatcher(config *viper.Viper, clientset kubernetes.Interface) (*Watcher, error)

NewWatcher creates a new watcher with chosen clientset If clientset is nil, creates a inCluster clientset

func (*Watcher) Build

func (w *Watcher) Build() (*models.RouterConfig, error)

Build construct the routerConfig of cluster

func (*Watcher) CreateConfigFile

func (w *Watcher) CreateConfigFile(fs models.FileSystem) error

CreateConfigFile make nginx directory (if not exists) and create nginx config file.

func (*Watcher) GetMyStackServices

func (w *Watcher) GetMyStackServices() (*v1.ServiceList, error)

GetMyStackServices return list of services running on k8s

func (*Watcher) Start

Start starts the watcher, this call is blocking!

Jump to

Keyboard shortcuts

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