nomad

package
v0.0.0-...-17df6bf Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInput

type BuildInput struct {
	Config MixinConfig
}

BuildInput represents stdin passed to the mixin for the build command.

type Install

type Install struct {
	Nomad Nomad `yaml:"nomad"`
}

type InstallAction

type InstallAction struct {
	Install []Install `yaml:"install"`
}

type Job

type Job struct {
	// outputs to be used in next steps of porter bundle
	Outputs []NomadOutput `yaml:"outputs"`

	// regular job run
	Path string `yaml:"path,omitempty"`

	// dispatch job run
	Dispatch         string            `yaml:"dispatch,omitempty"`
	IdPrefixTemplate string            `yaml:"idPrefixTemplate"`
	Payload          string            `yaml:"payload"` //todo make PayloadPath?
	Meta             map[string]string `yaml:"meta,omitempty"`

	// job stop
	Stop  string `yaml:"stop,omitempty"`
	Purge bool   `yaml:"purge,omitempty"`

	// nomad client config
	Address   string `yaml:"address"`
	Region    string `yaml:"region"`
	Namespace string `yaml:"namespace"`

	CaCert        string `yaml:"caCert"`
	CaPath        string `yaml:"caPath"`
	ClientCert    string `yaml:"clientCert"`
	ClientKey     string `yaml:"clientKey"`
	TlsServerName string `yaml:"tlsServerName"`
	TlsSkipVerify bool   `yaml:"tlsSkipVerify"`

	// acl
	Token string `yaml:"token"`
}

type Mixin

type Mixin struct {
	runtime.RuntimeConfig
	ClientVersion string
}

func New

func New() *Mixin

New azure mixin client, initialized with useful defaults.

func (*Mixin) Build

func (m *Mixin) Build(ctx context.Context) error

Build will generate the necessary Dockerfile lines for an invocation image using this mixin

func (*Mixin) DoAction

func (m *Mixin) DoAction(action *Nomad) error

func (*Mixin) Install

func (m *Mixin) Install(context context.Context) error

func (*Mixin) PrintSchema

func (m *Mixin) PrintSchema()

func (*Mixin) PrintVersion

func (m *Mixin) PrintVersion(opts version.Options) error

func (*Mixin) Uninstall

func (m *Mixin) Uninstall(context context.Context) error

func (*Mixin) Upgrade

func (m *Mixin) Upgrade(context context.Context) error

type MixinConfig

type MixinConfig struct {
}

type Nomad

type Nomad struct {
	Jobs []Job `yaml:"jobs"`
}

type NomadOutput

type NomadOutput struct {
	Name string `yaml:"name"`
	Key  string `yaml:"key"`
}

type TestMixin

type TestMixin struct {
	*Mixin
	TestContext *portercontext.TestContext
}

func NewTestMixin

func NewTestMixin(t *testing.T) *TestMixin

NewTestMixin initializes a mixin test client, with the output buffered, and an in-memory file system.

type Uninstall

type Uninstall struct {
	Nomad Nomad `yaml:"nomad"`
}

type UninstallAction

type UninstallAction struct {
	Uninstalls []Uninstall `yaml:"uninstall"`
}

type Upgrade

type Upgrade struct {
	Nomad Nomad `yaml:"nomad"`
}

type UpgradeAction

type UpgradeAction struct {
	Upgrade []Upgrade `yaml:"upgrade"`
}

Jump to

Keyboard shortcuts

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