Documentation
¶
Index ¶
- type BuildFunc
- type Derivation
- type DerivationOutput
- type EvalFunc
- type Executor
- type NixFlakeLocal
- func (n *NixFlakeLocal) Build(ctx context.Context, drvPath string) (err error)
- func (n *NixFlakeLocal) Deploy(ctx context.Context, outPath, operation string, profilePaths []string) (needToRestartComin bool, profilePath string, err error)
- func (n *NixFlakeLocal) Eval(ctx context.Context, ...) (drvPath string, outPath string, machineId string, err error)
- func (n *NixFlakeLocal) IsStorePathExist(storePath string) bool
- func (n *NixFlakeLocal) List(flakeUrl string) (hosts []string, err error)
- func (n *NixFlakeLocal) NeedToReboot(outPath, operation string) bool
- func (n *NixFlakeLocal) ReadMachineId() (string, error)
- func (n *NixFlakeLocal) ShowDerivation(ctx context.Context, flakeUrl, hostname string) (drvPath string, outPath string, err error)
- type NixLocal
- func (n *NixLocal) Build(ctx context.Context, drvPath string) (err error)
- func (n *NixLocal) Deploy(ctx context.Context, outPath, operation string, profilePaths []string) (needToRestartComin bool, profilePath string, err error)
- func (n *NixLocal) Eval(ctx context.Context, ...) (drvPath string, outPath string, machineId string, err error)
- func (n *NixLocal) IsStorePathExist(storePath string) bool
- func (n *NixLocal) NeedToReboot(outPath, operation string) bool
- func (n *NixLocal) ReadMachineId() (string, error)
- type Output
- type Path
- type Show
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Derivation ¶
type Derivation struct {
Outputs Output `json:"outputs"`
}
type DerivationOutput ¶ added in v0.11.0
type DerivationOutput struct {
Version int `json:"version"`
Derivations map[string]Derivation `json:"derivations"`
}
type Executor ¶
type Executor interface {
Eval(ctx context.Context, repositoryPath, repositorySubdir, commitId, systemAttr, hostname string, submodules bool) (drvPath string, outPath string, machineId string, err error)
Build(ctx context.Context, drvPath string) (err error)
Deploy(ctx context.Context, outPath, operation string, profilePaths []string) (needToRestartComin bool, profilePath string, err error)
NeedToReboot(outPath, operation string) bool
ReadMachineId() (string, error)
// IsStorePathExist returns true if a storepath exists. This
// is used to detect if a build will be required or not.
IsStorePathExist(string) bool
}
Executor contains the function used by comin to actually do actions on the host. This allows us to abstract the way Nix expression are evaluated, built and deployed. This could be for instance used by a Garnix implementation (such as proposed in https://github.com/nlewo/comin/pull/74)
func NewNixDarwinFlake ¶ added in v0.10.0
func NewNixOSFlake ¶ added in v0.10.0
func NewNixOSNix ¶ added in v0.10.0
type NixFlakeLocal ¶ added in v0.10.0
type NixFlakeLocal struct {
// contains filtered or unexported fields
}
func NewNixFlakeExecutor ¶ added in v0.10.0
func NewNixFlakeExecutor(systemAttr string) (*NixFlakeLocal, error)
func (*NixFlakeLocal) Build ¶ added in v0.10.0
func (n *NixFlakeLocal) Build(ctx context.Context, drvPath string) (err error)
func (*NixFlakeLocal) IsStorePathExist ¶ added in v0.10.0
func (n *NixFlakeLocal) IsStorePathExist(storePath string) bool
func (*NixFlakeLocal) List ¶ added in v0.10.0
func (n *NixFlakeLocal) List(flakeUrl string) (hosts []string, err error)
func (*NixFlakeLocal) NeedToReboot ¶ added in v0.10.0
func (n *NixFlakeLocal) NeedToReboot(outPath, operation string) bool
func (*NixFlakeLocal) ReadMachineId ¶ added in v0.10.0
func (n *NixFlakeLocal) ReadMachineId() (string, error)
func (*NixFlakeLocal) ShowDerivation ¶ added in v0.10.0
type NixLocal ¶
type NixLocal struct{}
func NewNixExecutor ¶
func (*NixLocal) IsStorePathExist ¶ added in v0.9.0
func (*NixLocal) NeedToReboot ¶ added in v0.9.0
func (*NixLocal) ReadMachineId ¶ added in v0.9.0
Click to show internal directories.
Click to hide internal directories.