Documentation
¶
Index ¶
- Variables
- func CredentialsFromConfig(encodedAuth string) (string, string, error)
- func TempDockerConfig(log hclog.Logger, target *Image, encodedAuth string) (string, error)
- func TempDockerConfigWithPassword(log hclog.Logger, target *Image, username string, password string) (string, error)
- type AccessInfo
- func (*AccessInfo) Descriptor() ([]byte, []int)deprecated
- func (m *AccessInfo) GetAuth() isAccessInfo_Auth
- func (x *AccessInfo) GetEncoded() string
- func (x *AccessInfo) GetHeader() string
- func (x *AccessInfo) GetImage() string
- func (x *AccessInfo) GetInsecure() bool
- func (x *AccessInfo) GetTag() string
- func (x *AccessInfo) GetUserPass() *AccessInfo_UserPass
- func (*AccessInfo) ProtoMessage()
- func (x *AccessInfo) ProtoReflect() protoreflect.Message
- func (x *AccessInfo) Reset()
- func (x *AccessInfo) String() string
- type AccessInfo_Encoded
- type AccessInfo_Header
- type AccessInfo_UserPass
- func (*AccessInfo_UserPass) Descriptor() ([]byte, []int)deprecated
- func (x *AccessInfo_UserPass) GetPassword() string
- func (x *AccessInfo_UserPass) GetUsername() string
- func (*AccessInfo_UserPass) ProtoMessage()
- func (x *AccessInfo_UserPass) ProtoReflect() protoreflect.Message
- func (x *AccessInfo_UserPass) Reset()
- func (x *AccessInfo_UserPass) String() string
- type AccessInfo_UserPass_
- type Auth
- type Builder
- func (b *Builder) Build(ctx context.Context, ui terminal.UI, src *component.Source, log hclog.Logger) (*Image, error)
- func (b *Builder) BuildFunc() interface{}
- func (b *Builder) BuildODR(ctx context.Context, ui terminal.UI, src *component.Source, log hclog.Logger, ...) (*Image, error)
- func (b *Builder) BuildODRFunc() interface{}
- func (b *Builder) Config() (interface{}, error)
- func (b *Builder) Documentation() (*docs.Documentation, error)
- type BuilderConfig
- type ClientConfig
- type Config
- type Deployment
- func (*Deployment) Descriptor() ([]byte, []int)deprecated
- func (x *Deployment) GetContainer() string
- 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 Image
- func (*Image) Descriptor() ([]byte, []int)deprecated
- func (x *Image) GetArchitecture() string
- func (x *Image) GetDocker() *emptypb.Empty
- func (x *Image) GetImage() string
- func (m *Image) GetLocation() isImage_Location
- func (x *Image) GetRegistry() *Image_RegistryLocation
- func (x *Image) GetTag() string
- func (x *Image) GetUnusedImg() *emptypb.Empty
- func (i *Image) Name() string
- func (*Image) ProtoMessage()
- func (x *Image) ProtoReflect() protoreflect.Message
- func (x *Image) Reset()
- func (x *Image) String() string
- type Image_Docker
- type Image_Registry
- type Image_RegistryLocation
- func (*Image_RegistryLocation) Descriptor() ([]byte, []int)deprecated
- func (x *Image_RegistryLocation) GetWaypointGenerated() bool
- func (*Image_RegistryLocation) ProtoMessage()
- func (x *Image_RegistryLocation) ProtoReflect() protoreflect.Message
- func (x *Image_RegistryLocation) Reset()
- func (x *Image_RegistryLocation) String() string
- type Image_UnusedImg
- 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 PlatformConfig
- type Registry
- func (r *Registry) AccessInfo() (*AccessInfo, error)
- func (r *Registry) AccessInfoFunc() interface{}
- func (r *Registry) Config() (interface{}, error)
- func (r *Registry) Documentation() (*docs.Documentation, error)
- func (r *Registry) Push(ctx context.Context, img *Image, ui terminal.UI, log hclog.Logger) (*Image, error)
- func (r *Registry) PushFunc() interface{}
- type Release
- type Resource
- type Resource_Container
- func (*Resource_Container) Descriptor() ([]byte, []int)deprecated
- func (x *Resource_Container) GetId() string
- func (x *Resource_Container) GetName() string
- func (*Resource_Container) ProtoMessage()
- func (x *Resource_Container) ProtoReflect() protoreflect.Message
- func (x *Resource_Container) Reset()
- func (x *Resource_Container) String() string
- type Resource_Network
- type TaskInfo
- type TaskLauncher
- func (b *TaskLauncher) Config() (interface{}, error)
- func (b *TaskLauncher) Documentation() (*docs.Documentation, error)
- func (b *TaskLauncher) StartTask(ctx context.Context, log hclog.Logger, tli *component.TaskLaunchInfo) (*TaskInfo, error)
- func (b *TaskLauncher) StartTaskFunc() interface{}
- func (b *TaskLauncher) StopTask(ctx context.Context, log hclog.Logger, ti *TaskInfo) error
- func (b *TaskLauncher) StopTaskFunc() interface{}
- func (p *TaskLauncher) WatchTask(ctx context.Context, log hclog.Logger, ti *TaskInfo, ui terminal.UI) (*component.TaskResult, error)
- func (b *TaskLauncher) WatchTaskFunc() interface{}
- type TaskLauncherConfig
- type TaskResources
Constants ¶
This section is empty.
Variables ¶
var File_waypoint_builtin_docker_plugin_proto protoreflect.FileDescriptor
var Options = []sdk.Option{ sdk.WithComponents(&Builder{}, &Registry{}, &Platform{}, &TaskLauncher{}), }
Options are the SDK options to use for instantiation.
Functions ¶
func CredentialsFromConfig ¶
CredentialsFromConfig returns the username and password present in the encoded auth string. This encoded auth string is one that users can pass as authentication information to registry.
func TempDockerConfig ¶
TempDockerConfig creates a new Docker configuration with the configured auth in it. It saves this Docker config to a temporary path and returns the path to that Docker file.
We have to do this because `img` doesn't support setting auth for a single operation. Therefore, we must set auth in the Docker config, but we don't want to pollute any concurrent runs or the main file. So we create a copy.
This can return ("", nil) if there is no custom Docker config necessary.
Callers should defer file deletion for this temporary file.
func TempDockerConfigWithPassword ¶
func TempDockerConfigWithPassword( log hclog.Logger, target *Image, username string, password string, ) (string, error)
TempDockerConfigWithPassword creates a new Docker configuration with the configured auth in it. It saves this Docker config to a temporary path and returns the path to that Docker file.
We have to do this because `img` doesn't support setting auth for a single operation. Therefore, we must set auth in the Docker config, but we don't want to pollute any concurrent runs or the main file. So we create a copy.
This can return ("", nil) if there is no custom Docker config necessary.
Callers should defer file deletion for this temporary file.
Types ¶
type AccessInfo ¶
type AccessInfo struct {
// image is the OCI compatible descriptor for the location of the image. Typically it
// is in the form `repo/name`, where repo is a host name (perhaps with a port), and
// name may also contain / use to identify subdivision on the host.
Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
// tag is the OCI compatible tag that the resulting data will be stored at within
// the repository defined by image.
Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"`
// auth indicates how to authenticate with the repository defined by image.
//
// Types that are assignable to Auth:
//
// *AccessInfo_Header
// *AccessInfo_Encoded
// *AccessInfo_UserPass_
Auth isAccessInfo_Auth `protobuf_oneof:"auth"`
// insecure indicates if the repository defined by image should be access via http or https.
Insecure bool `protobuf:"varint,5,opt,name=insecure,proto3" json:"insecure,omitempty"`
// contains filtered or unexported fields
}
func (*AccessInfo) Descriptor
deprecated
func (*AccessInfo) Descriptor() ([]byte, []int)
Deprecated: Use AccessInfo.ProtoReflect.Descriptor instead.
func (*AccessInfo) GetAuth ¶
func (m *AccessInfo) GetAuth() isAccessInfo_Auth
func (*AccessInfo) GetEncoded ¶
func (x *AccessInfo) GetEncoded() string
func (*AccessInfo) GetHeader ¶
func (x *AccessInfo) GetHeader() string
func (*AccessInfo) GetImage ¶
func (x *AccessInfo) GetImage() string
func (*AccessInfo) GetInsecure ¶
func (x *AccessInfo) GetInsecure() bool
func (*AccessInfo) GetTag ¶
func (x *AccessInfo) GetTag() string
func (*AccessInfo) GetUserPass ¶
func (x *AccessInfo) GetUserPass() *AccessInfo_UserPass
func (*AccessInfo) ProtoMessage ¶
func (*AccessInfo) ProtoMessage()
func (*AccessInfo) ProtoReflect ¶
func (x *AccessInfo) ProtoReflect() protoreflect.Message
func (*AccessInfo) Reset ¶
func (x *AccessInfo) Reset()
func (*AccessInfo) String ¶
func (x *AccessInfo) String() string
type AccessInfo_Encoded ¶
type AccessInfo_Encoded struct {
// encoded is the docker standard encoded authentication data. This is base64 encoded
// json that contains username and passwword fields that are used for authentication.
Encoded string `protobuf:"bytes,4,opt,name=encoded,proto3,oneof"`
}
type AccessInfo_Header ¶
type AccessInfo_Header struct {
// header is the value of the Authentication header that is sent to the repository.
// This allows for repositories that use bearer tokens or other sorts of authentication.
Header string `protobuf:"bytes,3,opt,name=header,proto3,oneof"`
}
type AccessInfo_UserPass ¶
type AccessInfo_UserPass struct {
// The username to authenticate against the registry with
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
// The password assocated with the above username
Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
// contains filtered or unexported fields
}
func (*AccessInfo_UserPass) Descriptor
deprecated
func (*AccessInfo_UserPass) Descriptor() ([]byte, []int)
Deprecated: Use AccessInfo_UserPass.ProtoReflect.Descriptor instead.
func (*AccessInfo_UserPass) GetPassword ¶
func (x *AccessInfo_UserPass) GetPassword() string
func (*AccessInfo_UserPass) GetUsername ¶
func (x *AccessInfo_UserPass) GetUsername() string
func (*AccessInfo_UserPass) ProtoMessage ¶
func (*AccessInfo_UserPass) ProtoMessage()
func (*AccessInfo_UserPass) ProtoReflect ¶
func (x *AccessInfo_UserPass) ProtoReflect() protoreflect.Message
func (*AccessInfo_UserPass) Reset ¶
func (x *AccessInfo_UserPass) Reset()
func (*AccessInfo_UserPass) String ¶
func (x *AccessInfo_UserPass) String() string
type AccessInfo_UserPass_ ¶
type AccessInfo_UserPass_ struct {
// user_pass specifies a username and password to use to authenticate with the registry.
// The registry plugin will transform this information to the proper format as needed.
UserPass *AccessInfo_UserPass `protobuf:"bytes,6,opt,name=user_pass,json=userPass,proto3,oneof"`
}
type Auth ¶
type Auth struct {
Hostname string `hcl:"hostname,optional"`
Username string `hcl:"username,optional"`
Password string `hcl:"password,optional"`
Email string `hcl:"email,optional"`
Auth string `hcl:"auth,optional"`
ServerAddress string `hcl:"serverAddress,optional"`
IdentityToken string `hcl:"identityToken,optional"`
RegistryToken string `hcl:"registryToken,optional"`
}
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder uses `docker build` to build a Docker image.
func (*Builder) Build ¶
func (b *Builder) Build( ctx context.Context, ui terminal.UI, src *component.Source, log hclog.Logger, ) (*Image, error)
Build
func (*Builder) BuildFunc ¶
func (b *Builder) BuildFunc() interface{}
BuildFunc implements component.Builder
func (*Builder) BuildODR ¶
func (b *Builder) BuildODR( ctx context.Context, ui terminal.UI, src *component.Source, log hclog.Logger, ai *AccessInfo, ) (*Image, error)
Build
func (*Builder) BuildODRFunc ¶
func (b *Builder) BuildODRFunc() interface{}
BuildFunc implements component.BuilderODR
func (*Builder) Documentation ¶
func (b *Builder) Documentation() (*docs.Documentation, error)
type BuilderConfig ¶
type BuilderConfig struct {
// Control whether or not to inject the entrypoint binary into the resulting image
DisableCEB bool `hcl:"disable_entrypoint,optional"`
// Controls whether or not the image should be build with buildkit or docker v1
UseBuildKit bool `hcl:"buildkit,optional"`
// The name/path to the Dockerfile if it is not the root of the project
Dockerfile string `hcl:"dockerfile,optional"`
// Controls the passing of platform flag variables
Platform string `hcl:"platform,optional"`
// Controls the passing of build time variables
BuildArgs map[string]*string `hcl:"build_args,optional"`
// Controls the passing of build context
Context string `hcl:"context,optional"`
// Authenticates to private registry
Auth *Auth `hcl:"auth,block"`
// Controls the passing of the target stage
Target string `hcl:"target,optional"`
// Disable the build cache
NoCache bool `hcl:"no_cache,optional"`
}
BuilderConfig is the configuration structure for the builder
type ClientConfig ¶
type ClientConfig struct {
// Host to use when connecting to Docker
// This can be used to connect to remote Docker instances
Host string `hcl:"host,optional"`
// Path to load the certificates for the Docker Engine
CertPath string `hcl:"cert_path,optional"`
// Docker API version to use for connection
APIVersion string `hcl:"api_version,optional"`
}
type Config ¶
type Config struct {
// Image is the name of the image plus tag that the image will be pushed as.
Image string `hcl:"image,attr"`
// Tag is the tag to apply to the image.
Tag string `hcl:"tag,attr"`
// Local if true will not push this image to a remote registry.
Local bool `hcl:"local,optional"`
// Authenticates to private registry
Auth *Auth `hcl:"auth,block"`
// The docker specific encoded authentication string to use to talk to the registry.
EncodedAuth string `hcl:"encoded_auth,optional"`
// Insecure indicates if the registry should be accessed via http rather than https
Insecure bool `hcl:"insecure,optional"`
// Username is the username to use for authentication on the registry.
Username string `hcl:"username,optional"`
// Password is the authentication information assocated with username.
Password string `hcl:"password,optional"`
}
Config is the configuration structure for the registry.
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"`
Container string `protobuf:"bytes,3,opt,name=container,proto3" json:"container,omitempty"`
ResourceState *opaqueany.Any `protobuf:"bytes,4,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) GetContainer ¶
func (x *Deployment) GetContainer() string
func (*Deployment) GetId ¶
func (x *Deployment) GetId() string
func (*Deployment) GetName ¶
func (x *Deployment) GetName() string
func (*Deployment) GetResourceState ¶
func (x *Deployment) GetResourceState() *opaqueany.Any
func (*Deployment) ProtoMessage ¶
func (*Deployment) ProtoMessage()
func (*Deployment) ProtoReflect ¶
func (x *Deployment) ProtoReflect() protoreflect.Message
func (*Deployment) Reset ¶
func (x *Deployment) Reset()
func (*Deployment) String ¶
func (x *Deployment) String() string
type Image ¶
type Image struct {
Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"`
Architecture string `protobuf:"bytes,6,opt,name=architecture,proto3" json:"architecture,omitempty"`
// location is where this image is currently. This can be used to
// determine if the image is pulled or not based on this proto rather
// than environment inspection.
//
// If this is not set, it will be assumed that the image is in a local
// Docker daemon registry for backwards compatiblity reasons.
//
// Types that are assignable to Location:
//
// *Image_Registry
// *Image_Docker
// *Image_UnusedImg
Location isImage_Location `protobuf_oneof:"location"`
// contains filtered or unexported fields
}
Image is the artifact type for the registry.
func (*Image) Descriptor
deprecated
func (*Image) GetArchitecture ¶
func (*Image) GetLocation ¶
func (m *Image) GetLocation() isImage_Location
func (*Image) GetRegistry ¶
func (x *Image) GetRegistry() *Image_RegistryLocation
func (*Image) GetUnusedImg ¶
func (*Image) ProtoMessage ¶
func (*Image) ProtoMessage()
func (*Image) ProtoReflect ¶
func (x *Image) ProtoReflect() protoreflect.Message
type Image_Docker ¶
type Image_Registry ¶
type Image_Registry struct {
// registry is set if the image is in a remote registry. This value
// might mean the image is local, too, but we never formally "pulled"
// it so we aren't sure. The image should be treated as remote.
Registry *Image_RegistryLocation `protobuf:"bytes,3,opt,name=registry,proto3,oneof"`
}
type Image_RegistryLocation ¶
type Image_RegistryLocation struct {
// waypoint_generated indicates that the Image was generated by a process
// that resulted in the fully built image being already stored in the
// registry. This is commonly done in ODR for pack and docker-build.
WaypointGenerated bool `protobuf:"varint,1,opt,name=waypoint_generated,json=waypointGenerated,proto3" json:"waypoint_generated,omitempty"`
// contains filtered or unexported fields
}
func (*Image_RegistryLocation) Descriptor
deprecated
func (*Image_RegistryLocation) Descriptor() ([]byte, []int)
Deprecated: Use Image_RegistryLocation.ProtoReflect.Descriptor instead.
func (*Image_RegistryLocation) GetWaypointGenerated ¶
func (x *Image_RegistryLocation) GetWaypointGenerated() bool
func (*Image_RegistryLocation) ProtoMessage ¶
func (*Image_RegistryLocation) ProtoMessage()
func (*Image_RegistryLocation) ProtoReflect ¶
func (x *Image_RegistryLocation) ProtoReflect() protoreflect.Message
func (*Image_RegistryLocation) Reset ¶
func (x *Image_RegistryLocation) Reset()
func (*Image_RegistryLocation) String ¶
func (x *Image_RegistryLocation) String() string
type Image_UnusedImg ¶
type Image_UnusedImg struct {
// Waypoint 0.6 and earlier supported "img" as a Dockerless builder.
// We removed this in 0.7, hence we prefix this now with "unused". We
// keep the field around so we can detect old clients sending it and
// show an error. Do not set this.
UnusedImg *emptypb.Empty `protobuf:"bytes,5,opt,name=unused_img,json=unusedImg,proto3,oneof"`
}
type Platform ¶
type Platform struct {
// contains filtered or unexported fields
}
Platform is the Platform implementation for Docker.
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, job *component.JobInfo, img *Image, deployConfig *component.DeploymentConfig, dcr *component.DeclaredResourcesResp, ui terminal.UI, ) (*Deployment, error)
Deploy deploys an image to Docker.
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 a Docker deployment.
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 ¶
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 PlatformConfig ¶
type PlatformConfig struct {
// A list of folders to mount to the container.
Binds []string `hcl:"binds,optional"`
// ClientConfig allow the user to specify the connection to the Docker
// engine. By default we try to load this from env vars:
// DOCKER_HOST to set the url to the docker server.
// DOCKER_API_VERSION to set the version of the API to reach, leave empty for latest.
// DOCKER_CERT_PATH to load the TLS certificates from.
// DOCKER_TLS_VERIFY to enable or disable TLS verification, off by default.
ClientConfig *ClientConfig `hcl:"client_config,block"`
// The command to run in the container. This is an array of arguments
// that are executed directly. These are not executed in the context of
// a shell. If you want to use a shell, add that to this command manually.
Command []string `hcl:"command,optional"`
// Force pull the image from the remote repository
ForcePull bool `hcl:"force_pull,optional"`
// Authenticates to private registry
Auth *Auth `hcl:"auth,block"`
// A map of key/value pairs, stored in docker as a string. Each key/value pair must
// be unique. Validiation occurs at the docker layer, not in Waypoint. Label
// keys are alphanumeric strings which may contain periods (.) and hyphens (-).
// See the docker docs for more info: https://docs.docker.com/config/labels-custom-metadata/
Labels map[string]string `hcl:"labels,optional"`
// An array of strings with network names to connect the container to
Networks []string `hcl:"networks,optional"`
// A map of resources to configure the container with such as memory and cpu
// limits.
Resources map[string]string `hcl:"resources,optional"`
// A path to a directory that will be created for the service to store
// temporary data.
ScratchSpace string `hcl:"scratch_path,optional"`
// Environment variables that are meant to configure the application in a static
// way. This might be control an image that has mulitple modes of operation,
// selected via environment variable. Most configuration should use the waypoint
// config commands.
StaticEnvVars map[string]string `hcl:"static_environment,optional"`
// Additional ports the application is listening on to expose on the container
ExtraPorts []uint `hcl:"extra_ports,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"`
}
Config is the configuration structure for the Platform.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry represents access to a Docker registry.
func (*Registry) AccessInfo ¶
func (r *Registry) AccessInfo() (*AccessInfo, error)
Push pushes an image to the registry.
func (*Registry) AccessInfoFunc ¶
func (r *Registry) AccessInfoFunc() interface{}
func (*Registry) Documentation ¶
func (r *Registry) Documentation() (*docs.Documentation, error)
type Release ¶
type Release struct {
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
// contains filtered or unexported fields
}
func (*Release) Descriptor
deprecated
func (*Release) ProtoMessage ¶
func (*Release) ProtoMessage()
func (*Release) ProtoReflect ¶
func (x *Release) ProtoReflect() protoreflect.Message
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
Resource contains the internal resource states.
func (*Resource) Descriptor
deprecated
func (*Resource) ProtoMessage ¶
func (*Resource) ProtoMessage()
func (*Resource) ProtoReflect ¶
func (x *Resource) ProtoReflect() protoreflect.Message
type Resource_Container ¶
type Resource_Container 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"`
// contains filtered or unexported fields
}
func (*Resource_Container) Descriptor
deprecated
func (*Resource_Container) Descriptor() ([]byte, []int)
Deprecated: Use Resource_Container.ProtoReflect.Descriptor instead.
func (*Resource_Container) GetId ¶
func (x *Resource_Container) GetId() string
func (*Resource_Container) GetName ¶
func (x *Resource_Container) GetName() string
func (*Resource_Container) ProtoMessage ¶
func (*Resource_Container) ProtoMessage()
func (*Resource_Container) ProtoReflect ¶
func (x *Resource_Container) ProtoReflect() protoreflect.Message
func (*Resource_Container) Reset ¶
func (x *Resource_Container) Reset()
func (*Resource_Container) String ¶
func (x *Resource_Container) String() string
type Resource_Network ¶
type Resource_Network struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*Resource_Network) Descriptor
deprecated
func (*Resource_Network) Descriptor() ([]byte, []int)
Deprecated: Use Resource_Network.ProtoReflect.Descriptor instead.
func (*Resource_Network) GetName ¶
func (x *Resource_Network) GetName() string
func (*Resource_Network) ProtoMessage ¶
func (*Resource_Network) ProtoMessage()
func (*Resource_Network) ProtoReflect ¶
func (x *Resource_Network) ProtoReflect() protoreflect.Message
func (*Resource_Network) Reset ¶
func (x *Resource_Network) Reset()
func (*Resource_Network) String ¶
func (x *Resource_Network) String() string
type TaskInfo ¶
type TaskInfo struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*TaskInfo) Descriptor
deprecated
func (*TaskInfo) ProtoMessage ¶
func (*TaskInfo) ProtoMessage()
func (*TaskInfo) ProtoReflect ¶
func (x *TaskInfo) ProtoReflect() protoreflect.Message
type TaskLauncher ¶
type TaskLauncher struct {
// contains filtered or unexported fields
}
TaskLauncher uses `docker build` to build a Docker iamge.
func (*TaskLauncher) Config ¶
func (b *TaskLauncher) Config() (interface{}, error)
TaskLauncher implements Configurable
func (*TaskLauncher) Documentation ¶
func (b *TaskLauncher) Documentation() (*docs.Documentation, error)
func (*TaskLauncher) StartTask ¶
func (b *TaskLauncher) StartTask( ctx context.Context, log hclog.Logger, tli *component.TaskLaunchInfo, ) (*TaskInfo, error)
StartTask creates a docker container for the task.
func (*TaskLauncher) StartTaskFunc ¶
func (b *TaskLauncher) StartTaskFunc() interface{}
BuildFunc implements component.TaskLauncher
func (*TaskLauncher) StopTaskFunc ¶
func (b *TaskLauncher) StopTaskFunc() interface{}
BuildFunc implements component.TaskLauncher
func (*TaskLauncher) WatchTask ¶
func (p *TaskLauncher) WatchTask( ctx context.Context, log hclog.Logger, ti *TaskInfo, ui terminal.UI, ) (*component.TaskResult, error)
WatchTask implements TaskLauncher
func (*TaskLauncher) WatchTaskFunc ¶
func (b *TaskLauncher) WatchTaskFunc() interface{}
WatchFunc implements component.TaskLauncher
type TaskLauncherConfig ¶
type TaskLauncherConfig struct {
// A list of folders to mount to the container.
Binds []string `hcl:"binds,optional"`
// ClientConfig allow the user to specify the connection to the Docker
// engine. By default we try to load this from env vars:
// DOCKER_HOST to set the url to the docker server.
// DOCKER_API_VERSION to set the version of the API to reach, leave empty for latest.
// DOCKER_CERT_PATH to load the TLS certificates from.
// DOCKER_TLS_VERIFY to enable or disable TLS verification, off by default.
ClientConfig *ClientConfig `hcl:"client_config,block"`
// Force pull the image from the remote repository
ForcePull bool `hcl:"force_pull,optional"`
// A map of key/value pairs, stored in docker as a string. Each key/value pair must
// be unique. Validiation occurs at the docker layer, not in Waypoint. Label
// keys are alphanumeric strings which may contain periods (.) and hyphens (-).
// See the docker docs for more info: https://docs.docker.com/config/labels-custom-metadata/
Labels map[string]string `hcl:"labels,optional"`
// An array of strings with network names to connect the container to
Networks []string `hcl:"networks,optional"`
// Resources configures the resource constraints such as cpu and memory for the
// created containers.
Resources *TaskResources `hcl:"resources,block"`
// Environment variables that are meant to configure the application in a static
// way. This might be start an image in a specific mode,
// selected via environment variable. Most configuration should use the waypoint
// config commands.
StaticEnvVars map[string]string `hcl:"static_environment,optional"`
// Keep containers around after the task finishes. This allows the ability to debug
// the containers and see their logs with the native docker tools.
DebugContainers bool `hcl:"debug_containers,optional"`
}
TaskLauncherConfig is the configuration structure for the task plugin.