nomadpack

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NomadPack

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

NomadPack is a wrapper around the Nomad binary that provides a way to interact with Nomad using the Nomad Pack CLI.

func New

func New(binaryPath string, logger *zap.Logger) (*NomadPack, error)

Creates a new NomadPack instance by providing the path to the Nomad binary. If the binary is not found or is not executable an error is returned.

func (*NomadPack) AddRegistry

func (nomadPack *NomadPack) AddRegistry(name, source string, ref, target *string) error

Add nomad pack registries name: the name of the registry. source: the source of the registry. ref: speficic git ref of the registry or pack to be added. target: A specific pack within the registry to be added.

func (*NomadPack) NomadAddr

func (nomadPack *NomadPack) NomadAddr(nomad_addr string) *NomadPack

func (*NomadPack) NomadToken

func (nomadPack *NomadPack) NomadToken(nomad_token string) *NomadPack

func (*NomadPack) Plan

func (nomadPack *NomadPack) Plan(workDir string, diff bool, varFiles []string, vars map[string]string, extraParams []string) error

Plan runs the Nomad Pack plan command. workDir: the directory nomad-pack will be run in. diff: whether to show the diff. ref: speficic git ref of the registry or pack to be added. registry: the registry to use. pack: the pack to run. varFiles: an array of var files to use. vars: a map of vars to use.

func (*NomadPack) Render added in v0.0.2

func (nomadPack *NomadPack) Render(workDir string, diff bool, varFiles []string, vars map[string]string, extraParams []string) error

func (*NomadPack) Run

func (nomadPack *NomadPack) Run(workDir string, diff bool, varFiles []string, vars map[string]string, extraParams []string) error

Jump to

Keyboard shortcuts

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