# Packages
No description provided by the author
# Functions
ApplyConfig applies the component config onto component dc Parameters: client: occlient instance appName: Name of application of which the component is a part componentName: Name of the component which is being patched with config componentConfig: Component configuration cmpExist: true if components exists in the cluster Returns: err: Errors if any else nil.
ApplyConfigCreateURL applies url config onto component.
Build component from BuildConfig.
CheckComponentMandatoryParams checks mandatory parammeters for component.
CreateComponent creates component as per the passed component settings Parameters: client: occlient instance componentConfig: the component configuration that holds all details of component context: the component context indicating the location of component config and hence its source as well stdout: io.Writer instance to write output to Returns: err: errors if any.
CreateFromGit inputPorts is the array containing the string port values inputPorts is the array containing the string port values envVars is the array containing the environment variables.
CreateFromPath create new component with source or binary from the given local path sourceType indicates the source type of the component and can be either local or binary envVars is the array containing the environment variables.
Delete whole component.
Deploy deploys the component it starts a new deployment and wait for the new dc to be available desiredRevision is the desired version of the deployment config to wait for.
Exists checks whether a component with the given name exists in the current application or not componentName is the component name to perform check for The first returned parameter is a bool indicating if a component with the given name already exists or not The second returned parameter is the error that might occurs while execution.
GetComponent provides component definition.
GetComponentDir returns source repo name Parameters: path: git url or source path or binary path paramType: One of CreateType as in GIT/LOCAL/BINARY Returns: directory name.
GetComponentFromConfig returns the component on the config if it exists.
GetComponentLinkedSecretNames provides a slice containing the names of the secrets that are present in envFrom.
GetComponentPorts provides slice of ports used by the component in the form port_no/protocol.
GetComponentSource what source type given component uses The first returned string is component source type ("git" or "local" or "binary") The second returned string is a source (url to git repository or local path or path to binary) we retrieve the source type by looking up the DeploymentConfig that's deployed.
GetComponentType returns type of component in given application and project.
GetDefaultComponentName generates a unique component name Parameters: desired default component name(w/o prefix) and slice of existing component names Returns: Unique component name and error if any.
GetLogs follow the DeploymentConfig logs if follow is set to true.
GetMachineReadableFormatForList returns list of components in machine readable format.
List lists components in active application.
ListIfPathGiven lists all available component in given path directory.
PushLocal push local code to the cluster and trigger build there.
UnlinkComponents takes the component to be deleted and list of active components in the cluster as arguments.
Update updates the requested component Parameters: client: occlient instance componentConfig: Component configuration newSource: Location of component source resolved to absolute path stdout: io pipe to write logs to Returns: errors if any.
ValidateComponentCreateRequest validates request for component creation and returns errors if any Returns: errors if any.
WatchAndPush watches path, if something changes in that path it calls PushLocal ignores .git/* by default inspired by https://github.com/openshift/origin/blob/e785f76194c57bd0e1674c2f2776333e1e0e4e78/pkg/oc/cli/cmd/rsync/rsync.go#L257 Parameters: client: occlient instance out: io Writer instance parameters: WatchParameters.
# Constants
No description provided by the author
# Variables
ErrUserRequestedWatchExit is returned when the user stops the watch loop.
# Structs
Component.
ComponentList is list of components.
ComponentSpec is spec of components.
ComponentStatus is Status of components.
WatchParameters is designed to hold the controllables and attributes that the watch function works on.