)
var (
- SupportedSdls = []*SdlEngineConfig{
- &SdlEngineConfig{
- Name: "file",
- Version: "v1",
- Protocol: "rawfile",
- Instance: NewFile(),
+ SupportedSdls = []*EngineConfig{
+ {
+ Name: "file",
+ Version: "v1",
+ Protocol: "rawfile",
+ Instance: NewFile(),
IsAvailable: true,
},
- &SdlEngineConfig{
- Name: "redis",
- Version: "v1",
- Protocol: "ndsl",
- Instance: nil,
+ {
+ Name: "redis",
+ Version: "v1",
+ Protocol: "ndsl",
+ Instance: nil,
IsAvailable: false,
},
}
)
-func GetSdl(sdlName string) (SdlEngine, error) {
+func GetSdl(sdlName string) (Engine, error) {
for _, sdl := range SupportedSdls {
if sdl.Name == sdlName && sdl.IsAvailable {
return sdl.Instance, nil
}
type Sdl struct {
-
}