service

package
v0.0.0-...-d25dbbd Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const LocalTargetID = "appos-local"

Variables

This section is empty.

Functions

func IsOperationInFlightError

func IsOperationInFlightError(err error) bool

Types

type OperationSummary

type OperationSummary struct {
	Action         software.Action         `json:"action"`
	Phase          software.OperationPhase `json:"phase"`
	TerminalStatus software.TerminalStatus `json:"terminal_status"`
	FailurePhase   software.OperationPhase `json:"failure_phase,omitempty"`
	FailureCode    software.FailureCode    `json:"failure_code,omitempty"`
	FailureReason  string                  `json:"failure_reason,omitempty"`
	UpdatedAt      string                  `json:"updated_at"`
}

type Service

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

func New

func New(app core.App, queueClient *asynq.Client) *Service

func (*Service) EnsureCapability

func (s *Service) EnsureCapability(ctx context.Context, serverID string, capability software.Capability) (software.AsyncCommandResponse, error)

func (*Service) GetCapabilityStatus

func (s *Service) GetCapabilityStatus(ctx context.Context, serverID string, capability software.Capability) (software.CapabilityStatus, error)

func (*Service) GetLocalComponent

func (s *Service) GetLocalComponent(ctx context.Context, componentKey software.ComponentKey) (ComputedComponent, error)

func (*Service) GetLocalComponentSnapshotFirst

func (s *Service) GetLocalComponentSnapshotFirst(componentKey software.ComponentKey) (ComputedComponent, bool, error)

func (*Service) GetServerComponent

func (s *Service) GetServerComponent(ctx context.Context, serverID, userID string, componentKey software.ComponentKey) (ComputedComponent, error)

func (*Service) GetSupportedServerCatalogEntry

func (s *Service) GetSupportedServerCatalogEntry(ctx context.Context, componentKey software.ComponentKey) (SupportedServerCatalogEntry, error)

func (*Service) IsCapabilityReady

func (s *Service) IsCapabilityReady(ctx context.Context, serverID string, capability software.Capability) (bool, error)

func (*Service) ListCapabilities

func (s *Service) ListCapabilities(ctx context.Context, serverID string) ([]software.CapabilityStatus, error)

func (*Service) ListLocalComponents

func (s *Service) ListLocalComponents(ctx context.Context) ([]ComputedComponent, error)

func (*Service) ListProjectedLocalComponentsPartial

func (s *Service) ListProjectedLocalComponentsPartial() (map[software.ComponentKey]ComputedComponent, bool, error)

func (*Service) ListServerComponents

func (s *Service) ListServerComponents(ctx context.Context, serverID, userID string) ([]ComputedComponent, error)

func (*Service) ListSnapshotFirstLocalComponents

func (s *Service) ListSnapshotFirstLocalComponents() (map[software.ComponentKey]ComputedComponent, bool, error)

func (*Service) ListSupportedServerCatalog

func (s *Service) ListSupportedServerCatalog(_ context.Context) ([]SupportedServerCatalogEntry, error)

func (*Service) UpgradeCapability

func (s *Service) UpgradeCapability(ctx context.Context, serverID string, capability software.Capability) (software.AsyncCommandResponse, error)

func (*Service) VerifyCapability

func (s *Service) VerifyCapability(ctx context.Context, serverID string, capability software.Capability) (software.AsyncCommandResponse, error)

type SupportedServerCatalogEntry

type SupportedServerCatalogEntry struct {
	ComponentKey           software.ComponentKey                            `json:"component_key"`
	Label                  string                                           `json:"label"`
	Capability             software.Capability                              `json:"capability,omitempty"`
	SupportedActions       []software.Action                                `json:"supported_actions"`
	ActionTimeouts         map[software.Action]int                          `json:"action_timeouts,omitempty"`
	TimeoutPolicy          map[software.Action]software.TimeoutPolicyResult `json:"timeout_policy,omitempty"`
	TemplateKind           software.TemplateKind                            `json:"template_kind"`
	ArtifactKind           software.ArtifactKind                            `json:"artifact_kind,omitempty"`
	ServiceName            string                                           `json:"service_name,omitempty"`
	Description            string                                           `json:"description"`
	ReadinessRequirements  []string                                         `json:"readiness_requirements"`
	RequiresAppOSBaseURL   bool                                             `json:"requires_appos_base_url,omitempty"`
	FavoriteSystemdService bool                                             `json:"favorite_systemd_service,omitempty"`
	Visibility             []software.CatalogVisibility                     `json:"visibility"`
}

Jump to

Keyboard shortcuts

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