Documentation ¶
Overview ¶
Package apps provides a cf compatible way of managing Knative Services as cf apps.
Index ¶
- Constants
- func AppImageName(namespace, appName string) string
- func BuildName() string
- func ConditionDeleted(_ *v1alpha1.App, apiErr error) (bool, error)
- func ConditionServiceBindingsReady(app *v1alpha1.App, apiErr error) (isFinal bool, err error)
- func FormatDiff(w io.Writer, leftName, rightName string, left, right *v1alpha1.App)
- func JoinRepositoryImage(repository, imageName string) string
- func NewHealthCheck(healthCheckType string, endpoint string, timeoutSeconds int) (*corev1.Probe, error)
- func SourceImageName(namespace, appName string) string
- type Client
- type ClientExtension
- type ConditionFuncE
- type CreateOption
- type CreateOptions
- type DeleteOption
- type DeleteOptions
- type DeployOption
- type DeployOptions
- type GetOption
- type GetOptions
- type KfApp
- func (k *KfApp) DeleteEnvVars(names []string)
- func (k *KfApp) GetCPU() *resource.Quantity
- func (k *KfApp) GetClusterURL() string
- func (k *KfApp) GetContainerPorts() []corev1.ContainerPort
- func (k *KfApp) GetEnvVars() []corev1.EnvVar
- func (k *KfApp) GetHealthCheck() *corev1.Probe
- func (k *KfApp) GetImage() string
- func (k *KfApp) GetMemory() *resource.Quantity
- func (k *KfApp) GetName() string
- func (k *KfApp) GetNamespace() string
- func (k *KfApp) GetServiceAccount() string
- func (k *KfApp) GetServiceBindings() []v1alpha1.AppSpecServiceBinding
- func (k *KfApp) GetStorage() *resource.Quantity
- func (k *KfApp) MergeEnvVars(env []corev1.EnvVar)
- func (k *KfApp) SetCPU(cpu *resource.Quantity)
- func (k *KfApp) SetContainerPorts(ports []corev1.ContainerPort)
- func (k *KfApp) SetEnvVars(env []corev1.EnvVar)
- func (k *KfApp) SetHealthCheck(probe *corev1.Probe)
- func (k *KfApp) SetImage(imageName string)
- func (k *KfApp) SetMemory(memory *resource.Quantity)
- func (k *KfApp) SetName(name string)
- func (k *KfApp) SetNamespace(namespace string)
- func (k *KfApp) SetServiceAccount(sa string)
- func (k *KfApp) SetSource(src sources.KfSource)
- func (k *KfApp) SetStorage(storage *resource.Quantity)
- func (k *KfApp) ToApp() *v1alpha1.App
- type List
- type ListOption
- type ListOptions
- type Merger
- type Mutator
- type MutatorList
- type Predicate
- type PushOption
- func WithPushBuildpack(val string) PushOption
- func WithPushCPU(val *resource.Quantity) PushOption
- func WithPushContainerImage(val string) PushOption
- func WithPushDefaultRouteDomain(val string) PushOption
- func WithPushDiskQuota(val *resource.Quantity) PushOption
- func WithPushEnvironmentVariables(val map[string]string) PushOption
- func WithPushExactScale(val *int) PushOption
- func WithPushGrpc(val bool) PushOption
- func WithPushHealthCheck(val *corev1.Probe) PushOption
- func WithPushMaxScale(val *int) PushOption
- func WithPushMemory(val *resource.Quantity) PushOption
- func WithPushMinScale(val *int) PushOption
- func WithPushNamespace(val string) PushOption
- func WithPushNoStart(val bool) PushOption
- func WithPushOutput(val io.Writer) PushOption
- func WithPushRandomRouteDomain(val string) PushOption
- func WithPushRoutes(val []v1alpha1.RouteSpecFields) PushOption
- func WithPushServiceBindings(val []v1alpha1.AppSpecServiceBinding) PushOption
- func WithPushSourceImage(val string) PushOption
- func WithPushStack(val string) PushOption
- type PushOptions
- func (opts PushOptions) Buildpack() string
- func (opts PushOptions) CPU() *resource.Quantity
- func (opts PushOptions) ContainerImage() string
- func (opts PushOptions) DefaultRouteDomain() string
- func (opts PushOptions) DiskQuota() *resource.Quantity
- func (opts PushOptions) EnvironmentVariables() map[string]string
- func (opts PushOptions) ExactScale() *int
- func (opts PushOptions) Extend(other PushOptions) PushOptions
- func (opts PushOptions) Grpc() bool
- func (opts PushOptions) HealthCheck() *corev1.Probe
- func (opts PushOptions) MaxScale() *int
- func (opts PushOptions) Memory() *resource.Quantity
- func (opts PushOptions) MinScale() *int
- func (opts PushOptions) Namespace() string
- func (opts PushOptions) NoStart() bool
- func (opts PushOptions) Output() io.Writer
- func (opts PushOptions) RandomRouteDomain() string
- func (opts PushOptions) Routes() []v1alpha1.RouteSpecFields
- func (opts PushOptions) ServiceBindings() []v1alpha1.AppSpecServiceBinding
- func (opts PushOptions) SourceImage() string
- func (opts PushOptions) Stack() string
- type Pusher
- type UpdateOption
- type UpdateOptions
Examples ¶
Constants ¶
const ( // Kind contains the kind for the backing Kubernetes API. Kind = "App" // APIVersion contains the version for the backing Kubernetes API. APIVersion = "v1alpha1" )
Variables ¶
This section is empty.
Functions ¶
func AppImageName ¶
AppImageName gets the image name for an application.
func BuildName ¶
func BuildName() string
BuildName gets a build name based on the current time. Build names are limited by Knative to be 64 characters long.
func ConditionDeleted ¶
ConditionDeleted is a ConditionFuncE that succeeds if the error returned by the cluster was a not found error.
func ConditionServiceBindingsReady ¶
ConditionServiceBindingsReady returns true if service bindings are ready and errors if the bindings failed.
func FormatDiff ¶
FormatDiff creates a diff between two v1alpha1.Apps and writes it to the given writer.
func JoinRepositoryImage ¶
JoinRepositoryImage joins a repository and image name.
func NewHealthCheck ¶
func NewHealthCheck(healthCheckType string, endpoint string, timeoutSeconds int) (*corev1.Probe, error)
NewHealthCheck creates a corev1.Probe that maps the health checks CloudFoundry does.
func SourceImageName ¶
SourceImageName gets the image name for source code for an application.
Types ¶
type Client ¶
type Client interface { Create(namespace string, obj *v1alpha1.App, opts ...CreateOption) (*v1alpha1.App, error) Update(namespace string, obj *v1alpha1.App, opts ...UpdateOption) (*v1alpha1.App, error) Transform(namespace string, name string, transformer Mutator) (*v1alpha1.App, error) Get(namespace string, name string, opts ...GetOption) (*v1alpha1.App, error) Delete(namespace string, name string, opts ...DeleteOption) error List(namespace string, opts ...ListOption) ([]v1alpha1.App, error) Upsert(namespace string, newObj *v1alpha1.App, merge Merger) (*v1alpha1.App, error) WaitFor(ctx context.Context, namespace string, name string, interval time.Duration, condition Predicate) (*v1alpha1.App, error) WaitForE(ctx context.Context, namespace string, name string, interval time.Duration, condition ConditionFuncE) (*v1alpha1.App, error) // ClientExtension can be used by the developer to extend the client. ClientExtension }
Client is the interface for interacting with v1alpha1.App types as App CF style objects.
type ClientExtension ¶
type ClientExtension interface { DeleteInForeground(namespace string, name string) error DeployLogsForApp(out io.Writer, app *v1alpha1.App) error DeployLogs(out io.Writer, appName, resourceVersion, namespace string, noStart bool) error Restart(namespace, name string) error Restage(namespace, name string) (*v1alpha1.App, error) }
ClientExtension holds additional functions that should be exposed by client.
type ConditionFuncE ¶
ConditionFuncE is a callback used by WaitForE. Done should be set to true once the condition succeeds and shouldn't be called anymore. The error will be passed back to the user.
This function MAY retrieve a nil instance and an apiErr. It's up to the function to decide how to handle the apiErr.
type CreateOption ¶
type CreateOption func(*createConfig)
CreateOption is a single option for configuring a createConfig
type CreateOptions ¶
type CreateOptions []CreateOption
CreateOptions is a configuration set defining a createConfig
func CreateOptionDefaults ¶
func CreateOptionDefaults() CreateOptions
CreateOptionDefaults gets the default values for Create.
func (CreateOptions) Extend ¶
func (opts CreateOptions) Extend(other CreateOptions) CreateOptions
Extend creates a new CreateOptions with the contents of other overriding the values set in this CreateOptions.
type DeleteOption ¶
type DeleteOption func(*deleteConfig)
DeleteOption is a single option for configuring a deleteConfig
func WithDeleteDeleteImmediately ¶
func WithDeleteDeleteImmediately(val bool) DeleteOption
WithDeleteDeleteImmediately creates an Option that sets If the resource should be deleted immediately.
func WithDeleteForegroundDeletion ¶
func WithDeleteForegroundDeletion(val bool) DeleteOption
WithDeleteForegroundDeletion creates an Option that sets If the resource should be deleted in the foreground.
type DeleteOptions ¶
type DeleteOptions []DeleteOption
DeleteOptions is a configuration set defining a deleteConfig
func DeleteOptionDefaults ¶
func DeleteOptionDefaults() DeleteOptions
DeleteOptionDefaults gets the default values for Delete.
func (DeleteOptions) DeleteImmediately ¶
func (opts DeleteOptions) DeleteImmediately() bool
DeleteImmediately returns the last set value for DeleteImmediately or the empty value if not set.
func (DeleteOptions) Extend ¶
func (opts DeleteOptions) Extend(other DeleteOptions) DeleteOptions
Extend creates a new DeleteOptions with the contents of other overriding the values set in this DeleteOptions.
func (DeleteOptions) ForegroundDeletion ¶
func (opts DeleteOptions) ForegroundDeletion() bool
ForegroundDeletion returns the last set value for ForegroundDeletion or the empty value if not set.
type DeployOption ¶
type DeployOption func(*deployConfig)
DeployOption is a single option for configuring a deployConfig
func WithDeployNamespace ¶
func WithDeployNamespace(val string) DeployOption
WithDeployNamespace creates an Option that sets the Kubernetes namespace to use
type DeployOptions ¶
type DeployOptions []DeployOption
DeployOptions is a configuration set defining a deployConfig
func DeployOptionDefaults ¶
func DeployOptionDefaults() DeployOptions
DeployOptionDefaults gets the default values for Deploy.
func (DeployOptions) Extend ¶
func (opts DeployOptions) Extend(other DeployOptions) DeployOptions
Extend creates a new DeployOptions with the contents of other overriding the values set in this DeployOptions.
func (DeployOptions) Namespace ¶
func (opts DeployOptions) Namespace() string
Namespace returns the last set value for Namespace or the empty value if not set.
type GetOption ¶
type GetOption func(*getConfig)
GetOption is a single option for configuring a getConfig
type GetOptions ¶
type GetOptions []GetOption
GetOptions is a configuration set defining a getConfig
func GetOptionDefaults ¶
func GetOptionDefaults() GetOptions
GetOptionDefaults gets the default values for Get.
func (GetOptions) Extend ¶
func (opts GetOptions) Extend(other GetOptions) GetOptions
Extend creates a new GetOptions with the contents of other overriding the values set in this GetOptions.
type KfApp ¶
KfApp provides a facade around Knative services for accessing and mutating its values.
Example ¶
space := NewKfApp() // Setup space.SetName("nsname") // Values fmt.Println(space.GetName())
Output: nsname
func NewFromApp ¶
NewFromApp creates a new KfApp from the given service pointer modifications to the KfApp will affect the underling app.
func (*KfApp) DeleteEnvVars ¶
DeleteEnvVars removes environment variables with the given key.
Example ¶
myApp := NewKfApp() myApp.SetEnvVars([]corev1.EnvVar{ {Name: "FOO", Value: "0"}, {Name: "BAR", Value: "0"}, }) myApp.DeleteEnvVars([]string{"FOO", "DOES_NOT_EXIST"}) for _, e := range myApp.GetEnvVars() { fmt.Println("Key", e.Name, "Value", e.Value) }
Output: Key BAR Value 0
func (*KfApp) GetCPU ¶
GetCPU gets CPU request for the app.
Example ¶
myApp := NewKfApp() cpu := resource.MustParse("100m") myApp.SetCPU(&cpu) getCPU := myApp.GetCPU() fmt.Println((*getCPU).String())
Output: 100m
func (*KfApp) GetClusterURL ¶
GetClusterURL gets the internal address of the app or the empty string if unset.
Example ¶
app := NewKfApp() app.Status.Address = &duckv1alpha1.Addressable{ Addressable: duckv1beta1.Addressable{ URL: &apis.URL{ Host: "app-a.some-namespace.svc.cluster.local", Scheme: "http", }, }, } fmt.Println(app.GetClusterURL())
Output: http://app-a.some-namespace.svc.cluster.local
func (*KfApp) GetContainerPorts ¶
func (k *KfApp) GetContainerPorts() []corev1.ContainerPort
GetContainerPorts gets the ports the container will open.
Example ¶
myApp := NewKfApp() fmt.Printf("Default: %v\n", myApp.GetContainerPorts()) myApp.SetContainerPorts([]corev1.ContainerPort{{Name: "HTTP", ContainerPort: 8080}}) for _, port := range myApp.GetContainerPorts() { fmt.Printf("Open %d (%s)\n", port.ContainerPort, port.Name) }
Output: Default: [] Open 8080 (HTTP)
func (*KfApp) GetEnvVars ¶
GetEnvVars reads the environment variables off an app.
Example ¶
myApp := NewKfApp() myApp.SetEnvVars([]corev1.EnvVar{ {Name: "FOO", Value: "2"}, {Name: "BAR", Value: "0"}, }) env := myApp.GetEnvVars() for _, e := range env { fmt.Println("Key", e.Name, "Value", e.Value) }
Output: Key FOO Value 2 Key BAR Value 0
Example (EmptyApp) ¶
myApp := NewKfApp() env := myApp.GetEnvVars() fmt.Println(env)
Output: []
func (*KfApp) GetHealthCheck ¶
GetHealthCheck gets the readiness probe or nil if one doesn't exist.
Example ¶
check, err := NewHealthCheck("http", "/healthz", 50) if err != nil { panic(err) } myApp := NewKfApp() fmt.Printf("Default: %v\n", myApp.GetHealthCheck()) myApp.SetHealthCheck(check) fmt.Println("After set:") describe.HealthCheck(os.Stdout, myApp.GetHealthCheck())
Output: Default: nil After set: Health Check: Timeout: 50s Type: http Endpoint: /healthz
func (*KfApp) GetImage ¶
GetImage gets the image associated with the container.
Example ¶
myApp := NewKfApp() fmt.Printf("Default: %q\n", myApp.GetImage()) myApp.SetImage("my-company/my-app") fmt.Printf("After set: %q\n", myApp.GetImage())
Output: Default: "" After set: "my-company/my-app"
func (*KfApp) GetMemory ¶
GetMemory gets memory request for the app.
Example ¶
myApp := NewKfApp() mem := resource.MustParse("1Gi") myApp.SetMemory(&mem) getMem := myApp.GetMemory() fmt.Println((*getMem).String())
Output: 1Gi
func (*KfApp) GetNamespace ¶
GetNamespace gets the namespace for the app.
Example ¶
myApp := NewKfApp() myApp.SetNamespace("my-ns") fmt.Println(myApp.GetNamespace())
Output: my-ns
func (*KfApp) GetServiceAccount ¶
GetServiceAccount returns the service account used by the container.
Example ¶
myApp := NewKfApp() fmt.Printf("Default: %q\n", myApp.GetServiceAccount()) myApp.SetServiceAccount("my-sa") fmt.Printf("After set: %q\n", myApp.GetServiceAccount())
Output: Default: "" After set: "my-sa"
func (*KfApp) GetServiceBindings ¶
func (k *KfApp) GetServiceBindings() []v1alpha1.AppSpecServiceBinding
func (*KfApp) GetStorage ¶
GetStorage gets disk storage request for the app.
Example ¶
myApp := NewKfApp() storage := resource.MustParse("2Gi") myApp.SetStorage(&storage) getStorage := myApp.GetStorage() fmt.Println((*getStorage).String())
Output: 2Gi
func (*KfApp) MergeEnvVars ¶
MergeEnvVars adds the environment variables listed to the existing ones, overwriting duplicates by key.
Example ¶
myApp := NewKfApp() myApp.SetEnvVars([]corev1.EnvVar{ {Name: "FOO", Value: "0"}, {Name: "BAR", Value: "0"}, }) myApp.MergeEnvVars([]corev1.EnvVar{ {Name: "FOO", Value: "1"}, // will replace old {Name: "BAZZ", Value: "0"}, // will be added }) env := myApp.GetEnvVars() for _, e := range env { fmt.Println("Key", e.Name, "Value", e.Value) }
Output: Key BAR Value 0 Key BAZZ Value 0 Key FOO Value 1
func (*KfApp) SetContainerPorts ¶
func (k *KfApp) SetContainerPorts(ports []corev1.ContainerPort)
SetContainerPorts sets the ports the container will open.
func (*KfApp) SetEnvVars ¶
SetEnvVars sets environment variables on an app.
func (*KfApp) SetHealthCheck ¶
SetHealthCheck sets the readiness probe for the container.
func (*KfApp) SetImage ¶
SetImage sets the image for the application and a policy to always refresh it.
func (*KfApp) SetNamespace ¶
SetNamespace sets the namespace for the app.
func (*KfApp) SetServiceAccount ¶
SetServiceAccount sets the account the application will run as.
func (*KfApp) SetStorage ¶
SetStorage sets disk storage request for the app.
type ListOption ¶
type ListOption func(*listConfig)
ListOption is a single option for configuring a listConfig
func WithListFieldSelector ¶
func WithListFieldSelector(val map[string]string) ListOption
WithListFieldSelector creates an Option that sets A selector on the resource's fields.
func WithListFilters ¶
func WithListFilters(val []Predicate) ListOption
WithListFilters creates an Option that sets Additional filters to apply.
func WithListLabelSelector ¶
func WithListLabelSelector(val map[string]string) ListOption
WithListLabelSelector creates an Option that sets A label selector.
type ListOptions ¶
type ListOptions []ListOption
ListOptions is a configuration set defining a listConfig
func ListOptionDefaults ¶
func ListOptionDefaults() ListOptions
ListOptionDefaults gets the default values for List.
func (ListOptions) Extend ¶
func (opts ListOptions) Extend(other ListOptions) ListOptions
Extend creates a new ListOptions with the contents of other overriding the values set in this ListOptions.
type Mutator ¶
Mutator is a function that changes v1alpha1.App.
func DiffWrapper ¶
DiffWrapper wraps a mutator and prints out the diff between the original object and the one it returns if there's no error.
func LabelSetMutator ¶
LabelSetMutator creates a mutator that sets the given labels on the object.
type Predicate ¶
Predicate is a boolean function for a v1alpha1.App.
func AllPredicate ¶
AllPredicate is a predicate that passes if all children pass.
func LabelEqualsPredicate ¶
LabelEqualsPredicate validates that the given label exists exactly on the object.
func LabelsContainsPredicate ¶
LabelsContainsPredicate validates that the given label exists on the object.
type PushOption ¶
type PushOption func(*pushConfig)
PushOption is a single option for configuring a pushConfig
func WithPushBuildpack ¶
func WithPushBuildpack(val string) PushOption
WithPushBuildpack creates an Option that sets skip the detect buildpack step and use the given name
func WithPushCPU ¶
func WithPushCPU(val *resource.Quantity) PushOption
WithPushCPU creates an Option that sets app CPU request
func WithPushContainerImage ¶
func WithPushContainerImage(val string) PushOption
WithPushContainerImage creates an Option that sets the container to deploy
func WithPushDefaultRouteDomain ¶
func WithPushDefaultRouteDomain(val string) PushOption
WithPushDefaultRouteDomain creates an Option that sets Domain for a defaultroute. Only used if a route doesn't already exist
func WithPushDiskQuota ¶
func WithPushDiskQuota(val *resource.Quantity) PushOption
WithPushDiskQuota creates an Option that sets app disk storage quota
func WithPushEnvironmentVariables ¶
func WithPushEnvironmentVariables(val map[string]string) PushOption
WithPushEnvironmentVariables creates an Option that sets set environment variables
func WithPushExactScale ¶
func WithPushExactScale(val *int) PushOption
WithPushExactScale creates an Option that sets scale exactly to this number of instances
func WithPushGrpc ¶
func WithPushGrpc(val bool) PushOption
WithPushGrpc creates an Option that sets setup the ports for the container to allow gRPC to work
func WithPushHealthCheck ¶
func WithPushHealthCheck(val *corev1.Probe) PushOption
WithPushHealthCheck creates an Option that sets the health check to use on the app
func WithPushMaxScale ¶
func WithPushMaxScale(val *int) PushOption
WithPushMaxScale creates an Option that sets the upper scale bound
func WithPushMemory ¶
func WithPushMemory(val *resource.Quantity) PushOption
WithPushMemory creates an Option that sets app memory request
func WithPushMinScale ¶
func WithPushMinScale(val *int) PushOption
WithPushMinScale creates an Option that sets the lower scale bound
func WithPushNamespace ¶
func WithPushNamespace(val string) PushOption
WithPushNamespace creates an Option that sets the Kubernetes namespace to use
func WithPushNoStart ¶
func WithPushNoStart(val bool) PushOption
WithPushNoStart creates an Option that sets setup the app without starting it
func WithPushOutput ¶
func WithPushOutput(val io.Writer) PushOption
WithPushOutput creates an Option that sets the io.Writer to write output such as build logs
func WithPushRandomRouteDomain ¶
func WithPushRandomRouteDomain(val string) PushOption
WithPushRandomRouteDomain creates an Option that sets Domain for a random route. Only used if a route doesn't already exist
func WithPushRoutes ¶
func WithPushRoutes(val []v1alpha1.RouteSpecFields) PushOption
WithPushRoutes creates an Option that sets routes for the app
func WithPushServiceBindings ¶
func WithPushServiceBindings(val []v1alpha1.AppSpecServiceBinding) PushOption
WithPushServiceBindings creates an Option that sets a list of Services to bind to the app
func WithPushSourceImage ¶
func WithPushSourceImage(val string) PushOption
WithPushSourceImage creates an Option that sets the source code as a container image
func WithPushStack ¶
func WithPushStack(val string) PushOption
WithPushStack creates an Option that sets the builder stack to use for buildpack based apps
type PushOptions ¶
type PushOptions []PushOption
PushOptions is a configuration set defining a pushConfig
func PushOptionDefaults ¶
func PushOptionDefaults() PushOptions
PushOptionDefaults gets the default values for Push.
func (PushOptions) Buildpack ¶
func (opts PushOptions) Buildpack() string
Buildpack returns the last set value for Buildpack or the empty value if not set.
func (PushOptions) CPU ¶
func (opts PushOptions) CPU() *resource.Quantity
CPU returns the last set value for CPU or the empty value if not set.
func (PushOptions) ContainerImage ¶
func (opts PushOptions) ContainerImage() string
ContainerImage returns the last set value for ContainerImage or the empty value if not set.
func (PushOptions) DefaultRouteDomain ¶
func (opts PushOptions) DefaultRouteDomain() string
DefaultRouteDomain returns the last set value for DefaultRouteDomain or the empty value if not set.
func (PushOptions) DiskQuota ¶
func (opts PushOptions) DiskQuota() *resource.Quantity
DiskQuota returns the last set value for DiskQuota or the empty value if not set.
func (PushOptions) EnvironmentVariables ¶
func (opts PushOptions) EnvironmentVariables() map[string]string
EnvironmentVariables returns the last set value for EnvironmentVariables or the empty value if not set.
func (PushOptions) ExactScale ¶
func (opts PushOptions) ExactScale() *int
ExactScale returns the last set value for ExactScale or the empty value if not set.
func (PushOptions) Extend ¶
func (opts PushOptions) Extend(other PushOptions) PushOptions
Extend creates a new PushOptions with the contents of other overriding the values set in this PushOptions.
func (PushOptions) Grpc ¶
func (opts PushOptions) Grpc() bool
Grpc returns the last set value for Grpc or the empty value if not set.
func (PushOptions) HealthCheck ¶
func (opts PushOptions) HealthCheck() *corev1.Probe
HealthCheck returns the last set value for HealthCheck or the empty value if not set.
func (PushOptions) MaxScale ¶
func (opts PushOptions) MaxScale() *int
MaxScale returns the last set value for MaxScale or the empty value if not set.
func (PushOptions) Memory ¶
func (opts PushOptions) Memory() *resource.Quantity
Memory returns the last set value for Memory or the empty value if not set.
func (PushOptions) MinScale ¶
func (opts PushOptions) MinScale() *int
MinScale returns the last set value for MinScale or the empty value if not set.
func (PushOptions) Namespace ¶
func (opts PushOptions) Namespace() string
Namespace returns the last set value for Namespace or the empty value if not set.
func (PushOptions) NoStart ¶
func (opts PushOptions) NoStart() bool
NoStart returns the last set value for NoStart or the empty value if not set.
func (PushOptions) Output ¶
func (opts PushOptions) Output() io.Writer
Output returns the last set value for Output or the empty value if not set.
func (PushOptions) RandomRouteDomain ¶
func (opts PushOptions) RandomRouteDomain() string
RandomRouteDomain returns the last set value for RandomRouteDomain or the empty value if not set.
func (PushOptions) Routes ¶
func (opts PushOptions) Routes() []v1alpha1.RouteSpecFields
Routes returns the last set value for Routes or the empty value if not set.
func (PushOptions) ServiceBindings ¶
func (opts PushOptions) ServiceBindings() []v1alpha1.AppSpecServiceBinding
ServiceBindings returns the last set value for ServiceBindings or the empty value if not set.
func (PushOptions) SourceImage ¶
func (opts PushOptions) SourceImage() string
SourceImage returns the last set value for SourceImage or the empty value if not set.
func (PushOptions) Stack ¶
func (opts PushOptions) Stack() string
Stack returns the last set value for Stack or the empty value if not set.
type Pusher ¶
type Pusher interface { // Push deploys an application. Push(appName string, opts ...PushOption) error }
Pusher deploys applications.
type UpdateOption ¶
type UpdateOption func(*updateConfig)
UpdateOption is a single option for configuring a updateConfig
type UpdateOptions ¶
type UpdateOptions []UpdateOption
UpdateOptions is a configuration set defining a updateConfig
func UpdateOptionDefaults ¶
func UpdateOptionDefaults() UpdateOptions
UpdateOptionDefaults gets the default values for Update.
func (UpdateOptions) Extend ¶
func (opts UpdateOptions) Extend(other UpdateOptions) UpdateOptions
Extend creates a new UpdateOptions with the contents of other overriding the values set in this UpdateOptions.