Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClient ¶
DefaultClient creates a client based on existing kube config. The instance is created lazily only once and shared among all the callers While resolving configuration we look for .kube/config file unless KUBECONFIG env variable is set If namespace parameter is empty default one from the current context is used
func ParseRoute ¶
func ParseRoute(route string) (*istiov1alpha1.Route, error)
ParseRoute maps string route representation into a Route struct by unwrapping its type, name and value
Types ¶
type DeploymentNotFoundError ¶ added in v0.0.3
type DeploymentNotFoundError struct {
// contains filtered or unexported fields
}
DeploymentNotFoundError denotes failing to find deployment.
func (DeploymentNotFoundError) Error ¶ added in v0.0.3
func (dnfe DeploymentNotFoundError) Error() string
Error returns the formatted deployment error.
type Handler ¶
Handler is a function to setup a server session before attempting to connect. Returns a 'cleanup' function.
type Options ¶
type Options struct { NamespaceName string // name of the namespace for target resource DeploymentName string // name of the initial resource to target SessionName string // name of the session create or join if exist RouteExp string // expression of how to route the traffic to the target resource Strategy string // name of the strategy to use for the target resource StrategyArgs map[string]string // additional arguments for the strategy }
Options holds the variables used by the Session Handler
type State ¶
type State struct {
DeploymentName string // name of the resource to target within the cloned route.
}
State holds the new variables as presented by the creation of the session
func CreateOrJoinHandler ¶
CreateOrJoinHandler provides the option to either create a new session if non exist or join an existing. Rely on the following flags:
- namespace - the name of the target namespace where deployment is defined
- deployment - the name of the target deployment and will update the flag with the new deployment name
- session - the name of the session
- route - the definition of traffic routing
func RemoveHandler ¶
RemoveHandler provides the option to delete an existing sessions if found. Rely on the following flags:
- namespace - the name of the target namespace where deployment is defined
- session - the name of the session