worker

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package worker ensure the expected named ports are set on all node pools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PortMapper

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

PortMapper is worker synchronizing GCP named ports and services annotations

func NewWorker

func NewWorker(config *config.KnpConfig) *PortMapper

NewWorker returns a PortMapper worker

func (*PortMapper) Add

func (p *PortMapper) Add(name string, port int64)

Add declares a named port we want to keep in sync with GCP

func (*PortMapper) AddMap added in v0.4.0

func (p *PortMapper) AddMap(ports np.PortList)

AddMap add several ports in one go

func (*PortMapper) Start

func (p *PortMapper) Start()

Start launchs the PortMapper worker

func (*PortMapper) Stop

func (p *PortMapper) Stop()

Stop stops the PortMapper worker

type Worker

type Worker interface {
	Start()
	Stop()
	Add(name string, port int64)
	AddMap(ports np.PortList)
}

Worker ensure the expected named ports are set on all node pools.

Jump to

Keyboard shortcuts

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