Documentation
¶
Index ¶
- Variables
- type AuthConfig
- type Config
- type Deployment
- func (*Deployment) Descriptor() ([]byte, []int)
- func (m *Deployment) GetId() string
- func (m *Deployment) GetName() string
- func (*Deployment) ProtoMessage()
- func (m *Deployment) Reset()
- func (m *Deployment) String() string
- func (m *Deployment) XXX_DiscardUnknown()
- func (m *Deployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Deployment) XXX_Merge(src proto.Message)
- func (m *Deployment) XXX_Size() int
- func (m *Deployment) XXX_Unmarshal(b []byte) error
- 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) ValidateAuth() error
- func (p *Platform) ValidateAuthFunc() 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 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"` // 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"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Deployment) Descriptor ¶
func (*Deployment) Descriptor() ([]byte, []int)
func (*Deployment) GetId ¶
func (m *Deployment) GetId() string
func (*Deployment) GetName ¶
func (m *Deployment) GetName() string
func (*Deployment) ProtoMessage ¶
func (*Deployment) ProtoMessage()
func (*Deployment) Reset ¶
func (m *Deployment) Reset()
func (*Deployment) String ¶
func (m *Deployment) String() string
func (*Deployment) XXX_DiscardUnknown ¶
func (m *Deployment) XXX_DiscardUnknown()
func (*Deployment) XXX_Marshal ¶
func (m *Deployment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Deployment) XXX_Merge ¶
func (m *Deployment) XXX_Merge(src proto.Message)
func (*Deployment) XXX_Size ¶
func (m *Deployment) XXX_Size() int
func (*Deployment) XXX_Unmarshal ¶
func (m *Deployment) XXX_Unmarshal(b []byte) error
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) ValidateAuth ¶
func (*Platform) ValidateAuthFunc ¶
func (p *Platform) ValidateAuthFunc() interface{}
ValidateAuthFunc implements component.Authenticator
Click to show internal directories.
Click to hide internal directories.