Documentation ¶
Index ¶
- Constants
- func DefaultInitStage(c *v2.MOSNConfig)
- func DefaultPreStartStage(m *Mosn)
- func DefaultStartStage(m *Mosn)
- func InitDebugServe(c *v2.MOSNConfig)
- func InitDefaultPath(c *v2.MOSNConfig)
- func InitializeMetrics(c *v2.MOSNConfig)
- func InitializePidFile(c *v2.MOSNConfig)
- func InitializePlugin(c *v2.MOSNConfig)
- func InitializeThirdPartCodec(c *v2.MOSNConfig)
- func InitializeTracing(c *v2.MOSNConfig)
- func InitializeWasm(c *v2.MOSNConfig)
- type Data
- type Mosn
- type StageManager
- func (stm *StageManager) AppendAfterStartStage(f func(*Mosn)) *StageManager
- func (stm *StageManager) AppendAfterStopStage(f func(*Mosn)) *StageManager
- func (stm *StageManager) AppendInitStage(f func(*v2.MOSNConfig)) *StageManager
- func (stm *StageManager) AppendParamsParsedStage(f func(*cli.Context)) *StageManager
- func (stm *StageManager) AppendPreStartStage(f func(*Mosn)) *StageManager
- func (stm *StageManager) AppendStartStage(f func(*Mosn)) *StageManager
- func (stm *StageManager) Run()
- func (stm *StageManager) Stop()
- func (stm *StageManager) WaitFinish()
- type UpgradeData
Constants ¶
const (
DefaultLoaderFunctionName string = "LoadCodec"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultInitStage ¶ added in v0.22.0
func DefaultInitStage(c *v2.MOSNConfig)
Default Init Stage wrappers. if more initialize needs to extend. modify it in main function
func DefaultPreStartStage ¶ added in v0.22.0
func DefaultPreStartStage(m *Mosn)
Default Pre-start Stage wrappers
func DefaultStartStage ¶ added in v0.22.0
func DefaultStartStage(m *Mosn)
Default Start Stage wrappers
func InitDefaultPath ¶ added in v0.26.0
func InitDefaultPath(c *v2.MOSNConfig)
func InitializeMetrics ¶ added in v0.22.0
func InitializeMetrics(c *v2.MOSNConfig)
func InitializePidFile ¶ added in v0.22.0
func InitializePidFile(c *v2.MOSNConfig)
func InitializePlugin ¶ added in v0.22.0
func InitializePlugin(c *v2.MOSNConfig)
func InitializeThirdPartCodec ¶ added in v0.22.0
func InitializeThirdPartCodec(c *v2.MOSNConfig)
func InitializeTracing ¶ added in v0.22.0
func InitializeTracing(c *v2.MOSNConfig)
Init Stages Function
func InitializeWasm ¶ added in v0.22.0
func InitializeWasm(c *v2.MOSNConfig)
Types ¶
type Data ¶ added in v0.22.0
type Data struct {
// contains filtered or unexported fields
}
Data contains objects used in stages
type Mosn ¶
type Mosn struct { Upgrade UpgradeData Clustermanager types.ClusterManager RouterManager types.RouterManager Config *v2.MOSNConfig // contains filtered or unexported fields }
func NewMosn ¶
func NewMosn(c *v2.MOSNConfig) *Mosn
func (*Mosn) CleanUpgrade ¶ added in v0.22.0
func (m *Mosn) CleanUpgrade()
func (*Mosn) HandleExtendConfig ¶ added in v0.22.0
func (m *Mosn) HandleExtendConfig()
func (*Mosn) StartXdsClient ¶ added in v0.22.0
StartXdsClient returns a ADSClient, support some extensions on it.
func (*Mosn) TransferConnection ¶ added in v0.22.0
func (m *Mosn) TransferConnection()
type StageManager ¶ added in v0.22.0
type StageManager struct {
// contains filtered or unexported fields
}
StageManager is a stage manager that controls startup stages running. We divide the startup into six stages: 1. The parameters parsed stage. In this stage, parse different parameters from cli.Context, and finally call config load to create a MOSNConfig. 2. The initialize stage. In this stage, do some init actions based on config, and finally create a MOSN object. 3. The pre-startup stage. In this stage, creates some basic instance from MOSN object. 4. The startup stage. In this stage, do some startup actions such as connections transfer for smooth upgrade and so on. 5. The after-start stage. In this stage, do some other init actions after startup. 6. The after-stop stage. In this stage, do some clean up actions after mosn closed. The difference between pre-startup stage and startup stage is that startup stage has already accomplished the resources that used to startup mosn.
func NewStageManager ¶ added in v0.22.0
func NewStageManager(ctx *cli.Context, path string) *StageManager
func (*StageManager) AppendAfterStartStage ¶ added in v0.26.0
func (stm *StageManager) AppendAfterStartStage(f func(*Mosn)) *StageManager
func (*StageManager) AppendAfterStopStage ¶ added in v0.26.0
func (stm *StageManager) AppendAfterStopStage(f func(*Mosn)) *StageManager
func (*StageManager) AppendInitStage ¶ added in v0.22.0
func (stm *StageManager) AppendInitStage(f func(*v2.MOSNConfig)) *StageManager
func (*StageManager) AppendParamsParsedStage ¶ added in v0.22.0
func (stm *StageManager) AppendParamsParsedStage(f func(*cli.Context)) *StageManager
func (*StageManager) AppendPreStartStage ¶ added in v0.22.0
func (stm *StageManager) AppendPreStartStage(f func(*Mosn)) *StageManager
func (*StageManager) AppendStartStage ¶ added in v0.22.0
func (stm *StageManager) AppendStartStage(f func(*Mosn)) *StageManager
func (*StageManager) Run ¶ added in v0.22.0
func (stm *StageManager) Run()
Run blocks until the mosn is closed
func (*StageManager) Stop ¶ added in v0.26.0
func (stm *StageManager) Stop()
free resourse at the end TODO: may introduce other stages here, like: "before-stop", "stop".
func (*StageManager) WaitFinish ¶ added in v0.22.0
func (stm *StageManager) WaitFinish()
WaitFinish waits mosn start finished. if Run is not called, return directly
type UpgradeData ¶ added in v0.22.0
type UpgradeData struct { InheritListeners []net.Listener InheritPacketConn []net.PacketConn ListenSockConn net.Conn }
UpgradeData stores datas that are used to smooth upgrade