createloadbalancer

package
Version: v0.0.0-...-c891ed9 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LbCreateInput

type LbCreateInput struct {
	Name              string   `json:"name"`
	VpcId             string   `json:"vpcid"`
	SubnetIds         []string `json:"subnetids"`
	AvailabilityZones []string `json:"availabilityzones"`
	SecurityGroupIds  []string `json:"securitygroupids"`
	Scheme            string   `json:"scheme"`
	Type              string   `json:"type"` //required only if the LB protocol is HTTPS else can be initiazed with dummy value
	SslCert           string   `json:"sslcert"`
	SslPolicy         string   `json:"sslpolicy"`
	LbPort            int64    `json:"lbport"`
	InstPort          int64    `json:"instport"`
	Lbproto           string   `json:"lbproto"` //required ex: HTTPS, HTTP
	Instproto         string   `json:"instproto"`
	HttpCode          string   `json:"httpcode"`
	HealthPath        string   `json:"healthpath"`
	IpAddressType     string   `json:"ipaddresstype"`
	Cloud             cmn.Cloud
}

func New

func New() *LbCreateInput

func (*LbCreateInput) CreateLoadBalancer

func (lb *LbCreateInput) CreateLoadBalancer() (LoadBalanceResponse, error)

Being CreateLoadBalancer, job of him is to create loadbalancer of choice passed and give back the response who called this. Below method will take care of fetching details of appropriate user and his cloud profile details which was passed while calling it.

type LoadBalanceResponse

type LoadBalanceResponse struct {
	// Contains filtered/unfiltered response of AWS.
	AwsResponse loadbalance.LoadBalanceResponse `json:"AwsResponse,omitempty"`

	// Contains filtered/unfiltered response of Azure.
	AzureResponse string `json:"AzureResponse,omitempty"`

	// Default response if no inputs or matching the values required.
	DefaultResponse string `json:"Response,omitempty"`
}

The struct that will return the filtered/unfiltered responses of variuos clouds.

Jump to

Keyboard shortcuts

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