Documentation ¶
Index ¶
- Constants
- Variables
- func Connect(opts EnvConnectOpts) error
- func ExistingPidForConnection(name string) int
- func GenerateConnectPort(name string) int
- func GetProxyPIDs(availableEnvironments []environment.Environment) (map[string]ProcessDetails, error)
- func IsConnectChild(opts EnvConnectOpts) bool
- func IsConnectParent(opts EnvConnectOpts) bool
- func IsConnectStartup(opts EnvConnectOpts) bool
- func KillProcess(name string, pid int32, force bool) error
- func Listen(streams userio.IOStreams, opts EnvConnectOpts, ctx context.Context, ...)
- func OpenResource(resourceType ResourceType, env *environment.Environment) (string, error)
- func ResourceStringList() []string
- func SetBackgroundEnv() string
- func Validate(ctx context.Context, env *environment.Environment, cmd command.Commander, ...) error
- func WritePidFile(name string, pid int)
- type EnvConnectOpts
- type ProcessDetails
- type ResourceType
- type TableEnv
Constants ¶
View Source
const ( GrafanaResourceType = "grafana" GrafanaContinuousLoadResourceType = "grafana/continuous-load" )
View Source
const BastionSquidProxyPort = 3128
View Source
const DefaultInterfaceName = "nic0"
View Source
const DefaultZone = "europe-west2-a"
View Source
const KubeNamespace = "default"
View Source
const NoBackgroundEnvVar = "NO_BACKGROUND"
View Source
const PidFileDir = "/tmp/corectl"
View Source
const PortConnectMax = 40000
View Source
const PortConnectMin = 30000
Variables ¶
View Source
var ( ErrCloudPlatformNotSupported = errors.New("cloud platform is not supported") ErrInvalidEnvironment = errors.New("environment is not valid") )
View Source
var (
ErrorUnknownResourceType = errors.New("unknown resource type")
)
Functions ¶
func Connect ¶
func Connect(opts EnvConnectOpts) error
Connect establishes a connection with a gke cluster via a bastion host
func ExistingPidForConnection ¶ added in v0.26.3
func GenerateConnectPort ¶ added in v0.26.3
func GetProxyPIDs ¶ added in v0.26.3
func GetProxyPIDs(availableEnvironments []environment.Environment) (map[string]ProcessDetails, error)
func IsConnectChild ¶ added in v0.26.3
func IsConnectChild(opts EnvConnectOpts) bool
func IsConnectParent ¶ added in v0.26.3
func IsConnectParent(opts EnvConnectOpts) bool
func IsConnectStartup ¶ added in v0.26.3
func IsConnectStartup(opts EnvConnectOpts) bool
func Listen ¶ added in v0.26.3
func Listen(streams userio.IOStreams, opts EnvConnectOpts, ctx context.Context, listen string, dialOpts []iap.DialOption, execute func() error)
Listen starts a proxy server that listens on the given address and port.
func OpenResource ¶
func OpenResource(resourceType ResourceType, env *environment.Environment) (string, error)
func ResourceStringList ¶
func ResourceStringList() []string
func SetBackgroundEnv ¶ added in v0.26.3
func SetBackgroundEnv() string
func Validate ¶
func Validate(ctx context.Context, env *environment.Environment, cmd command.Commander, client *gcp.Client) error
Validate checks if the required tools and configurations for the environment are installed and set up correctly.
func WritePidFile ¶ added in v0.26.3
Types ¶
type EnvConnectOpts ¶ added in v0.26.0
type ProcessDetails ¶ added in v0.26.3
type ResourceType ¶
type ResourceType string
type TableEnv ¶
type TableEnv struct {
// contains filtered or unexported fields
}
func (TableEnv) AppendEnv ¶
func (t TableEnv) AppendEnv(env environment.Environment, proxy string, pid string)
Click to show internal directories.
Click to hide internal directories.