store

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerationHasToBeBuilt added in v0.9.0

func GenerationHasToBeBuilt(g *protobuf.Generation) bool

func GenerationShow added in v0.8.0

func GenerationShow(g *protobuf.Generation)

func IsTesting added in v0.9.0

func IsTesting(d *protobuf.Deployment) bool

func StatusToString added in v0.8.0

func StatusToString(status Status) string

Types

type BuildStatus added in v0.8.0

type BuildStatus int64
const (
	BuildInit BuildStatus = iota
	Building
	Built
	BuildFailed
)

func StringToBuildStatus added in v0.9.0

func StringToBuildStatus(statusStr string) BuildStatus

func (BuildStatus) String added in v0.8.0

func (s BuildStatus) String() string

type EvalStatus added in v0.8.0

type EvalStatus int64
const (
	EvalInit EvalStatus = iota
	Evaluating
	Evaluated
	EvalFailed
)

func StringToEvalStatus added in v0.9.0

func StringToEvalStatus(statusStr string) EvalStatus

func (EvalStatus) String added in v0.8.0

func (s EvalStatus) String() string

type Status added in v0.8.0

type Status int64
const (
	Init Status = iota
	Running
	Done
	Failed
)

func StringToStatus added in v0.9.0

func StringToStatus(statusStr string) Status

type Store

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

func New

func New(broker *broker.Broker, filename, gcRootsDir string, bootEntryCapacity, successfulCapacity, anyCapacity int) (*Store, error)

func (*Store) Commit

func (s *Store) Commit()

func (*Store) DeploymentFinished added in v0.9.0

func (s *Store) DeploymentFinished(uuid string, deploymentErr error, cominNeedRestart bool, profilePath string, bootedStorepath, currentStorepath string) error

func (*Store) DeploymentList

func (s *Store) DeploymentList() []*protobuf.Deployment

DeploymentAdd inserts a deployment and return an evicted deployment because the capacity has been reached.

func (*Store) DeploymentStarted added in v0.9.0

func (s *Store) DeploymentStarted(uuid, bootedStorepath, currentStorepath string) error

func (*Store) GenerationBuildFinished added in v0.8.0

func (s *Store) GenerationBuildFinished(uuid string, buildErr error) error

func (*Store) GenerationBuildStart added in v0.8.0

func (s *Store) GenerationBuildStart(uuid, reason string) error

func (*Store) GenerationEvalFinished added in v0.8.0

func (s *Store) GenerationEvalFinished(uuid string, drvPath, outPath, machineId string, evalErr error) error

func (*Store) GenerationEvalStarted added in v0.8.0

func (s *Store) GenerationEvalStarted(uuid string) error

func (*Store) GenerationGet added in v0.8.0

func (s *Store) GenerationGet(uuid string) (protobuf.Generation, error)

GenerationGet is thread safe and returns a copy

func (*Store) GetDeploymentLastest added in v0.11.0

func (s *Store) GetDeploymentLastest() (latest *protobuf.Deployment)

func (*Store) GetDeploymentProfilePaths added in v0.13.0

func (s *Store) GetDeploymentProfilePaths() []string

func (*Store) GetState added in v0.8.0

func (s *Store) GetState() *protobuf.Store

func (*Store) LastDeployment

func (s *Store) LastDeployment() (ok bool, d *protobuf.Deployment)

func (*Store) Load

func (s *Store) Load() (err error)

func (*Store) NewDeployment added in v0.9.0

func (s *Store) NewDeployment(g *protobuf.Generation, operation, reason, bootedStorepath, currentStorepath string) *protobuf.Deployment

func (*Store) NewGeneration added in v0.8.0

func (s *Store) NewGeneration(hostname, repositoryPath, repositoryDir, systemAttr string, rs *protobuf.RepositoryStatus) (g protobuf.Generation)

Jump to

Keyboard shortcuts

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