Documentation
¶
Index ¶
Constants ¶
const ( // ArgURL is the Operator URL status command argument. ArgURL = "url" // ArgTimeout is the timeout status command argument. ArgTimeout = "timeout" // ArgInterval is the retry interval status command argument. ArgInterval = "interval" // ArgSkipInsecure is the skip insecure https checks status command argument. ArgSkipInsecure = "insecure-skip-tls-verify" // ArgCertAuthority is the location of the CA file status command argument. ArgCertAuthority = "certificate-authority" // ArgCert is the location of the cert file status command argument. ArgCert = "client-certificate" // ArgKey is the location of the key file status command argument. ArgKey = "client-key" )
const ( // ArgCommand is an additional command to run after initialisation ArgCommand = "cmd" // ArgRootDir is the root directory to initialise and directories files in ArgRootDir = "root" // ArgUtilsDir is the utils directory name ArgUtilsDir = "utils" // ArgPersistenceDir is root the persistence directory name ArgPersistenceDir = "persistence" // ArgSnapshotsDir is root the snapshots directory name ArgSnapshotsDir = "snapshots" )
const ( // CommandNode is the argument to launch a Node label reader. CommandNode = "node" // ArgNode is the name of the node to query ArgNode = "node-name" // ArgDir is the directory to write files to ArgDir = "dir" // ArkKubeConfig is the location of the k8s config ArkKubeConfig = "kubeconfig" )
const ( // CommandStatus is the argument to execute a deployment status query. CommandStatus = "status" // ArgOperatorURL is the Operator URL status command argument. ArgOperatorURL = "operator-url" // ArgNamespace is the Coherence resource namespace status command argument. ArgNamespace = "namespace" // ArgName is the Coherence resource name status command argument. ArgName = "name" // ArgCondition is the required condition status command argument. ArgCondition = "condition" )
const ( // DefaultMain is an indicator to run the default main class. DefaultMain = "$DEFAULT$" // HelidonMain is the default Helidon main class name. HelidonMain = "io.helidon.microprofile.server.Main" // ServerMain is the default server main class name. ServerMain = "com.oracle.coherence.k8s.Main" // SpringBootMain is the default Spring Boot main class name. SpringBootMain = "org.springframework.boot.loader.PropertiesLauncher" // AppTypeNone is the argument to specify no application type. AppTypeNone = "" // AppTypeJava is the argument to specify a Java application. AppTypeJava = "java" // AppTypeCoherence is the argument to specify a Coherence application. AppTypeCoherence = "coherence" // AppTypeHelidon is the argument to specify a Helidon application. AppTypeHelidon = "helidon" // AppTypeSpring is the argument to specify a Spring application. AppTypeSpring = "spring" )
const (
// CommandConsole is the argument to launch a Coherence console.
CommandConsole = "console"
)
const (
// CommandMBeanServer is the argument to launch a MBean server.
CommandMBeanServer = "mbeanserver"
)
const (
// CommandOperator is the argument to launch the Operator manager.
CommandOperator = "operator"
)
const (
// CommandQueryPlus is the argument to launch a QueryPlus console.
CommandQueryPlus = "queryplus"
)
const (
// CommandReady is the argument to execute ready check.
CommandReady = "ready"
)
const (
// CommandServer is the argument to launch a server.
CommandServer = "server"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EnvFunction ¶
EnvFunction is a function that returns an environment variable for a given name.
type MaybeRunFunction ¶
type MaybeRunFunction func(*RunDetails, *cobra.Command) (bool, error)
MaybeRunFunction is a function to maybe run a command depending on the return bool
type RunDetails ¶
type RunDetails struct { Command string CoherenceHome string JavaHome string UtilsDir string Dir string GetSite bool AppType string Classpath string Args []string MainClass string MainArgs []string BuildPacks *bool // contains filtered or unexported fields }
RunDetails contains the information to run an application.
func NewRunDetails ¶
func NewRunDetails(v *viper.Viper) *RunDetails
func (*RunDetails) Expand ¶
func (in *RunDetails) Expand(s string, mapping func(string) string) string
Expand replaces ${var} or $(var) or $var in the string based on the mapping function. For example, os.ExpandEnv(s) is equivalent to os.Expand(s, os.Getenv).
func (*RunDetails) ExpandEnv ¶
func (in *RunDetails) ExpandEnv(s string) string
ExpandEnv replaces ${var} or $(var) or $var in the string according to the values of the current environment variables. References to undefined variables are replaced by the empty string.
func (*RunDetails) Getenv ¶
func (in *RunDetails) Getenv(name string) string
Getenv returns the value for the specified environment variable, or empty string if not set.
type RunFunction ¶
type RunFunction func(*RunDetails, *cobra.Command)
RunFunction is a function to run a command