state

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package state provides deployment management

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployment

type Deployment struct {
	ProviderName string
	TemplateID   string
	Status       string
	CreatedAt    time.Time
}

Deployment represents the status of an environment on a specified provider

type Manager

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

Manager provides storage operations for deployments

func NewManager

func NewManager(config any) (*Manager, error)

NewManager creates a new manager with pre-defined disk storage configuration

func (*Manager) AddNewDeployment

func (m *Manager) AddNewDeployment(providerName, templateID string) error

AddNewDeployment creates a new deployment record with running status

func (*Manager) DeploymentExist

func (m *Manager) DeploymentExist(providerName, templateID string) (bool, error)

DeploymentExist checks if a deployment exists for the given provider and template

func (Manager) ListDeployments

func (m Manager) ListDeployments() ([]Deployment, error)

ListDeployments returns all deployment records from storage

func (*Manager) RemoveDeployment

func (m *Manager) RemoveDeployment(providerName, templateID string) error

RemoveDeployment deletes a deployment record by provider name and template ID

Jump to

Keyboard shortcuts

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