store

package
v0.0.0-...-cb950d2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 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

func SetMOSNConfig(msonConfig interface{})

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 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