builders

package
v0.4.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Architecture

func Architecture(value, operator string) func(*v1beta2.Constraints)

Architecture set the operating system constraint

func CPUs

func CPUs(cpus string) func(*v1beta2.Resource)

CPUs sets the cup of the resource

func Command

func Command(s ...string) func(*v1beta2.ServiceConfig)

Command sets the command of the service

func ConfigExternal

func ConfigExternal(c *v1beta2.ConfigObjConfig)

ConfigExternal specifies that the config is external

func ConfigFile

func ConfigFile(path string) func(*v1beta2.ConfigObjConfig)

ConfigFile specifies the path of a config

func ConfigGID

func ConfigGID(gid string) func(*v1beta2.ServiceConfigObjConfig)

ConfigGID sets the gid of the config

func ConfigMode

func ConfigMode(mode uint32) func(*v1beta2.ServiceConfigObjConfig)

ConfigMode sets the mode of the config

func ConfigSource

func ConfigSource(source string) func(*v1beta2.ServiceConfigObjConfig)

ConfigSource sets the source of the config

func ConfigTarget

func ConfigTarget(target string) func(*v1beta2.ServiceConfigObjConfig)

ConfigTarget sets the target of the config

func ConfigUID

func ConfigUID(uid string) func(*v1beta2.ServiceConfigObjConfig)

ConfigUID sets the uid of the config

func ConstraintHostname

func ConstraintHostname(value, operator string) func(*v1beta2.Constraints)

ConstraintHostname set the operating system constraint

func Constraints

func Constraints(builders ...func(*v1beta2.Constraints)) func(*v1beta2.Placement)

Constraints sets the constraints to the placement

func Daemonset

func Daemonset(owningStack *v1beta2.Stack, name string, builders ...func(*appstypes.DaemonSet)) *appstypes.DaemonSet

Daemonset creates a core Deployment as if owned by a stack

func Deploy

func Deploy(builders ...func(*v1beta2.DeployConfig)) func(*v1beta2.ServiceConfig)

Deploy sets the deploy config of the service

func Deployment

func Deployment(owningStack *v1beta2.Stack, name string, builders ...func(*appstypes.Deployment)) *appstypes.Deployment

Deployment creates a core Deployment as if owned by a stack

func Entrypoint

func Entrypoint(s ...string) func(*v1beta2.ServiceConfig)

Entrypoint sets the entrypoint of the service

func Healthcheck

func Healthcheck(builders ...func(*v1beta2.HealthCheckConfig)) func(*v1beta2.ServiceConfig)

Healthcheck sets the healthcheck config of the service

func Hostname

func Hostname(hostname string) func(*v1beta2.ServiceConfig)

Hostname sets the hostname of the service

func IPC

func IPC(mode string) func(*v1beta2.ServiceConfig)

IPC sets the ipc mode of the service

func Image

func Image(reference string) func(*v1beta2.ServiceConfig)

Image specfies the image of the service

func Interval

func Interval(duration time.Duration) func(*v1beta2.HealthCheckConfig)

Interval sets the interval duration of the healthcheck

func Limits

func Limits(builders ...func(*v1beta2.Resource)) func(*v1beta2.Resources)

Limits sets the limits of the resources

func Memory

func Memory(memory int64) func(*v1beta2.Resource)

Memory sets the memory of the resource

func ModeGlobal

func ModeGlobal(d *v1beta2.DeployConfig)

ModeGlobal sets the deploy mode to global

func Mount

func Mount(v *v1beta2.ServiceVolumeConfig)

Mount sets the volume type to mount

func OnFailure

func OnFailure(r *v1beta2.RestartPolicy)

OnFailure sets the restart policy to on-failure

func OperatingSystem

func OperatingSystem(value, operator string) func(*v1beta2.Constraints)

OperatingSystem set the operating system constraint

func PID

func PID(mode string) func(*v1beta2.ServiceConfig)

PID sets the pid mode of the service

func Parallelism

func Parallelism(parallelism uint64) func(*v1beta2.UpdateConfig)

Parallelism sets the parallelism of the update config

func Placement

func Placement(builders ...func(*v1beta2.Placement)) func(*v1beta2.DeployConfig)

Placement sets the placement of the deploy config

func Privileged

func Privileged(c *v1beta2.ServiceConfig)

Privileged sets the service to privileged

func ProtocolUDP

func ProtocolUDP(c *v1beta2.ServicePortConfig)

ProtocolUDP set's the port's protocol

func Published

func Published(published uint32) func(*v1beta2.ServicePortConfig)

Published sets the published port

func ReadOnly

func ReadOnly(c *v1beta2.ServiceConfig)

ReadOnly sets the service to read only

func Replicas

func Replicas(replicas uint64) func(*v1beta2.DeployConfig)

Replicas sets the number of replicas of a deploy config

func Reservations

func Reservations(builders ...func(*v1beta2.Resource)) func(*v1beta2.Resources)

Reservations sets the reservations of the resources

func Resources

func Resources(builders ...func(*v1beta2.Resources)) func(*v1beta2.DeployConfig)

Resources sets the resources of the deploy config

func RestartPolicy

func RestartPolicy(builders ...func(*v1beta2.RestartPolicy)) func(*v1beta2.DeployConfig)

