Help us shape the future of Go! Take the 2026 Go Developer Survey

proxy

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableProxy

func DisableProxy(client *golangsdk.ServiceClient, instanceID string, opts *DisableProxyOpts) (*string, error)

func EnableProxy

func EnableProxy(client *golangsdk.ServiceClient, instanceId string, opts EnableProxyOpts) (*string, error)

func Enlarge

func Enlarge(client *golangsdk.ServiceClient, opts EnlargeOpts) (*string, error)

func Resize

func Resize(client *golangsdk.ServiceClient, instanceId string, proxyId string, flavorRef string) (*string, error)

func UpdateWeight

func UpdateWeight(client *golangsdk.ServiceClient, instanceId string, proxyId string, opts UpdateWeightOpts) (*string, error)

Types

type DisableProxyOpts

type DisableProxyOpts struct {
	ProxyIds []string `json:"proxy_ids,omitempty"`
}

type EnableProxyOpts

type EnableProxyOpts struct {
	FlavorRef       string        `json:"flavor_ref" required:"true"`
	NodeNum         int           `json:"node_num" required:"true"`
	ProxyName       string        `json:"proxy_name,omitempty"`
	ProxyMode       string        `json:"proxy_mode,omitempty"`
	NodesReadWeight []NodesWeight `json:"nodes_read_weight,omitempty"`
}

type EnlargeOpts

type EnlargeOpts struct {
	InstanceID string `json:"-"`
	NodeNum    int    `json:"node_num" required:"true"`
	ProxyId    string `json:"proxy_id,omitempty"`
}

type ListOpts

type ListOpts struct {
	Offset int `q:"offset"`
	Limit  int `q:"limit"`
}

type MysqlProxyAvailable

type MysqlProxyAvailable struct {
	Code        string `json:"code"`
	Description string `json:"description"`
}

type MysqlProxyComputeFlavor

type MysqlProxyComputeFlavor struct {
	Vcpus    string            `json:"vcpus"`
	Ram      string            `json:"ram"`
	DbType   string            `json:"db_type"`
	Id       string            `json:"id"`
	SpecCode string            `json:"spec_code"`
	AzStatus map[string]string `json:"az_status"`
}

type MysqlProxyNodeV3

type MysqlProxyNodeV3 struct {
	Id               string                `json:"id"`
	InstanceId       string                `json:"instance_id"`
	Status           string                `json:"status"`
	Name             string                `json:"name"`
	Weight           int                   `json:"weight"`
	AvailabilityZone []MysqlProxyAvailable `json:"availability_zone"`
}

type MysqlProxyNodes

type MysqlProxyNodes struct {
	Id         string `json:"id"`
	Status     string `json:"status"`
	Name       string `json:"name"`
	Role       string `json:"role"`
	AzCode     string `json:"az_code"`
	FrozenFlag int    `json:"frozen_flag"`
}

type MysqlProxyV3

type MysqlProxyV3 struct {
	PoolId                  string            `json:"pool_id"`
	Status                  string            `json:"status"`
	Address                 string            `json:"address"`
	Port                    int               `json:"port"`
	PoolStatus              string            `json:"pool_status"`
	DelayThresholdInSeconds int               `json:"delay_threshold_in_seconds"`
	ElbVip                  string            `json:"elb_vip"`
	Eip                     string            `json:"eip"`
	Vcpus                   string            `json:"vcpus"`
	Ram                     string            `json:"ram"`
	NodeNum                 int               `json:"node_num"`
	Mode                    string            `json:"mode"`
	Nodes                   []MysqlProxyNodes `json:"nodes"`
	FlavorRef               string            `json:"flavor_ref"`
	Name                    string            `json:"name"`
	TransactionSplit        string            `json:"transaction_split"`
}

type NodesWeight

type NodesWeight struct {
	Id     string `json:"id,omitempty"`
	Weight int    `json:"weight,omitempty"`
}

type ProxyFlavorGroups

type ProxyFlavorGroups struct {
	GroupType    string                    `json:"group_type"`
	ProxyFlavors []MysqlProxyComputeFlavor `json:"proxy_flavors"`
}

func GetFlavors

func GetFlavors(client *golangsdk.ServiceClient, instanceId string) ([]ProxyFlavorGroups, error)

type ProxyInstanceResponse

type ProxyInstanceResponse struct {
	Proxy         MysqlProxyV3       `json:"proxy"`
	MasterNode    MysqlProxyNodeV3   `json:"master_node"`
	ReadonlyNodes []MysqlProxyNodeV3 `json:"readonly_nodes"`
}

func ExtractProxies

func ExtractProxies(r pagination.NewPage) ([]ProxyInstanceResponse, error)

func List

func List(client *golangsdk.ServiceClient, instanceId string, opts ListOpts) ([]ProxyInstanceResponse, error)

type ProxyPage

type ProxyPage struct {
	pagination.NewSinglePageBase
}

type TaurusModifyProxyWeightReadonlyNode

type TaurusModifyProxyWeightReadonlyNode struct {
	Id     string `json:"id,omitempty"`
	Weight int    `json:"weight,omitempty"`
}

type UpdateWeightOpts

type UpdateWeightOpts struct {
	MasterWeight  *int                                  `json:"master_weight,omitempty"`
	ReadonlyNodes []TaurusModifyProxyWeightReadonlyNode `json:"readonly_nodes,omitempty"`
}

Jump to

Keyboard shortcuts

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