mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 08:21:07 -06:00
cb2e9119aa
Signed-off-by: namgyalangmo <75657887+namgyalangmo@users.noreply.github.com>
32 lines
1020 B
Go
32 lines
1020 B
Go
// Copyright (c) The OpenTofu Authors
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
// Copyright (c) 2023 HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package statemgr
|
|
|
|
// Storage is the union of Transient and Persistent, for state managers that
|
|
// have both transient and persistent storage.
|
|
//
|
|
// Types implementing this interface coordinate between their Transient
|
|
// and Persistent implementations so that the persistent operations read
|
|
// or write the transient store.
|
|
type Storage interface {
|
|
Transient
|
|
Persistent
|
|
}
|
|
|
|
// Full is the union of all of the more-specific state interfaces.
|
|
//
|
|
// This interface may grow over time, so state implementations aiming to
|
|
// implement it may need to be modified for future changes. To ensure that
|
|
// this need can be detected, always include a statement nearby the declaration
|
|
// of the implementing type that will fail at compile time if the interface
|
|
// isn't satisfied, such as:
|
|
//
|
|
// var _ statemgr.Full = (*ImplementingType)(nil)
|
|
type Full interface {
|
|
Storage
|
|
Locker
|
|
}
|