Documentation
¶
Index ¶
- Variables
- func NewMonitor(ui terminal.Status, client *api.Client) *monitor
- type AuthConfig
- type Config
- type Deployment
- func (*Deployment) Descriptor() ([]byte, []int)deprecated
- func (x *Deployment) GetId() string
- func (x *Deployment) GetName() string
- func (x *Deployment) GetResourceState() *anypb.Any
- func (*Deployment) ProtoMessage()
- func (x *Deployment) ProtoReflect() protoreflect.Message
- func (x *Deployment) Reset()
- func (x *Deployment) String() string
- type Platform
- func (p *Platform) Auth() error
- func (p *Platform) AuthFunc() interface{}
- 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) Status(ctx context.Context, log hclog.Logger, deployment *Deployment, ui terminal.UI) (*sdk.StatusReport, error)
- func (p *Platform) StatusFunc() interface{}
- func (p *Platform) ValidateAuth() error
- func (p *Platform) ValidateAuthFunc() interface{}
- type Resource
- type Resource_Job
- type Resources
Constants ¶
This section is empty.
Variables ¶
var File_waypoint_builtin_nomad_plugin_proto protoreflect.FileDescriptor
var Options = []sdk.Option{ sdk.WithComponents(&Platform{}), }
Options are the SDK options to use for instantiation for the Nomad plugin.
Functions ¶
Types ¶
type AuthConfig ¶ added in v0.1.4
AuthConfig maps the the Nomad Docker driver 'auth' config block and is used to set credentials for pulling images from the registry
type Config ¶
type Config struct {
// The credential of docker registry.
Auth *AuthConfig `hcl:"auth,block"`
// The number of replicas of the service to maintain. If this number is maintained
// outside waypoint, do not set this variable.
Count int `hcl:"replicas,optional"`
// The datacenters to deploy to, defaults to ["dc1"]
Datacenter string `hcl:"datacenter,optional"`
// The namespace of the job
Namespace string `hcl:"namespace,optional"`
// The Nomad region to deploy to, defaults to "global"
Region string `hcl:"region,optional"`
// The amount of resources to allocate to the Nomad task for the deployed
// application
Resources *Resources `hcl:"resources,block"`
// Port that your service is running on within the actual container.
// Defaults to port 3000.
// TODO Evaluate if this should remain as a default 3000, should be a required field,
// or default to another port.
ServicePort uint `hcl:"service_port,optional"`
// Environment variables that are meant to configure the application in a static
// way. This might be control an image that has multiple modes of operation,
// selected via environment variable. Most configuration should use the waypoint
// config commands.
StaticEnvVars map[string]string `hcl:"static_environment,optional"`
}
Config is the configuration structure for the Platform.
type Deployment ¶
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 *anypb.Any `protobuf:"bytes,3,opt,name=resource_state,json=resourceState,proto3" json:"resource_state,omitempty"`
// contains filtered or unexported fields
}
func (*Deployment) Descriptor
deprecated
func (*Deployment) Descriptor() ([]byte, []int)
Deprecated: Use Deployment.ProtoReflect.Descriptor instead.
func (*Deployment) GetId ¶
func (x *Deployment) GetId() string
func (*Deployment) GetName ¶
func (x *Deployment) GetName() string
func (*Deployment) GetResourceState ¶ added in v0.5.0
func (x *Deployment) GetResourceState() *anypb.Any
func (*Deployment) ProtoMessage ¶
func (*Deployment) ProtoMessage()
func (*Deployment) ProtoReflect ¶ added in v0.5.0
func (x *Deployment) ProtoReflect() protoreflect.Message
func (*Deployment) Reset ¶
func (x *Deployment) Reset()
func (*Deployment) String ¶
func (x *Deployment) String() string
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
Platform is the Platform implementation for Nomad.
func (*Platform) AuthFunc ¶
func (p *Platform) AuthFunc() interface{}
AuthFunc implements component.Authenticator
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, ) (*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) StatusFunc ¶ added in v0.4.0
func (p *Platform) StatusFunc() interface{}
StatusFunc implements component.Status
func (*Platform) ValidateAuth ¶
func (*Platform) ValidateAuthFunc ¶
func (p *Platform) ValidateAuthFunc() interface{}
ValidateAuthFunc implements component.Authenticator
type Resource ¶ added in v0.5.0
type Resource struct {
// contains filtered or unexported fields
}
Resource contains the internal resource states.
func (*Resource) Descriptor
deprecated
added in
v0.5.0
func (*Resource) ProtoMessage ¶ added in v0.5.0
func (*Resource) ProtoMessage()
func (*Resource) ProtoReflect ¶ added in v0.5.0
func (x *Resource) ProtoReflect() protoreflect.Message
type Resource_Job ¶ added in v0.5.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.5.0
func (*Resource_Job) Descriptor() ([]byte, []int)
Deprecated: Use Resource_Job.ProtoReflect.Descriptor instead.
func (*Resource_Job) GetName ¶ added in v0.5.0
func (x *Resource_Job) GetName() string
func (*Resource_Job) ProtoMessage ¶ added in v0.5.0
func (*Resource_Job) ProtoMessage()
func (*Resource_Job) ProtoReflect ¶ added in v0.5.0
func (x *Resource_Job) ProtoReflect() protoreflect.Message
func (*Resource_Job) Reset ¶ added in v0.5.0
func (x *Resource_Job) Reset()
func (*Resource_Job) String ¶ added in v0.5.0
func (x *Resource_Job) String() string