Documentation ¶
Index ¶
- func Sort(i, j *Resource) int
- type Resource
- type ResourceAddress
- type ResourceStatus
- type Service
- func (s *Service) Delete(workspaceID resource.ID, addrs ...ResourceAddress) (*task.Task, error)
- func (s *Service) Get(workspaceID resource.ID) (*State, error)
- func (s *Service) Reload(workspaceID resource.ID) (*task.Task, error)
- func (s *Service) Subscribe(ctx context.Context) <-chan resource.Event[*State]
- func (s *Service) Taint(workspaceID resource.ID, addr ResourceAddress) (*task.Task, error)
- func (s *Service) Untaint(workspaceID resource.ID, addr ResourceAddress) (*task.Task, error)
- type ServiceOptions
- type State
- type StateFile
- type StateFileModule
- type StateFileOutput
- type StateFileResource
- type StateFileValues
- type StateStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Resource ¶
type Resource struct { Address ResourceAddress Status ResourceStatus }
Resource is a pug state resource.
type ResourceAddress ¶
type ResourceAddress string
type ResourceStatus ¶
type ResourceStatus string
const ( // Idle means the resource is idle (no tasks are currently operating on // it). Idle ResourceStatus = "idle" // Removing means the resource is in the process of being removed. Removing ResourceStatus = "removing" // Tainting means the resource is in the process of being tainted. Tainting ResourceStatus = "tainting" // Tainted means the resource is currently tainted Tainted ResourceStatus = "tainted" // Untainting means the resource is in the process of being untainted. Untainting ResourceStatus = "untainting" )
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(ctx context.Context, opts ServiceOptions) *Service
func (*Service) Reload ¶
Reload creates a task to repopulate the local cache of the state of the given workspace.
type ServiceOptions ¶
type State ¶
type State struct { WorkspaceID resource.ID Resources map[ResourceAddress]*Resource State StateStatus }
func EmptyState ¶
type StateFile ¶
type StateFile struct { FormatVersion string `json:"format_version"` TerraformVersion string `json:"terraform_version"` Values StateFileValues }
StateFile is the terraform state file contents
type StateFileModule ¶
type StateFileModule struct { Resources []StateFileResource ChildModules []StateFileModule `json:"child_modules"` }
type StateFileOutput ¶
type StateFileOutput struct { Value json.RawMessage Sensitive bool }
StateFileOutput is an output in the terraform state file
type StateFileResource ¶
type StateFileResource struct { Address ResourceAddress Tainted bool }
type StateFileValues ¶
type StateFileValues struct { Outputs map[string]StateFileOutput RootModule StateFileModule `json:"root_module"` }
type StateStatus ¶
type StateStatus string
const ( // Idle indicates the resource is idle (no tasks are currently operating on // it). IdleState StateStatus = "idle" // Removing indicates the resource is in the process of being removed. ReloadingState = "reloading" )
Click to show internal directories.
Click to hide internal directories.