RestartPolicy sets the restart policy of the deploy config

func Retries

func Retries(retries uint64) func(*v1beta2.HealthCheckConfig)

Retries sets the number of retries of the healthcheck

func SecretFile

func SecretFile(path string) func(*v1beta2.SecretConfig)

SecretFile specifies the path of a secret

func SecretSource

func SecretSource(source string) func(*v1beta2.ServiceSecretConfig)

SecretSource sets the source of the secret

func SecretTarget

func SecretTarget(target string) func(*v1beta2.ServiceSecretConfig)

SecretTarget sets the target of the secret

func Service

func Service(owningStack *v1beta2.Stack, name string, builders ...func(*coretypes.Service)) *coretypes.Service

Service creates a core Service as if owned by a stack

func Source

func Source(source string) func(*v1beta2.ServiceVolumeConfig)

Source sets the volume source

func Stack

func Stack(name string, builders ...func(*v1beta2.Stack)) *v1beta2.Stack

Stack is a builder to create an Stack

func Statefulset

func Statefulset(owningStack *v1beta2.Stack, name string, builders ...func(*appstypes.StatefulSet)) *appstypes.StatefulSet

Statefulset creates a core Deployment as if owned by a stack

func StdinOpen

func StdinOpen(s *v1beta2.ServiceConfig)

StdinOpen sets the service's stdin opne to true

func StopGracePeriod

func StopGracePeriod(duration time.Duration) func(*v1beta2.ServiceConfig)

StopGracePeriod specifies the stop-grace-period duration of a service

func Target

func Target(target string) func(*v1beta2.ServiceVolumeConfig)

Target sets the volume target

func Test

func Test(cmd ...string) func(*v1beta2.HealthCheckConfig)

Test sets the test commands of the healthcheck

func Timeout

func Timeout(duration time.Duration) func(*v1beta2.HealthCheckConfig)

Timeout sets the timeout duration of the healthcheck

func Tty

func Tty(s *v1beta2.ServiceConfig)

Tty sets the service's tty to true

func Update

func Update(builders ...func(*v1beta2.UpdateConfig)) func(*v1beta2.DeployConfig)

Update sets the update config of a deploy config

func User

func User(user int64) func(*v1beta2.ServiceConfig)

User specifies the user of a service

func Volume

func Volume(v *v1beta2.ServiceVolumeConfig)

Volume sets the volume type to volume

func VolumeReadOnly

func VolumeReadOnly(v *v1beta2.ServiceVolumeConfig)

VolumeReadOnly sets the volume to readonly

func WithCapAdd

func WithCapAdd(caps ...string) func(*v1beta2.ServiceConfig)

WithCapAdd add a cap add to the service

func WithCapDrop

func WithCapDrop(caps ...string) func(*v1beta2.ServiceConfig)

WithCapDrop adds a cap drop to the service

func WithConfig

func WithConfig(builders ...func(*v1beta2.ServiceConfigObjConfig)) func(*v1beta2.ServiceConfig)

WithConfig adds a config to the service

func WithConfigObjConfig

func WithConfigObjConfig(name string, builders ...func(*v1beta2.ConfigObjConfig)) func(*v1beta2.Stack)

WithConfigObjConfig add a ConfigConfig to to stack

func WithDeployLabel

func WithDeployLabel(key, value string) func(*v1beta2.DeployConfig)

WithDeployLabel adds a label to the deploy config

func WithEnvironment

func WithEnvironment(key string, value *string) func(*v1beta2.ServiceConfig)

WithEnvironment adds an environment variable to the service

func WithExtraHost

func WithExtraHost(host string) func(*v1beta2.ServiceConfig)

WithExtraHost adds an extra host to the service

func WithLabel

func WithLabel(key, value string) func(*v1beta2.ServiceConfig)

WithLabel adds a label to a service

func WithMatchLabel

func WithMatchLabel(key, value, operator string) func(*v1beta2.Constraints)

WithMatchLabel adds the labels constraint to the constraint

func WithNamespace

func WithNamespace(namespace string) func(*v1beta2.Stack)

WithNamespace set the namespace of the stack

func WithPort

func WithPort(target uint32, builders ...func(*v1beta2.ServicePortConfig)) func(*v1beta2.ServiceConfig)

WithPort adds a port config to the service

func WithSecret

func WithSecret(builders ...func(*v1beta2.ServiceSecretConfig)) func(*v1beta2.ServiceConfig)

WithSecret adds a secret to the service

func WithSecretConfig

func WithSecretConfig(name string, builders ...func(*v1beta2.SecretConfig)) func(*v1beta2.Stack)

WithSecretConfig add a SecretConfig to to stack

func WithService

func WithService(name string, builders ...func(*v1beta2.ServiceConfig)) func(*v1beta2.Stack)

WithService adds a ServiceConifg to the stack

func WithTmpFS

func WithTmpFS(path string) func(*v1beta2.ServiceConfig)

WithTmpFS adds a path to the tmpfs of a service

func WithVolume

func WithVolume(builders ...func(*v1beta2.ServiceVolumeConfig)) func(*v1beta2.ServiceConfig)

WithVolume adds a volume to the service

func WorkingDir

func WorkingDir(w string) func(*v1beta2.ServiceConfig)

WorkingDir sets the service's working folder

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL