Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler(backends BackendList, log Logger) (http.Handler, error)
NewHandler returns an http.Handler that serves the arbiter front-end over the given BackendList. The BackendList must contain at least one name. If the Logger is nil, messages will not be logged anywhere.
Types ¶
type BackendList ¶
type BackendList interface { // AddState adds a named state FS AddState(name string, state fs.FS) // GetState returns the state FS with the given name. If none exists, it returns nil GetState(name string) fs.FS // Names returns the list of the names of backends Names() []string }
BackendList is a collection of backends for arbiter to look in for terraform state, where a backend consists of a name and a filesystem to browse for terraform state files.
func BackendListFromJSON ¶
func BackendListFromJSON(reader io.Reader) (BackendList, error)
BackendListFromJSON is a convenience method to initialize a BackendList from a JSON source. See README.md for the expected JSON format.
func NewBackendList ¶
func NewBackendList() BackendList
NewBackendList returns an empty BackendList. It returns Names() in the order added
Click to show internal directories.
Click to hide internal directories.