Documentation
¶
Index ¶
- func CheckDependencies(module *app.M4DModule, moduleMap map[string]*app.M4DModule) ([]string, []string)
- type DataDetails
- type DataInfo
- type ModuleInstanceSpec
- type Selector
- func (m *Selector) AddModuleInstances(args *app.ModuleArguments, item DataInfo, cluster string) []ModuleInstanceSpec
- func (m *Selector) GetDependencies() []*app.M4DModule
- func (m *Selector) GetError() string
- func (m *Selector) GetModule() *app.M4DModule
- func (m *Selector) SelectCluster(item DataInfo, clusters []multicluster.Cluster) (string, error)
- func (m *Selector) SelectModule(moduleMap map[string]*app.M4DModule) bool
- func (m *Selector) SupportsDependencies(module *app.M4DModule, moduleMap map[string]*app.M4DModule) bool
- func (m *Selector) SupportsGovernanceAction(module *app.M4DModule, action *pb.EnforcementAction) bool
- func (m *Selector) SupportsGovernanceActions(module *app.M4DModule, actions []*pb.EnforcementAction) bool
- func (m *Selector) SupportsInterface(module *app.M4DModule) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataDetails ¶
type DataDetails struct {
// Name of the asset
Name string
// Interface is the protocol and format
Interface app.InterfaceDetails
// Geography is the geo-location of the asset
Geography string
// Connection is the connection details in raw format as received from the connector
Connection runtime.RawExtension
// Metadata
Metadata *pb.DatasetMetadata
}
DataDetails is the information received from the catalog connector
type DataInfo ¶
type DataInfo struct {
// Source connection details
DataDetails *DataDetails
// Data asset credentials
Credentials *pb.DatasetCredentials
// The path to Vault secret which holds the dataset credentials
VaultSecretPath string
// Pointer to the relevant data context in the M4D application spec
Context *app.DataContext
}
DataInfo defines all the information about the given data set that comes from the m4dapplication spec and from the connectors.
type ModuleInstanceSpec ¶
type ModuleInstanceSpec struct {
Module *app.M4DModule
Args *app.ModuleArguments
AssetID string
ClusterName string
}
ModuleInstanceSpec consists of the module spec and arguments
type Selector ¶
type Selector struct {
Module *app.M4DModule
Dependencies []*app.M4DModule
Message string
Flow app.ModuleFlow
Source *app.InterfaceDetails
Destination *app.InterfaceDetails
// Actions that the module will perform
Actions []*pb.EnforcementAction
// Geography where the module will be orchestrated
Geo string
}
Selector is responsible for finding an appropriate module
func (*Selector) AddModuleInstances ¶
func (m *Selector) AddModuleInstances(args *app.ModuleArguments, item DataInfo, cluster string) []ModuleInstanceSpec
AddModuleInstances creates module instances for the selected module and its dependencies
func (*Selector) GetDependencies ¶
GetDependencies returns dependencies of a selected module
func (*Selector) SelectCluster ¶
SelectCluster chooses where the module runs Current logic: Read is done at target (processing geography) Copy is done at source when transformations are required, and at target - otherwise Write is done at target
func (*Selector) SelectModule ¶
SelectModule finds the module that fits the requirements
func (*Selector) SupportsDependencies ¶
func (m *Selector) SupportsDependencies(module *app.M4DModule, moduleMap map[string]*app.M4DModule) bool
SupportsDependencies checks whether the module supports the dependency requirements
func (*Selector) SupportsGovernanceAction ¶
func (m *Selector) SupportsGovernanceAction(module *app.M4DModule, action *pb.EnforcementAction) bool
SupportsGovernanceAction checks whether the module supports the required agovernance action
func (*Selector) SupportsGovernanceActions ¶
func (m *Selector) SupportsGovernanceActions(module *app.M4DModule, actions []*pb.EnforcementAction) bool
SupportsGovernanceActions checks whether the module supports the required agovernance actions