Documentation
¶
Overview ¶
Package execgraphproto contains just the protocol buffers models we use for marshaling and unmarshaling execution graphs.
The logic for converting to and from the types defined in here is encapsulated in package execgraph. The specific serialization format for execution graphs is an implementation detail that may change arbitrarily between OpenTofu versions: it's not supported to take an execution graph marshaled by one OpenTofu version and then try to unmarshal it with a different OpenTofu version. Even the fact that there is an execution graph _at all_ is an implementation detail, with the public-facing model only representing a set of high-level actions against resource instances and output values.
Index ¶
- Constants
- Variables
- type DeposedResourceInstanceObject
- func (x *DeposedResourceInstanceObject) ClearDeposedKey()
- func (x *DeposedResourceInstanceObject) ClearInstanceAddr()
- func (x *DeposedResourceInstanceObject) GetDeposedKey() string
- func (x *DeposedResourceInstanceObject) GetInstanceAddr() string
- func (x *DeposedResourceInstanceObject) HasDeposedKey() bool
- func (x *DeposedResourceInstanceObject) HasInstanceAddr() bool
- func (*DeposedResourceInstanceObject) ProtoMessage()
- func (x *DeposedResourceInstanceObject) ProtoReflect() protoreflect.Message
- func (x *DeposedResourceInstanceObject) Reset()
- func (x *DeposedResourceInstanceObject) SetDeposedKey(v string)
- func (x *DeposedResourceInstanceObject) SetInstanceAddr(v string)
- func (x *DeposedResourceInstanceObject) String() string
- type DeposedResourceInstanceObject_builder
- type Element
- func (x *Element) ClearConstantProviderInstAddr()
- func (x *Element) ClearConstantResourceInstAddr()
- func (x *Element) ClearConstantValue()
- func (x *Element) ClearDeposedKey()
- func (x *Element) ClearOperation()
- func (x *Element) ClearRequest()
- func (x *Element) ClearWaiter()
- func (x *Element) GetConstantProviderInstAddr() string
- func (x *Element) GetConstantResourceInstAddr() string
- func (x *Element) GetConstantValue() []byte
- func (x *Element) GetDeposedKey() string
- func (x *Element) GetOperation() *Operation
- func (x *Element) GetWaiter() *Waiter
- func (x *Element) HasConstantProviderInstAddr() bool
- func (x *Element) HasConstantResourceInstAddr() bool
- func (x *Element) HasConstantValue() bool
- func (x *Element) HasDeposedKey() bool
- func (x *Element) HasOperation() bool
- func (x *Element) HasRequest() bool
- func (x *Element) HasWaiter() bool
- func (*Element) ProtoMessage()
- func (x *Element) ProtoReflect() protoreflect.Message
- func (x *Element) Reset()
- func (x *Element) SetConstantProviderInstAddr(v string)
- func (x *Element) SetConstantResourceInstAddr(v string)
- func (x *Element) SetConstantValue(v []byte)
- func (x *Element) SetDeposedKey(v string)
- func (x *Element) SetOperation(v *Operation)
- func (x *Element) SetWaiter(v *Waiter)
- func (x *Element) String() string
- func (x *Element) WhichRequest() case_Element_Request
- type Element_builder
- type ExecutionGraph
- func (x *ExecutionGraph) GetElements() []*Element
- func (x *ExecutionGraph) GetResourceInstanceResults() map[string]uint64
- func (*ExecutionGraph) ProtoMessage()
- func (x *ExecutionGraph) ProtoReflect() protoreflect.Message
- func (x *ExecutionGraph) Reset()
- func (x *ExecutionGraph) SetElements(v []*Element)
- func (x *ExecutionGraph) SetResourceInstanceResults(v map[string]uint64)
- func (x *ExecutionGraph) String() string
- type ExecutionGraph_builder
- type Operation
- func (x *Operation) ClearOpcode()
- func (x *Operation) GetOpcode() uint64
- func (x *Operation) GetOperands() []uint64
- func (x *Operation) HasOpcode() bool
- func (*Operation) ProtoMessage()
- func (x *Operation) ProtoReflect() protoreflect.Message
- func (x *Operation) Reset()
- func (x *Operation) SetOpcode(v uint64)
- func (x *Operation) SetOperands(v []uint64)
- func (x *Operation) String() string
- type Operation_builder
- type Waiter
- type Waiter_builder
Constants ¶
const Element_ConstantProviderInstAddr_case case_Element_Request = 3
const Element_ConstantResourceInstAddr_case case_Element_Request = 2
const Element_ConstantValue_case case_Element_Request = 1
const Element_DeposedKey_case case_Element_Request = 6
const Element_Operation_case case_Element_Request = 4
const Element_Request_not_set_case case_Element_Request = 0
const Element_Waiter_case case_Element_Request = 5
Variables ¶
var File_execgraph_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type DeposedResourceInstanceObject ¶
type DeposedResourceInstanceObject struct {
XXX_raceDetectHookData protoimpl.RaceDetectHookData
XXX_presence [1]uint32
// contains filtered or unexported fields
}
func (*DeposedResourceInstanceObject) ClearDeposedKey ¶
func (x *DeposedResourceInstanceObject) ClearDeposedKey()
func (*DeposedResourceInstanceObject) ClearInstanceAddr ¶
func (x *DeposedResourceInstanceObject) ClearInstanceAddr()
func (*DeposedResourceInstanceObject) GetDeposedKey ¶
func (x *DeposedResourceInstanceObject) GetDeposedKey() string
func (*DeposedResourceInstanceObject) GetInstanceAddr ¶
func (x *DeposedResourceInstanceObject) GetInstanceAddr() string
func (*DeposedResourceInstanceObject) HasDeposedKey ¶
func (x *DeposedResourceInstanceObject) HasDeposedKey() bool
func (*DeposedResourceInstanceObject) HasInstanceAddr ¶
func (x *DeposedResourceInstanceObject) HasInstanceAddr() bool
func (*DeposedResourceInstanceObject) ProtoMessage ¶
func (*DeposedResourceInstanceObject) ProtoMessage()
func (*DeposedResourceInstanceObject) ProtoReflect ¶
func (x *DeposedResourceInstanceObject) ProtoReflect() protoreflect.Message
func (*DeposedResourceInstanceObject) Reset ¶
func (x *DeposedResourceInstanceObject) Reset()
func (*DeposedResourceInstanceObject) SetDeposedKey ¶
func (x *DeposedResourceInstanceObject) SetDeposedKey(v string)
func (*DeposedResourceInstanceObject) SetInstanceAddr ¶
func (x *DeposedResourceInstanceObject) SetInstanceAddr(v string)
func (*DeposedResourceInstanceObject) String ¶
func (x *DeposedResourceInstanceObject) String() string
type DeposedResourceInstanceObject_builder ¶
type DeposedResourceInstanceObject_builder struct {
// A fully-qualified resource instance address in the
// syntax that addrs.AbsResourceInstance.String produces.
InstanceAddr *string
// The key of the requested deposed object associated with the
// resource instance.
DeposedKey *string
// contains filtered or unexported fields
}
func (DeposedResourceInstanceObject_builder) Build ¶
func (b0 DeposedResourceInstanceObject_builder) Build() *DeposedResourceInstanceObject
type Element ¶
type Element struct {
// contains filtered or unexported fields
}
One "element" of an execution graph. Refer to ExecutionGraph.elements for more information.
func (*Element) ClearConstantProviderInstAddr ¶
func (x *Element) ClearConstantProviderInstAddr()
func (*Element) ClearConstantResourceInstAddr ¶
func (x *Element) ClearConstantResourceInstAddr()
func (*Element) ClearConstantValue ¶
func (x *Element) ClearConstantValue()
func (*Element) ClearDeposedKey ¶
func (x *Element) ClearDeposedKey()
func (*Element) ClearOperation ¶
func (x *Element) ClearOperation()
func (*Element) ClearRequest ¶
func (x *Element) ClearRequest()
func (*Element) ClearWaiter ¶
func (x *Element) ClearWaiter()
func (*Element) GetConstantProviderInstAddr ¶
func (*Element) GetConstantResourceInstAddr ¶
func (*Element) GetConstantValue ¶
func (*Element) GetDeposedKey ¶
func (*Element) GetOperation ¶
func (*Element) HasConstantProviderInstAddr ¶
func (*Element) HasConstantResourceInstAddr ¶
func (*Element) HasConstantValue ¶
func (*Element) HasDeposedKey ¶
func (*Element) HasOperation ¶
func (*Element) HasRequest ¶
func (*Element) ProtoMessage ¶
func (*Element) ProtoMessage()
func (*Element) ProtoReflect ¶
func (x *Element) ProtoReflect() protoreflect.Message
func (*Element) SetConstantProviderInstAddr ¶
func (*Element) SetConstantResourceInstAddr ¶
func (*Element) SetConstantValue ¶
func (*Element) SetDeposedKey ¶
func (*Element) SetOperation ¶
func (*Element) WhichRequest ¶
func (x *Element) WhichRequest() case_Element_Request
type Element_builder ¶
type Element_builder struct {
// Fields of oneof xxx_hidden_Request:
// A constant value, corresponding to execgraph.Builder.ConstantValue.
//
// The value is a MessagePack serialization of a cty.Value using
// cty.DynamicPseudoType as the serialization type constraint, and so
// this represents both the value and the value's dynamic type.
ConstantValue []byte
// A constant address for a resource instance, corresponding to
// execgraph.Builder.ConstantResourceInstAddr.
//
// The value is a fully-qualified resource instance address in the
// usual syntax.
ConstantResourceInstAddr *string
// A constant "deposed key" for a resource instance object,
// corresponding to execgraph.Builder.ConstantDeposedKey.
//
// The value is a string that can be converted to states.DeposedKey.
DeposedKey *string
// A constant address for a provider instance, corresponding to
// execgraph.Builder.ConstantProviderInstAddr.
//
// The value is a fully-qualified provider instance address in the
// usual syntax.
ConstantProviderInstAddr *string
// An operation to be performed during execution, corresponding to
// various different methods of execgraph.Builder depending on the
// opcode.
//
// The unmarshal code is responsible for figuring out which Builder
// method to call based on the opcode, handled as part of its validation
// logic.
Operation *Operation
// A collection of results whose completion an operation can depend
// on without actually making any use of the values they produce.
//
// We use this to represent explicit dependencies between resource
// instances and providers so that the execution order will respect
// the dependencies regardless of whether the dependencies were
// inferred automatically from expressions or declared explicitly
// using a "depends_on" argument.
Waiter *Waiter
// contains filtered or unexported fields
}
func (Element_builder) Build ¶
func (b0 Element_builder) Build() *Element
type ExecutionGraph ¶
type ExecutionGraph struct {
// contains filtered or unexported fields
}
ExecutionGraph is the root message type for an execution graph file.
Note that we expect execution graphs to be saved as part of a larger plan file structure that should represent general metadata such as which OpenTofu version a particular execution graph was created by. This message type and its nested message types are focused only on representing the details of the execution graph itself.
func (*ExecutionGraph) GetElements ¶
func (x *ExecutionGraph) GetElements() []*Element
func (*ExecutionGraph) GetResourceInstanceResults ¶
func (x *ExecutionGraph) GetResourceInstanceResults() map[string]uint64
func (*ExecutionGraph) ProtoMessage ¶
func (*ExecutionGraph) ProtoMessage()
func (*ExecutionGraph) ProtoReflect ¶
func (x *ExecutionGraph) ProtoReflect() protoreflect.Message
func (*ExecutionGraph) Reset ¶
func (x *ExecutionGraph) Reset()
func (*ExecutionGraph) SetElements ¶
func (x *ExecutionGraph) SetElements(v []*Element)
func (*ExecutionGraph) SetResourceInstanceResults ¶
func (x *ExecutionGraph) SetResourceInstanceResults(v map[string]uint64)
func (*ExecutionGraph) String ¶
func (x *ExecutionGraph) String() string
type ExecutionGraph_builder ¶
type ExecutionGraph_builder struct {
// The various "elements" of the graph.
//
// This current serialization should be thought of as a sequence of
// mutations that each add something new to the graph, where the available
// actions correspond to the methods of execgraph.Builder. Each message
// in the sequence therefore corresponds to a method called on an internal
// builder used to reconstruct the graph during unmarshaling.
//
// We use execgraph.Builder when reloading because that helps us to
// validate the graph data using the result type information produced by
// the builder method results, although a round-trip through this
// serialization only guarantees a functionally-equivalent graph, not an
// exactly-identical graph. (i.e. the internal slices used to represent
// the graph elements might be in a different order after round-tripping,
// and the text-based debug representation of the graph will reflect
// those changes even though the graph _topology_ should be identical.)
Elements []*Element
// Map from resource instance addresses to indices into the "elements"
// field, specifying which element produces the "final state" result
// for each resource instance.
ResourceInstanceResults map[string]uint64
// contains filtered or unexported fields
}
func (ExecutionGraph_builder) Build ¶
func (b0 ExecutionGraph_builder) Build() *ExecutionGraph
type Operation ¶
type Operation struct {
XXX_raceDetectHookData protoimpl.RaceDetectHookData
XXX_presence [1]uint32
// contains filtered or unexported fields
}
func (*Operation) ClearOpcode ¶
func (x *Operation) ClearOpcode()
func (*Operation) GetOperands ¶
func (*Operation) ProtoMessage ¶
func (*Operation) ProtoMessage()
func (*Operation) ProtoReflect ¶
func (x *Operation) ProtoReflect() protoreflect.Message
func (*Operation) SetOperands ¶
type Operation_builder ¶
type Operation_builder struct {
// The raw opcode of the operation to be performed.
Opcode *uint64
// The result ids for all of the operands. The number of results and their
// meanings depend on the opcode, and are validated during unmarshaling.
Operands []uint64
// contains filtered or unexported fields
}
func (Operation_builder) Build ¶
func (b0 Operation_builder) Build() *Operation
type Waiter ¶
type Waiter struct {
// contains filtered or unexported fields
}
func (*Waiter) GetResults ¶
func (*Waiter) ProtoMessage ¶
func (*Waiter) ProtoMessage()
func (*Waiter) ProtoReflect ¶
func (x *Waiter) ProtoReflect() protoreflect.Message
func (*Waiter) SetResults ¶
type Waiter_builder ¶
type Waiter_builder struct {
// Result ids of all of the results that must be awaited.
Results []uint64
// contains filtered or unexported fields
}
func (Waiter_builder) Build ¶
func (b0 Waiter_builder) Build() *Waiter