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