Documentation ¶
Index ¶
- func ChooseProject(cfg *GcpConfig)
- func ChooseZone(cfg *GcpConfig)
- func ConnectCompute()
- func Execute(cfg *GcpConfig, operation Operation) int
- func ExecuteParallel(cfg *GcpConfig, operations map[string]Operation) int
- func ExpandNetworkPrefix(prefix string) (addrs []netip.Addr, err error)
- func GetInstancesFromMIG(cfg *GcpConfig) (map[string]*GceInstance, error)
- func ListInstanceGroups(cfg *GcpConfig) (names []string, err error)
- func ListInstancesInGroup(cfg *GcpConfig) (names []string, err error)
- func StartWorkers(cfg *GcpConfig, workers uint)
- func UpdateAliasIPs(cfg *GcpConfig, instance *GceInstance, ips []string) error
- func WaitForUpdate(cfg *GcpConfig, instanceName string, newState []string)
- func Worker(i int, cfg *GcpConfig, in chan Operation, out chan int)
- type GceInstance
- type GcpConfig
- type Network
- type Operation
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChooseProject ¶
func ChooseProject(cfg *GcpConfig)
GetProject gets the GCP project ID from GCP credentials.
func ChooseZone ¶
func ChooseZone(cfg *GcpConfig)
func ConnectCompute ¶
func ConnectCompute()
func GetInstancesFromMIG ¶
func GetInstancesFromMIG(cfg *GcpConfig) (map[string]*GceInstance, error)
func ListInstanceGroups ¶
func ListInstancesInGroup ¶
func StartWorkers ¶
func UpdateAliasIPs ¶
func UpdateAliasIPs(cfg *GcpConfig, instance *GceInstance, ips []string) error
func WaitForUpdate ¶
Types ¶
type GceInstance ¶
type GceInstance struct { Name string NetworkInterface string NetworkFingerprint string AliasNetwork string AliasIps *[]string OtherNetworks []Network }
func GetInstance ¶
func GetInstance(cfg *GcpConfig, name string) (*GceInstance, error)
type Operation ¶
type Operation struct { Type Type Instance *GceInstance Ips []string }
Click to show internal directories.
Click to hide internal directories.