Documentation
¶
Index ¶
- Variables
- type Config
- type Platform
- func (p *Platform) Config() (interface{}, error)
- func (p *Platform) Deploy(ctx context.Context, log hclog.Logger, src *component.Source, ...) (*nomad.Deployment, error)
- func (p *Platform) DeployFunc() interface{}
- func (p *Platform) Destroy(ctx context.Context, log hclog.Logger, deployment *nomad.Deployment, ...) error
- func (p *Platform) DestroyFunc() interface{}
- func (p *Platform) Documentation() (*docs.Documentation, error)
- func (p *Platform) Generation(ctx context.Context, log hclog.Logger, src *component.Source, ...) ([]byte, error)
- func (p *Platform) GenerationFunc() interface{}
Constants ¶
This section is empty.
Variables ¶
View Source
var Options = []sdk.Option{ sdk.WithComponents(&Platform{}), }
Options are the SDK options to use for instantiation for the Nomad plugin.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // The path to the job specification to load. Jobspec string `hcl:"jobspec,attr"` }
Config is the configuration structure for the Platform.
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
Platform is the Platform implementation for Nomad.
func (*Platform) Deploy ¶
func (p *Platform) Deploy( ctx context.Context, log hclog.Logger, src *component.Source, img *docker.Image, deployConfig *component.DeploymentConfig, ui terminal.UI, ) (*nomad.Deployment, error)
Deploy deploys an image to Nomad.
func (*Platform) DeployFunc ¶
func (p *Platform) DeployFunc() interface{}
DeployFunc implements component.Platform
func (*Platform) Destroy ¶
func (p *Platform) Destroy( ctx context.Context, log hclog.Logger, deployment *nomad.Deployment, ui terminal.UI, ) error
Destroy deletes the Nomad job.
func (*Platform) DestroyFunc ¶
func (p *Platform) DestroyFunc() interface{}
DestroyFunc implements component.Destroyer
func (*Platform) Documentation ¶
func (p *Platform) Documentation() (*docs.Documentation, error)
func (*Platform) Generation ¶
func (p *Platform) Generation( ctx context.Context, log hclog.Logger, src *component.Source, img *docker.Image, deployConfig *component.DeploymentConfig, ui terminal.UI, ) ([]byte, error)
Generation returns the generation ID. The ID we use is the name of the job since this is the unique ID that determines insert vs. update behavior for Nomad.
func (*Platform) GenerationFunc ¶
func (p *Platform) GenerationFunc() interface{}
GenerationFunc implements component.Generation
Click to show internal directories.
Click to hide internal directories.