config

package
v5.0.1-release+incompa... Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2019 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VSPoolExpString string = "(.*)[@|_](.*)_([0-9]*)\\.[Pool|VS]"
	NodeExpString   string = "(.*)_([0-9]*)\\.Node"
	DomainAPIURI    string = "http://127.0.0.1:%s/v2/tenants/%s/services/%s/domains"
)

Variables

This section is empty.

Functions

func NewPodsController

func NewPodsController(lw cache.ListerWatcher, period time.Duration, ch chan<- PodUpdate) cache.Controller

NewPodsController creates a controller that is watching pods and sending updates into pods channel.

func NewServiceController

func NewServiceController(lw cache.ListerWatcher, period time.Duration, ch chan<- ServiceUpdate) cache.Controller

NewServiceController creates a controller that is watching services and sending updates into ServiceUpdate channel.

func NewSourceAPI

func NewSourceAPI(c cache.Getter, period time.Duration, servicesChan chan<- ServiceUpdate, podsChan chan<- PodUpdate, stopCh <-chan struct{})

NewSourceAPI creates config source that watches for changes to the services and pods.

Types

type GainService

type GainService interface {
	RePoolName()
	ReVSName()
	ReNodeName()
	ReRuleName()
	ReServiceId()
}

GainService GainService

type Operation

type Operation int

Operation is a type of operation of services or endpoints.

const (
	ADD Operation = iota
	UPDATE
	REMOVE
	SYNCED
)

These are the available operation types.

type PodInfo

type PodInfo struct {
	PodName string
	Port    string
}

type PodUpdate

type PodUpdate struct {
	Pod *v1.Pod
	Op  Operation
}

PodUpdate describes an operation of endpoints, sent on the channel. You can add, update or remove single endpoints by setting Op == ADD|UPDATE|REMOVE.

type ServiceInfo

type ServiceInfo struct {
	Namespace string
	SerName   string
	Port      string
	Index     int64
}

ServiceInfo ServiceInfo

type ServiceUpdate

type ServiceUpdate struct {
	Service *v1.Service
	Op      Operation
}

ServiceUpdate describes an operation of services, sent on the channel. You can add, update or remove single service by setting Op == ADD|UPDATE|REMOVE.

type SourceBranch

type SourceBranch struct {
	Tenant          string
	Service         string
	Domain          []string
	Port            int32
	Index           int64
	PodName         string
	ContainerPort   int32
	CertificateName string
	Method          core.EventMethod
	LBMapPort       string
	Protocol        string
	Note            string
	IsMidonet       bool
	Host            string
	State           string
	PodStatus       bool
	NodePort        int32
	Version         string
	Namespace       string
	EventID         string
	OriginPort      string
}

SourceBranch SourceBranch

func (*SourceBranch) ReNodeName

func (s *SourceBranch) ReNodeName() string

func (*SourceBranch) RePoolName

func (s *SourceBranch) RePoolName() string

func (*SourceBranch) ReRuleName

func (s *SourceBranch) ReRuleName(domain string) string

func (*SourceBranch) ReServiceId

func (s *SourceBranch) ReServiceId() string

func (*SourceBranch) ReVSName

func (s *SourceBranch) ReVSName() string

Jump to

Keyboard shortcuts

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