v1/

directory
v0.4.35 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MPL-2.0

Directories

Path Synopsis
testing
loadbalancers unit tests
loadbalancers unit tests
testing
listeners unit tests
listeners unit tests
Package loadbalancer contains functionality for working GCLoud loadbalancers API resources Example to List LoadBalancer listOpts := loadbalancers.ListOpts{ } allPages, err := loadbalancers.List(loadbalancerClient).AllPages() if err != nil { panic(err) } allLoadBalancers, err := loadbalancers.ExtractLoadBalancers(allPages) if err != nil { panic(err) } for _, loadbalancer := range allLoadBalancers { fmt.Printf("%+v", loadbalancer) } Example to Create a LoadBalancer createOpts := loadbalancers.CreateOpts{ } loadbalancers, err := loadbalancers.Create(loadbalancerClient, createOpts).Extract() if err != nil { panic(err) } Example to Delete a LoadBalancer loadbalancerID := "484cda0e-106f-4f4b-bb3f-d413710bbe78" err := loadbalancers.Delete(loadbalancerClient, loadbalancerID).ExtractErr() if err != nil { panic(err) }
Package loadbalancer contains functionality for working GCLoud loadbalancers API resources Example to List LoadBalancer listOpts := loadbalancers.ListOpts{ } allPages, err := loadbalancers.List(loadbalancerClient).AllPages() if err != nil { panic(err) } allLoadBalancers, err := loadbalancers.ExtractLoadBalancers(allPages) if err != nil { panic(err) } for _, loadbalancer := range allLoadBalancers { fmt.Printf("%+v", loadbalancer) } Example to Create a LoadBalancer createOpts := loadbalancers.CreateOpts{ } loadbalancers, err := loadbalancers.Create(loadbalancerClient, createOpts).Extract() if err != nil { panic(err) } Example to Delete a LoadBalancer loadbalancerID := "484cda0e-106f-4f4b-bb3f-d413710bbe78" err := loadbalancers.Delete(loadbalancerClient, loadbalancerID).ExtractErr() if err != nil { panic(err) }
testing
loadbalancers unit tests
loadbalancers unit tests

Jump to

Keyboard shortcuts

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