Documentation
¶
Index ¶
- type FileStateAdapter
- func (a *FileStateAdapter) GetEnvironment(ctx context.Context, name string) (*domain.EnvironmentEntry, error)
- func (a *FileStateAdapter) Load(_ context.Context) (*domain.State, error)
- func (a *FileStateAdapter) RemoveEnvironment(ctx context.Context, name string) error
- func (a *FileStateAdapter) Save(_ context.Context, state *domain.State) error
- func (a *FileStateAdapter) SetEnvironment(ctx context.Context, name string, entry *domain.EnvironmentEntry) error
- func (a *FileStateAdapter) UpdateSnapshot(_ context.Context, dbName string, info *domain.SnapshotUpdate) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStateAdapter ¶
type FileStateAdapter struct {
// contains filtered or unexported fields
}
FileStateAdapter persists state to a JSON file with atomic writes.
func NewFileStateAdapter ¶
func NewFileStateAdapter(path string) *FileStateAdapter
NewFileStateAdapter creates a new file-based state adapter.
func (*FileStateAdapter) GetEnvironment ¶
func (a *FileStateAdapter) GetEnvironment(ctx context.Context, name string) (*domain.EnvironmentEntry, error)
func (*FileStateAdapter) RemoveEnvironment ¶
func (a *FileStateAdapter) RemoveEnvironment(ctx context.Context, name string) error
func (*FileStateAdapter) SetEnvironment ¶
func (a *FileStateAdapter) SetEnvironment(ctx context.Context, name string, entry *domain.EnvironmentEntry) error
func (*FileStateAdapter) UpdateSnapshot ¶
func (a *FileStateAdapter) UpdateSnapshot(_ context.Context, dbName string, info *domain.SnapshotUpdate) error
Click to show internal directories.
Click to hide internal directories.