Exemple #1
0
func (p *MockPolicy) ConstraintsValidator(cfg *config.Config, querier state.SupportedArchitecturesQuerier) (constraints.Validator, error) {
	if p.GetConstraintsValidator != nil {
		return p.GetConstraintsValidator(cfg, querier)
	}
	return nil, errors.NewNotImplemented(nil, "ConstraintsValidator")
}
Exemple #2
0
func (p *MockPolicy) InstanceDistributor(cfg *config.Config) (state.InstanceDistributor, error) {
	if p.GetInstanceDistributor != nil {
		return p.GetInstanceDistributor(cfg)
	}
	return nil, errors.NewNotImplemented(nil, "InstanceDistributor")
}
Exemple #3
0
func (p *mockPolicy) ConstraintsValidator(cfg *config.Config) (constraints.Validator, error) {
	if p.getConstraintsValidator != nil {
		return p.getConstraintsValidator(cfg)
	}
	return nil, errors.NewNotImplemented(nil, "ConstraintsValidator")
}