Documentation
¶
Index ¶
- type Generation
- type GenerationModel
- type ModelGeneration
- type ModelGenerationAPI
- func (m *ModelGenerationAPI) AddGeneration(arg params.Entity) (params.ErrorResult, error)
- func (m *ModelGenerationAPI) AdvanceGeneration(arg params.AdvanceGenerationArg) (params.AdvanceGenerationResult, error)
- func (m *ModelGenerationAPI) CancelGeneration(arg params.Entity) (params.ErrorResult, error)
- func (m *ModelGenerationAPI) HasNextGeneration(arg params.Entity) (params.BoolResult, error)
- type ModelGenerationState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generation ¶
type Generation interface { AssignAllUnits(string) error AssignUnit(string) error MakeCurrent() error AutoComplete() (bool, error) Refresh() error }
Generation defines the methods used by a generation.
type GenerationModel ¶
type GenerationModel interface { AddGeneration() error NextGeneration() (Generation, error) HasNextGeneration() (bool, error) }
type ModelGeneration ¶
type ModelGeneration interface { AddGeneration() (params.ErrorResult, error) AdvanceGeneration(args params.Entities) (params.ErrorResults, error) SwitchGeneration(arg params.GenerationVersionArg) (params.ErrorResult, error) }
ModelGeneration defines the methods exported by the model generation API facade.
type ModelGenerationAPI ¶
type ModelGenerationAPI struct {
// contains filtered or unexported fields
}
ModelGenerationAPI implements the ModelGeneration interface and is the concrete implementation of the API endpoint.
func NewModelGenerationAPI ¶
func NewModelGenerationAPI( st ModelGenerationState, authorizer facade.Authorizer, m GenerationModel, ) (*ModelGenerationAPI, error)
NewModelGenerationAPI creates a new API endpoint for dealing with model generations.
func NewModelGenerationFacade ¶
func NewModelGenerationFacade(ctx facade.Context) (*ModelGenerationAPI, error)
NewModelGenerationFacade provides the signature required for facade registration.
func (*ModelGenerationAPI) AddGeneration ¶
func (m *ModelGenerationAPI) AddGeneration(arg params.Entity) (params.ErrorResult, error)
AddGeneration adds a 'next' generation to the given model.
func (*ModelGenerationAPI) AdvanceGeneration ¶
func (m *ModelGenerationAPI) AdvanceGeneration(arg params.AdvanceGenerationArg) (params.AdvanceGenerationResult, error)
AdvanceGeneration, adds the provided unit(s) and/or application(s) to the "next" generation. If the generation can auto complete, it is made the "current" generation.
func (*ModelGenerationAPI) CancelGeneration ¶
func (m *ModelGenerationAPI) CancelGeneration(arg params.Entity) (params.ErrorResult, error)
CancelGeneration cancels the 'next' generation if cancel criteria are met.
func (*ModelGenerationAPI) HasNextGeneration ¶
func (m *ModelGenerationAPI) HasNextGeneration(arg params.Entity) (params.BoolResult, error)
HasNextGeneration returns a true result if the input model has a "next" generation that has not yet been completed.
type ModelGenerationState ¶
type ModelGenerationState interface { ControllerTag() names.ControllerTag Model() (GenerationModel, error) }
ModelGenerationState represents the state of an model required by the ModelGeneration.