state

package
v0.0.0-...-1687775 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package state provides state management functionality for AWS Organization configuration. Version: 1.0.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StateManager

type StateManager struct {
	// contains filtered or unexported fields
}

StateManager handles state persistence and retrieval

func NewManager

func NewManager(ctx context.Context, opts ...func(*StateManager) error) (*StateManager, error)

NewManager creates a new state manager instance with the provided options

func (*StateManager) CleanupOldStates

func (sm *StateManager) CleanupOldStates(ctx context.Context) error

CleanupOldStates removes expired states and backups

func (*StateManager) Close

func (sm *StateManager) Close() error

Close performs cleanup and closes connections

func (*StateManager) CreateBackup

func (sm *StateManager) CreateBackup(ctx context.Context) (string, error)

CreateBackup creates a backup of the current state

func (*StateManager) Load

func (sm *StateManager) Load(ctx context.Context) (*config.StateData, error)

Load retrieves the current state with retry logic

func (*StateManager) Save

func (sm *StateManager) Save(ctx context.Context, state interface{}) error

Save persists the current state with retry logic

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL