Documentation ¶
Index ¶
- func CreateClient(protocol string, config interface{}) types.MockClient
- func CreateServer(protocol string, config interface{}) types.MockServer
- func InitMosn(mosnConfigStr string, srvConfigs ...*Config) (m *mosn.MosnOperator, servers []types.MockServer)
- func RegisterCreateClient(protocol string, f CreateMockClient)
- func RegisterCreateServer(protocol string, f CreateMockServer)
- type Config
- type CreateMockClient
- type CreateMockServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClient ¶ added in v0.16.0
func CreateClient(protocol string, config interface{}) types.MockClient
func CreateServer ¶ added in v0.16.0
func CreateServer(protocol string, config interface{}) types.MockServer
func InitMosn ¶ added in v0.16.0
func InitMosn(mosnConfigStr string, srvConfigs ...*Config) (m *mosn.MosnOperator, servers []types.MockServer)
InitMosn simplify MOSN test case with test framework Most cases can use the functions instead of `Setup` and `TearDown` This function also needs to be called in framework.Scenario
func RegisterCreateClient ¶ added in v0.16.0
func RegisterCreateClient(protocol string, f CreateMockClient)
func RegisterCreateServer ¶ added in v0.16.0
func RegisterCreateServer(protocol string, f CreateMockServer)
Types ¶
type Config ¶ added in v0.16.0
type Config struct { Protocol string `json:"protocol"` Config interface{} `json:"config"` }
func CreateConfig ¶ added in v0.16.0
CreateConfig translate config string to Config
type CreateMockClient ¶ added in v0.16.0
type CreateMockClient func(config interface{}) types.MockClient
type CreateMockServer ¶ added in v0.16.0
type CreateMockServer func(config interface{}) types.MockServer
Click to show internal directories.
Click to hide internal directories.