Documentation
¶
Index ¶
- Variables
- type Config
- type Deployment
- func (*Deployment) Descriptor() ([]byte, []int)deprecated
- func (x *Deployment) GetId() string
- func (x *Deployment) GetName() string
- func (x *Deployment) GetResourceState() *opaqueany.Any
- func (*Deployment) ProtoMessage()
- func (x *Deployment) ProtoReflect() protoreflect.Message
- func (x *Deployment) Reset()
- func (x *Deployment) String() string
- type Platform
- func (p *Platform) Config() (interface{}, error)
- func (p *Platform) Deploy(ctx context.Context, log hclog.Logger, src *component.Source, ...) (*Deployment, error)
- func (p *Platform) DeployFunc() interface{}
- func (p *Platform) Destroy(ctx context.Context, log hclog.Logger, deployment *Deployment, ui terminal.UI) 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{}
- func (p *Platform) Status(ctx context.Context, log hclog.Logger, deployment *Deployment, ui terminal.UI) (*sdk.StatusReport, error)
- func (p *Platform) StatusFunc() interface{}
- type Release
- func (*Release) Descriptor() ([]byte, []int)deprecated
- func (x *Release) GetResourceState() *opaqueany.Any
- func (x *Release) GetUrl() string
- func (*Release) ProtoMessage()
- func (x *Release) ProtoReflect() protoreflect.Message
- func (x *Release) Reset()
- func (x *Release) String() string
- func (r *Release) URL() string
- type Releaser
- func (r *Releaser) Config() (interface{}, error)
- func (r *Releaser) Destroy(ctx context.Context, log hclog.Logger, release *Release, ui terminal.UI) error
- func (r *Releaser) DestroyFunc() interface{}
- func (r *Releaser) Documentation() (*docs.Documentation, error)
- func (r *Releaser) Release(ctx context.Context, log hclog.Logger, src *component.Source, ...) (*Release, error)
- func (r *Releaser) ReleaseFunc() interface{}
- func (r *Releaser) Status(ctx context.Context, log hclog.Logger, release *Release, ui terminal.UI) (*sdk.StatusReport, error)
- func (r *Releaser) StatusFunc() interface{}
- type ReleaserConfig
- type Resource
- type Resource_Job
Constants ¶
This section is empty.
Variables ¶
var File_waypoint_builtin_nomad_jobspec_plugin_proto protoreflect.FileDescriptor
var Options = []sdk.Option{
sdk.WithComponents(&Platform{}, &Releaser{}),
}
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"`
// Signifies whether the jobspec should be parsed as HCL1 or not
Hcl1 bool `hcl:"hcl1,optional"`
}
Config is the configuration structure for the Platform.
type Deployment ¶ added in v0.8.0
type Deployment struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
ResourceState *opaqueany.Any `protobuf:"bytes,3,opt,name=resource_state,json=resourceState,proto3" json:"resource_state,omitempty"`
// contains filtered or unexported fields
}
func (*Deployment) Descriptor
deprecated
added in
v0.8.0
func (*Deployment) Descriptor() ([]byte, []int)
Deprecated: Use Deployment.ProtoReflect.Descriptor instead.
func (*Deployment) GetResourceState ¶ added in v0.8.0
func (x *Deployment) GetResourceState() *opaqueany.Any
func (*Deployment) ProtoMessage ¶ added in v0.8.0
func (*Deployment) ProtoMessage()
func (*Deployment) ProtoReflect ¶ added in v0.8.0
func (x *Deployment) ProtoReflect() protoreflect.Message
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
Platform is the Platform implementation for Nomad.
func (*Platform) Config ¶
func (p *Platform) Config() (interface{}, error)
Config implements Configurable
func (*Platform) Deploy ¶
func (p *Platform) Deploy(
ctx context.Context,
log hclog.Logger,
src *component.Source,
img *docker.Image,
deployConfig *component.DeploymentConfig,
dcr *component.DeclaredResourcesResp,
ui terminal.UI,
) (*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 *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
func (*Platform) Status ¶ added in v0.8.0
func (p *Platform) Status(
ctx context.Context,
log hclog.Logger,
deployment *Deployment,
ui terminal.UI,
) (*sdk.StatusReport, error)
func (*Platform) StatusFunc ¶ added in v0.8.0
func (p *Platform) StatusFunc() interface{}
StatusFunc implements component.Status
type Release ¶ added in v0.8.0
type Release struct {
Url string `protobuf:"bytes,1,opt,name=Url,proto3" json:"Url,omitempty"`
ResourceState *opaqueany.Any `protobuf:"bytes,2,opt,name=resource_state,json=resourceState,proto3" json:"resource_state,omitempty"`
// contains filtered or unexported fields
}
func (*Release) Descriptor
deprecated
added in
v0.8.0
func (*Release) Descriptor() ([]byte, []int)
Deprecated: Use Release.ProtoReflect.Descriptor instead.
func (*Release) GetResourceState ¶ added in v0.8.0
func (x *Release) GetResourceState() *opaqueany.Any
func (*Release) ProtoMessage ¶ added in v0.8.0
func (*Release) ProtoMessage()
func (*Release) ProtoReflect ¶ added in v0.8.0
func (x *Release) ProtoReflect() protoreflect.Message
type Releaser ¶ added in v0.8.0
type Releaser struct {
// contains filtered or unexported fields
}
Releaser is the ReleaseManager implementation for Nomad.
func (*Releaser) Config ¶ added in v0.8.0
func (r *Releaser) Config() (interface{}, error)
Config implements Configurable
func (*Releaser) Destroy ¶ added in v0.8.0
func (r *Releaser) Destroy(
ctx context.Context,
log hclog.Logger,
release *Release,
ui terminal.UI,
) error
func (*Releaser) DestroyFunc ¶ added in v0.8.0
func (r *Releaser) DestroyFunc() interface{}
DestroyFunc implements component.Destroyer
func (*Releaser) Documentation ¶ added in v0.8.0
func (r *Releaser) Documentation() (*docs.Documentation, error)
func (*Releaser) Release ¶ added in v0.8.0
func (r *Releaser) Release(
ctx context.Context,
log hclog.Logger,
src *component.Source,
job *component.JobInfo,
ui terminal.UI,
target *Deployment,
dcr *component.DeclaredResourcesResp,
) (*Release, error)
Release promotes the Nomad canary deployment
func (*Releaser) ReleaseFunc ¶ added in v0.8.0
func (r *Releaser) ReleaseFunc() interface{}
ReleaseFunc implements component.ReleaseManager
func (*Releaser) Status ¶ added in v0.8.0
func (r *Releaser) Status(
ctx context.Context,
log hclog.Logger,
release *Release,
ui terminal.UI,
) (*sdk.StatusReport, error)
func (*Releaser) StatusFunc ¶ added in v0.8.0
func (r *Releaser) StatusFunc() interface{}
StatusFunc implements component.Status
type ReleaserConfig ¶ added in v0.8.0
type ReleaserConfig struct {
// List of task group names which are to be promoted
Groups []string `hcl:"groups,optional"`
// If true, marks the deployment as failed
FailDeployment bool `hcl:"fail_deployment,optional"`
}
ReleaserConfig is the configuration structure for the Releaser.
type Resource ¶ added in v0.8.0
type Resource struct {
// contains filtered or unexported fields
}
Resource contains the internal resource states.
func (*Resource) Descriptor
deprecated
added in
v0.8.0
func (*Resource) Descriptor() ([]byte, []int)
Deprecated: Use Resource.ProtoReflect.Descriptor instead.
func (*Resource) ProtoMessage ¶ added in v0.8.0
func (*Resource) ProtoMessage()
func (*Resource) ProtoReflect ¶ added in v0.8.0
func (x *Resource) ProtoReflect() protoreflect.Message
type Resource_Job ¶ added in v0.8.0
type Resource_Job struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*Resource_Job) Descriptor
deprecated
added in
v0.8.0
func (*Resource_Job) Descriptor() ([]byte, []int)
Deprecated: Use Resource_Job.ProtoReflect.Descriptor instead.
func (*Resource_Job) ProtoMessage ¶ added in v0.8.0
func (*Resource_Job) ProtoMessage()
func (*Resource_Job) ProtoReflect ¶ added in v0.8.0
func (x *Resource_Job) ProtoReflect() protoreflect.Message