(ctx context.Context, clusterId string, clientDriver gateway.IClientDriver)
| 48 | return nil |
| 49 | } |
| 50 | func (m *imlPluginClusterModule) initGateway(ctx context.Context, clusterId string, clientDriver gateway.IClientDriver) error { |
| 51 | configForPartitions, err := m.service.ListCluster(ctx, clusterId) |
| 52 | if err != nil { |
| 53 | return err |
| 54 | } |
| 55 | pluginConfigs := utils.SliceToSlice(configForPartitions, func(s *plugin_cluster.ConfigPartition) *gateway.PluginConfig { |
| 56 | |
| 57 | return &gateway.PluginConfig{ |
| 58 | Id: s.Extend, |
| 59 | Name: s.Plugin, |
| 60 | Config: s.Config.Config, |
| 61 | Status: s.Status.String(), |
| 62 | } |
| 63 | }) |
| 64 | |
| 65 | return clientDriver.PluginSetting().Set(ctx, pluginConfigs) |
| 66 | } |
| 67 | func (m *imlPluginClusterModule) GetDefine(ctx context.Context, name string) (*dto.Define, error) { |
| 68 | define, err := m.service.GetDefine(ctx, name) |
| 69 | if err != nil { |
no test coverage detected