processor

package
v0.20.15 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GwServiceKeyFunc

func GwServiceKeyFunc(obj interface{}) (string, error)

GwServiceKeyFunc key function for cache

Types

type GWUpdater

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

GWUpdater gw updater

func NewGWUpdater

func NewGWUpdater() *GWUpdater

NewGWUpdater create gw updater

func (*GWUpdater) SetGWClient

func (updater *GWUpdater) SetGWClient(gwClient gw.Interface)

SetGWClient set gw client for GWUpdater

func (*GWUpdater) SetOption

func (updater *GWUpdater) SetOption(opt *Option)

SetOption set command line option for GWUpdater

func (*GWUpdater) SetServiceClient

func (updater *GWUpdater) SetServiceClient(svcClient svcclient.Client)

SetServiceClient set service client for GWUpdater

func (*GWUpdater) Update

func (updater *GWUpdater) Update() error

Update implements Updater interface

type Option

type Option struct {
	TLSOption
	Port              int
	ServiceRegistry   string
	Cluster           string
	BackendIPType     string
	Kubeconfig        string
	GwZkHosts         string
	GwZkPath          string
	GwBizID           string
	ServiceLabel      map[string]string
	DomainLabelKey    string
	ProxyPortLabelKey string
	PortLabelKey      string
	PathLabelKey      string
	UpdatePeriod      int
	NodeSyncPeriod    int
	SyncPeriod        int
}

Option options

type Processor

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

Processor gw controller core processor

func NewProcessor

func NewProcessor(opt *Option) (*Processor, error)

NewProcessor new processor

func (*Processor) Handle

func (p *Processor) Handle()

Handle handle update

func (*Processor) Run

func (p *Processor) Run()

Run run processor loop

func (*Processor) SetUpdated

func (p *Processor) SetUpdated()

SetUpdated set update flag

func (*Processor) Stop

func (p *Processor) Stop()

Stop stop processor

type TLSOption

type TLSOption struct {
	CaFile         string
	ServerCertFile string
	ServerKeyFile  string
	ClientCertFile string
	ClientKeyFile  string
}

TLSOption tls option

type Updater

type Updater interface {
	Update() error
}

Updater interface

Jump to

Keyboard shortcuts

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