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 ¶
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 ¶
func (w *Watcher) Start(ng nginx.NginxInterface, fs models.FileSystem) error
Start starts the watcher, this call is blocking!
Click to show internal directories.
Click to hide internal directories.