machinescommon

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagFingerprint = "fingerprint"
	FlagHost        = "host"
	FlagPort        = "port"
	FlagAccount     = "account"
	FlagRuntime     = "runtime"
	FlagPlatform    = "platform"

	SelfContainedCalamari = "self-contained"
	MonoCalamari          = "mono"

	LinuxX64   = "linux-x64"
	LinuxArm64 = "linux-arm64"
	LinuxArm   = "linux-arm"
	OsxX64     = "osx-x64"

	DefaultPort = 22
)
View Source
const (
	FlagMachinePolicy = "machine-policy"
)
View Source
const FlagProxy = "proxy"
View Source
const (
	FlagWeb = "web"
)

Variables

View Source
var CommunicationStyleToDeploymentTargetTypeMap = map[string]string{
	"TentaclePassive":           "TentaclePassive",
	"TentacleActive":            "TentacleActive",
	"Ssh":                       "Ssh",
	"OfflineDrop":               "OfflineDrop",
	"AzureWebApp":               "AzureWebApp",
	"AzureCloudService":         "AzureCloudService",
	"AzureServiceFabricCluster": "AzureServiceFabricCluster",
	"Kubernetes":                "Kubernetes",
	"None":                      "CloudRegion",
}
View Source
var CommunicationStyleToDescriptionMap = map[string]string{
	"TentaclePassive":           "Listening Tentacle",
	"TentacleActive":            "Polling Tentacle",
	"Ssh":                       "SSH Connection",
	"OfflineDrop":               "Offline Package Drop",
	"AzureWebApp":               "Azure Web App",
	"AzureCloudService":         "Azure Cloud Service",
	"AzureServiceFabricCluster": "Service Fabric Cluster",
	"Kubernetes":                "Kubernetes Cluster",
	"None":                      "Cloud Region",
	"StepPackage":               "Step Package",
}

Functions

func DoWebForTargets

func DoWebForTargets(target *machines.DeploymentTarget, dependencies *cmd.Dependencies, flags *WebFlags, description string)

func DoWebForWorkerPools added in v0.7.0

func DoWebForWorkerPools(workerPool workerpools.IWorkerPool, dependencies *cmd.Dependencies, flags *WebFlags)

func DoWebForWorkers

func DoWebForWorkers(worker *machines.Worker, dependencies *cmd.Dependencies, flags *WebFlags, description string)

func FindDefaultMachinePolicy added in v0.8.0

func FindDefaultMachinePolicy(getAllMachinePoliciesCallback GetAllMachinePoliciesCallback) (*machines.MachinePolicy, error)

func FindMachinePolicy

func FindMachinePolicy(getAllMachinePoliciesCallback GetAllMachinePoliciesCallback, nameOrId string) (*machines.MachinePolicy, error)

func GetSshAccount added in v0.7.0

func GetSshAccount(opts *SshCommonOptions, flags *SshCommonFlags) (accounts.IAccount, error)

func PromptForDotNetConfig added in v0.7.0

func PromptForDotNetConfig(opts *SshCommonOptions, flags *SshCommonFlags, entityType string) error

func PromptForProxy

func PromptForProxy(opts *CreateTargetProxyOptions, flags *CreateTargetProxyFlags, description string) error

func PromptForSshAccount added in v0.7.0

func PromptForSshAccount(opts *SshCommonOptions, flags *SshCommonFlags) error

func PromptForSshEndpoint added in v0.7.0

func PromptForSshEndpoint(opts *SshCommonOptions, flags *SshCommonFlags, entityType string) error

func RegisterCreateTargetMachinePolicyFlags

func RegisterCreateTargetMachinePolicyFlags(cmd *cobra.Command, machinePolicyFlags *CreateTargetMachinePolicyFlags)

func RegisterCreateTargetProxyFlags

func RegisterCreateTargetProxyFlags(cmd *cobra.Command, proxyFlags *CreateTargetProxyFlags, description string)

func RegisterSshCommonFlags added in v0.7.0

func RegisterSshCommonFlags(cmd *cobra.Command, flags *SshCommonFlags, entityType string)

func RegisterWebFlag

func RegisterWebFlag(cmd *cobra.Command, flags *WebFlags)

Types

type CreateTargetMachinePolicyFlags

type CreateTargetMachinePolicyFlags struct {
	MachinePolicy *flag.Flag[string]
}

func NewCreateTargetMachinePolicyFlags

func NewCreateTargetMachinePolicyFlags() *CreateTargetMachinePolicyFlags

type CreateTargetMachinePolicyOptions

type CreateTargetMachinePolicyOptions struct {
	*cmd.Dependencies
	GetAllMachinePoliciesCallback
}

func NewCreateTargetMachinePolicyOptions

func NewCreateTargetMachinePolicyOptions(dependencies *cmd.Dependencies) *CreateTargetMachinePolicyOptions

type CreateTargetProxyFlags

type CreateTargetProxyFlags struct {
	Proxy *flag.Flag[string]
}

func NewCreateTargetProxyFlags

func NewCreateTargetProxyFlags() *CreateTargetProxyFlags

type CreateTargetProxyOptions

type CreateTargetProxyOptions struct {
	*cmd.Dependencies
	GetAllProxiesCallback
}

func NewCreateTargetProxyOptions

func NewCreateTargetProxyOptions(dependencies *cmd.Dependencies) *CreateTargetProxyOptions

type GetAllAccountsForSshMachine added in v0.7.0

type GetAllAccountsForSshMachine func() ([]accounts.IAccount, error)

type GetAllMachinePoliciesCallback

type GetAllMachinePoliciesCallback func() ([]*machines.MachinePolicy, error)

type GetAllProxiesCallback

type GetAllProxiesCallback func() ([]*proxies.Proxy, error)

type SshCommonFlags added in v0.7.0

type SshCommonFlags struct {
	Fingerprint *flag.Flag[string]
	HostName    *flag.Flag[string]
	Port        *flag.Flag[int]
	Account     *flag.Flag[string]
	Runtime     *flag.Flag[string]
	Platform    *flag.Flag[string]
}

func NewSshCommonFlags added in v0.7.0

func NewSshCommonFlags() *SshCommonFlags

type SshCommonOptions added in v0.7.0

type SshCommonOptions struct {
	*cmd.Dependencies
	GetAllAccountsForSshMachine
}

func NewSshCommonOpts added in v0.7.0

func NewSshCommonOpts(dependencies *cmd.Dependencies) *SshCommonOptions

type WebFlags

type WebFlags struct {
	Web *flag.Flag[bool]
}

func NewWebFlags

func NewWebFlags() *WebFlags

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL