github.com/opentofu/opentofu@v1.7.1/internal/states/statemgr/statemgr.go (about) 1 // Copyright (c) The OpenTofu Authors 2 // SPDX-License-Identifier: MPL-2.0 3 // Copyright (c) 2023 HashiCorp, Inc. 4 // SPDX-License-Identifier: MPL-2.0 5 6 package statemgr 7 8 // Storage is the union of Transient and Persistent, for state managers that 9 // have both transient and persistent storage. 10 // 11 // Types implementing this interface coordinate between their Transient 12 // and Persistent implementations so that the persistent operations read 13 // or write the transient store. 14 type Storage interface { 15 Transient 16 Persistent 17 } 18 19 // Full is the union of all of the more-specific state interfaces. 20 // 21 // This interface may grow over time, so state implementations aiming to 22 // implement it may need to be modified for future changes. To ensure that 23 // this need can be detected, always include a statement nearby the declaration 24 // of the implementing type that will fail at compile time if the interface 25 // isn't satisfied, such as: 26 // 27 // var _ statemgr.Full = (*ImplementingType)(nil) 28 type Full interface { 29 Storage 30 Locker 31 }