store

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2020 License: Apache-2.0 Imports: 16 Imported by: 9

Documentation

Index

Constants

View Source
const (
	CfgTypeMOSN     = "MOSN"
	CfgTypeRouter   = "Router"
	CfgTypeCluster  = "Cluster"
	CfgTypeListener = "Listener"
)
View Source
const ConfigAutoWrite featuregate.Feature = "auto_config"

Variables

This section is empty.

Functions

func AddService

func AddService(s *http.Server, name string, init func(), exit func())

func CloseService

func CloseService()

CloseService close the services directly

func Dump

func Dump() ([]byte, error)

Dump Dump all config

func GetMOSNConfig added in v0.13.0

func GetMOSNConfig(typ string) interface{}

func ListServiceListenersFile

func ListServiceListenersFile() ([]*os.File, error)

func RegisterOnStateChanged

func RegisterOnStateChanged(f OnStateChanged)

func RemoveClusterConfig

func RemoveClusterConfig(clusterName string)

func Reset

func Reset()

func SetClusterConfig

func SetClusterConfig(clusterName string, cluster v2.Cluster)

func SetHosts

func SetHosts(clusterName string, hostConfigs []v2.Host)

func SetListenerConfig

func SetListenerConfig(listenerName string, listenerConfig v2.Listener)

SetListenerConfig Set listener config when AddOrUpdateListener

func SetMosnConfig added in v0.11.0

func SetMosnConfig(cfg *v2.MOSNConfig)

func SetMosnState

func SetMosnState(s State)

func SetRouter

func SetRouter(routerName string, router v2.RouterConfiguration)

func SetStateCode

func SetStateCode(s State)

func StartService

func StartService(inheritListeners []net.Listener) error

func StopService

func StopService()

Types

type ConfigAutoFeature added in v0.11.0

type ConfigAutoFeature struct {
	featuregate.BaseFeatureSpec
	// contains filtered or unexported fields
}

ConfigAutoFeature controls xDS update config will overwrite config file or not, default is not

func (*ConfigAutoFeature) InitFunc added in v0.11.0

func (f *ConfigAutoFeature) InitFunc()

type OnStateChanged

type OnStateChanged func(s State)

type State

type State int
const (
	Init State = iota
	Running
	Active_Reconfiguring
	Passive_Reconfiguring
)

func GetMosnState

func GetMosnState() State

Jump to

Keyboard shortcuts

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