yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/multicloud/remotefile/loadbalancer.go (about) 1 // Copyright 2019 Yunion 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package remotefile 16 17 import ( 18 "context" 19 20 "yunion.io/x/cloudmux/pkg/cloudprovider" 21 ) 22 23 type SLoadbalancer struct { 24 SResourceBase 25 26 region *SRegion 27 RegionId string 28 Address string 29 AddressType string 30 NetworkType string 31 VpcId string 32 ZoneId string 33 Zone1Id string 34 InstanceType string 35 ChargeType string 36 Bandwidth int 37 NetworkIds []string 38 } 39 40 func (self *SLoadbalancer) GetAddress() string { 41 return self.Address 42 } 43 44 func (self *SLoadbalancer) GetAddressType() string { 45 return self.AddressType 46 } 47 48 func (self *SLoadbalancer) GetNetworkType() string { 49 return self.NetworkType 50 } 51 52 func (self *SLoadbalancer) GetNetworkIds() []string { 53 return self.NetworkIds 54 } 55 56 func (self *SLoadbalancer) GetVpcId() string { 57 return self.VpcId 58 } 59 60 func (self *SLoadbalancer) GetZoneId() string { 61 return self.ZoneId 62 } 63 64 func (self *SLoadbalancer) GetZone1Id() string { 65 return self.Zone1Id 66 } 67 68 func (self *SLoadbalancer) GetLoadbalancerSpec() string { 69 return self.InstanceType 70 } 71 72 func (self *SLoadbalancer) GetChargeType() string { 73 return self.ChargeType 74 } 75 76 func (self *SLoadbalancer) GetEgressMbps() int { 77 return self.Bandwidth 78 } 79 80 func (self *SLoadbalancer) GetIEIP() (cloudprovider.ICloudEIP, error) { 81 return nil, cloudprovider.ErrNotImplemented 82 } 83 84 func (self *SLoadbalancer) Delete(ctx context.Context) error { 85 return cloudprovider.ErrNotSupported 86 } 87 88 func (self *SLoadbalancer) Start() error { 89 return cloudprovider.ErrNotSupported 90 } 91 92 func (self *SLoadbalancer) Stop() error { 93 return cloudprovider.ErrNotSupported 94 } 95 96 func (self *SLoadbalancer) GetILoadBalancerListeners() ([]cloudprovider.ICloudLoadbalancerListener, error) { 97 return nil, cloudprovider.ErrNotSupported 98 } 99 100 func (self *SLoadbalancer) GetILoadBalancerBackendGroups() ([]cloudprovider.ICloudLoadbalancerBackendGroup, error) { 101 return nil, cloudprovider.ErrNotSupported 102 } 103 104 func (self *SLoadbalancer) CreateILoadBalancerBackendGroup(group *cloudprovider.SLoadbalancerBackendGroup) (cloudprovider.ICloudLoadbalancerBackendGroup, error) { 105 return nil, cloudprovider.ErrNotSupported 106 } 107 108 func (self *SLoadbalancer) GetILoadBalancerBackendGroupById(groupId string) (cloudprovider.ICloudLoadbalancerBackendGroup, error) { 109 return nil, cloudprovider.ErrNotSupported 110 } 111 112 func (self *SLoadbalancer) CreateILoadBalancerListener(ctx context.Context, listener *cloudprovider.SLoadbalancerListener) (cloudprovider.ICloudLoadbalancerListener, error) { 113 return nil, cloudprovider.ErrNotSupported 114 } 115 116 func (self *SLoadbalancer) GetILoadBalancerListenerById(listenerId string) (cloudprovider.ICloudLoadbalancerListener, error) { 117 return nil, cloudprovider.ErrNotSupported 118 }