forked from intel/intent-driven-orchestration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterface.go
21 lines (18 loc) · 779 Bytes
/
interface.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package planner
import (
"github.com/intel/intent-driven-orchestration/pkg/common"
)
// Action holds information for a particular action.
type Action struct {
Name string
Properties interface{}
}
// Planner represents the basic interface all planners should adhere too.
type Planner interface {
// CreatePlan creates a plan based on the given current and desired state.
CreatePlan(current common.State, desired common.State, profiles map[string]common.Profile) []Action
// ExecutePlan triggers the planner to actually perform the Plan.
ExecutePlan(common.State, []Action)
// TriggerEffect triggers all actuators planning actuators to (optionally) reflect on the effect of their actions.
TriggerEffect(current common.State, profiles map[string]common.Profile)
}