Documentation
¶
Index ¶
- func DefaultInitRuntimeStage(o *runtimeOptions, m *MosnRuntime) error
- type AppConfig
- type ErrInterceptor
- type ExtensionComponentConfig
- type MosnRuntime
- func (m *MosnRuntime) AppendInitRuntimeStage(f initRuntimeStage)
- func (m *MosnRuntime) GetInfo() *info.RuntimeInfo
- func (m *MosnRuntime) Run(opts ...Option) (mgrpc.RegisteredServer, error)
- func (m *MosnRuntime) RuntimeConfig() *MosnRuntimeConfig
- func (m *MosnRuntime) SetCustomComponent(kind string, name string, component custom.Component)
- func (m *MosnRuntime) Stop()
- type MosnRuntimeConfig
- type Option
- func WithConfigStoresFactory(configStores ...*configstores.StoreFactory) Option
- func WithCryptionServiceFactory(cryption ...*cryption.Factory) Option
- func WithCustomComponentFactory(kind string, factorys ...*custom.ComponentFactory) Option
- func WithEmailServiceFactory(email ...*email.Factory) Option
- func WithErrInterceptor(i ErrInterceptor) Option
- func WithExtensionGrpcAPI() Option
- func WithFileFactory(files ...*file.FileFactory) Option
- func WithGrpcAPI(apiFuncs ...rgrpc.NewGrpcAPI) Option
- func WithGrpcOptions(options ...grpc.ServerOption) Option
- func WithHelloFactory(hellos ...*hello.HelloFactory) Option
- func WithInputBindings(factorys ...*mbindings.InputBindingFactory) Option
- func WithLockFactory(factorys ...*runtime_lock.Factory) Option
- func WithNewServer(f rgrpc.NewServer) Option
- func WithOssFactory(oss ...*oss.Factory) Option
- func WithOutputBindings(factorys ...*mbindings.OutputBindingFactory) Option
- func WithPhoneCallServiceFactory(phone ...*phone.Factory) Option
- func WithPubSubFactory(factorys ...*pubsub.Factory) Option
- func WithRpcFactory(rpcs ...*rpc.Factory) Option
- func WithSecretStoresFactory(factorys ...*msecretstores.SecretStoresFactory) Option
- func WithSequencerFactory(factorys ...*runtime_sequencer.Factory) Option
- func WithSmsServiceFactory(sms ...*sms.Factory) Option
- func WithStateFactory(factorys ...*state.Factory) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultInitRuntimeStage ¶ added in v0.4.0
func DefaultInitRuntimeStage(o *runtimeOptions, m *MosnRuntime) error
Types ¶
type ErrInterceptor ¶
type ExtensionComponentConfig ¶ added in v0.5.0
type ExtensionComponentConfig struct { // "mosn.io/layotto/spec/proto/extension/v1/cryption" // cryption. CryptionService map[string]cryption.Config `json:"cryption"` // "mosn.io/layotto/spec/proto/extension/v1/email" // email. EmailService map[string]email.Config `json:"email"` // "mosn.io/layotto/spec/proto/extension/v1/phone" // phone. PhoneCallService map[string]phone.Config `json:"phone"` // "mosn.io/layotto/spec/proto/extension/v1/sms" // sms. SmsService map[string]sms.Config `json:"sms"` }
type MosnRuntime ¶
type MosnRuntime struct { Injector *ref.DefaultInjector // app callback AppCallbackConn *rawGRPC.ClientConn // contains filtered or unexported fields }
func NewMosnRuntime ¶
func NewMosnRuntime(runtimeConfig *MosnRuntimeConfig) *MosnRuntime
func (*MosnRuntime) AppendInitRuntimeStage ¶ added in v0.4.0
func (m *MosnRuntime) AppendInitRuntimeStage(f initRuntimeStage)
func (*MosnRuntime) GetInfo ¶
func (m *MosnRuntime) GetInfo() *info.RuntimeInfo
func (*MosnRuntime) Run ¶
func (m *MosnRuntime) Run(opts ...Option) (mgrpc.RegisteredServer, error)
func (*MosnRuntime) RuntimeConfig ¶ added in v0.4.0
func (m *MosnRuntime) RuntimeConfig() *MosnRuntimeConfig
func (*MosnRuntime) SetCustomComponent ¶ added in v0.4.0
func (m *MosnRuntime) SetCustomComponent(kind string, name string, component custom.Component)
func (*MosnRuntime) Stop ¶
func (m *MosnRuntime) Stop()
type MosnRuntimeConfig ¶
type MosnRuntimeConfig struct { AppManagement AppConfig `json:"app"` HelloServiceManagement map[string]hello.HelloConfig `json:"hellos"` ConfigStoreManagement map[string]configstores.StoreConfig `json:"config_store"` RpcManagement map[string]rpc.RpcConfig `json:"rpcs"` PubSubManagement map[string]pubsub.Config `json:"pub_subs"` StateManagement map[string]state.Config `json:"state"` Files map[string]file.FileConfig `json:"file"` Oss map[string]oss.Config `json:"oss"` LockManagement map[string]lock.Config `json:"lock"` SequencerManagement map[string]sequencer.Config `json:"sequencer"` Bindings map[string]bindings.Metadata `json:"bindings"` SecretStoresManagement map[string]secretstores.Metadata `json:"secret_store"` // <component type,component name,config> // e.g. <"super_pubsub","etcd",config> CustomComponent map[string]map[string]custom.Config `json:"custom_component,omitempty"` Extends map[string]json.RawMessage `json:"extends,omitempty"` // extend config ExtensionComponentConfig }
func ParseRuntimeConfig ¶
func ParseRuntimeConfig(data json.RawMessage) (*MosnRuntimeConfig, error)
type Option ¶
type Option func(o *runtimeOptions)
func WithConfigStoresFactory ¶
func WithConfigStoresFactory(configStores ...*configstores.StoreFactory) Option
func WithCryptionServiceFactory ¶ added in v0.5.0
func WithCustomComponentFactory ¶ added in v0.4.0
func WithCustomComponentFactory(kind string, factorys ...*custom.ComponentFactory) Option
func WithEmailServiceFactory ¶ added in v0.5.0
func WithErrInterceptor ¶
func WithErrInterceptor(i ErrInterceptor) Option
func WithExtensionGrpcAPI ¶ added in v0.5.0
func WithExtensionGrpcAPI() Option
func WithFileFactory ¶ added in v0.2.0
func WithFileFactory(files ...*file.FileFactory) Option
func WithGrpcAPI ¶ added in v0.4.0
func WithGrpcAPI(apiFuncs ...rgrpc.NewGrpcAPI) Option
func WithGrpcOptions ¶
func WithGrpcOptions(options ...grpc.ServerOption) Option
func WithHelloFactory ¶
func WithHelloFactory(hellos ...*hello.HelloFactory) Option
func WithInputBindings ¶ added in v0.2.0
func WithInputBindings(factorys ...*mbindings.InputBindingFactory) Option
WithInputBindings adds input binding components to the runtime.
func WithLockFactory ¶
func WithLockFactory(factorys ...*runtime_lock.Factory) Option
func WithNewServer ¶
func WithOssFactory ¶ added in v0.5.0
func WithOutputBindings ¶ added in v0.2.0
func WithOutputBindings(factorys ...*mbindings.OutputBindingFactory) Option
WithOutputBindings adds output binding components to the runtime.
func WithPhoneCallServiceFactory ¶ added in v0.5.0
func WithPubSubFactory ¶
func WithRpcFactory ¶
func WithSecretStoresFactory ¶ added in v0.4.0
func WithSecretStoresFactory(factorys ...*msecretstores.SecretStoresFactory) Option
func WithSequencerFactory ¶
func WithSequencerFactory(factorys ...*runtime_sequencer.Factory) Option
func WithSmsServiceFactory ¶ added in v0.5.0
func WithStateFactory ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.