Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseIntent ¶
type BaseIntent struct { // Dependencies maps type of dependent intents to set of theirs uuids Dependencies map[string]UUIDSet }
BaseIntent implements the default Evaluate interface
func (*BaseIntent) AddDependentIntent ¶
func (b *BaseIntent) AddDependentIntent(i Intent)
AddDependentIntent adds a intent to dependencies. This method can be used to add custom intents which are not refs or backrefs
func (*BaseIntent) Evaluate ¶
func (b *BaseIntent) Evaluate(ctx context.Context, evaluateCtx *EvaluateContext) error
Evaluate creates/updates/deletes lower-level resources when needed.
func (*BaseIntent) GetDependencies ¶
func (b *BaseIntent) GetDependencies() map[string]UUIDSet
GetDependencies returns collection of references and backrefs' uuids
func (*BaseIntent) RemoveDependentIntent ¶
func (b *BaseIntent) RemoveDependentIntent(i Intent)
RemoveDependentIntent removes a intent from dependencies. This method can be used to add custom logic and reactions.
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache stores intents.
func (*Cache) Delete ¶
Delete deletes intent from cache. It accepts kebab-case or CamelCase type name.
type EvaluateContext ¶
type EvaluateContext struct { WriteService services.WriteService ReadService services.ReadService IntPoolAllocator asfservices.IntPoolAllocator IntentLoader Loader }
EvaluateContext contains context information for Resource to handle CRUD
type Intent ¶
type Intent interface { models.Object Evaluate(ctx context.Context, evaluateCtx *EvaluateContext) error GetObject() models.Object GetDependencies() map[string]UUIDSet AddDependentIntent(i Intent) RemoveDependentIntent(i Intent) }
Intent contains Intent Compiler state for a resource.