loadbalancer.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. package remotefile
  15. import (
  16. "context"
  17. "yunion.io/x/cloudmux/pkg/cloudprovider"
  18. "yunion.io/x/cloudmux/pkg/multicloud"
  19. )
  20. type SLoadbalancer struct {
  21. multicloud.SLoadbalancerBase
  22. SResourceBase
  23. region *SRegion
  24. RegionId string
  25. Address string
  26. AddressType string
  27. NetworkType string
  28. VpcId string
  29. ZoneId string
  30. Zone1Id string
  31. InstanceType string
  32. ChargeType string
  33. Bandwidth int
  34. NetworkIds []string
  35. }
  36. func (self *SLoadbalancer) GetAddress() string {
  37. return self.Address
  38. }
  39. func (self *SLoadbalancer) GetAddressType() string {
  40. return self.AddressType
  41. }
  42. func (self *SLoadbalancer) GetNetworkType() string {
  43. return self.NetworkType
  44. }
  45. func (self *SLoadbalancer) GetNetworkIds() []string {
  46. return self.NetworkIds
  47. }
  48. func (self *SLoadbalancer) GetVpcId() string {
  49. return self.VpcId
  50. }
  51. func (self *SLoadbalancer) GetZoneId() string {
  52. return self.ZoneId
  53. }
  54. func (self *SLoadbalancer) GetZone1Id() string {
  55. return self.Zone1Id
  56. }
  57. func (self *SLoadbalancer) GetLoadbalancerSpec() string {
  58. return self.InstanceType
  59. }
  60. func (self *SLoadbalancer) GetChargeType() string {
  61. return self.ChargeType
  62. }
  63. func (self *SLoadbalancer) GetEgressMbps() int {
  64. return self.Bandwidth
  65. }
  66. func (self *SLoadbalancer) GetIEIPs() ([]cloudprovider.ICloudEIP, error) {
  67. return nil, cloudprovider.ErrNotImplemented
  68. }
  69. func (self *SLoadbalancer) Delete(ctx context.Context) error {
  70. return cloudprovider.ErrNotSupported
  71. }
  72. func (self *SLoadbalancer) Start() error {
  73. return cloudprovider.ErrNotSupported
  74. }
  75. func (self *SLoadbalancer) Stop() error {
  76. return cloudprovider.ErrNotSupported
  77. }
  78. func (self *SLoadbalancer) GetILoadBalancerListeners() ([]cloudprovider.ICloudLoadbalancerListener, error) {
  79. return nil, cloudprovider.ErrNotSupported
  80. }
  81. func (self *SLoadbalancer) GetILoadBalancerBackendGroups() ([]cloudprovider.ICloudLoadbalancerBackendGroup, error) {
  82. return nil, cloudprovider.ErrNotSupported
  83. }
  84. func (self *SLoadbalancer) CreateILoadBalancerBackendGroup(group *cloudprovider.SLoadbalancerBackendGroup) (cloudprovider.ICloudLoadbalancerBackendGroup, error) {
  85. return nil, cloudprovider.ErrNotSupported
  86. }
  87. func (self *SLoadbalancer) GetILoadBalancerBackendGroupById(groupId string) (cloudprovider.ICloudLoadbalancerBackendGroup, error) {
  88. return nil, cloudprovider.ErrNotSupported
  89. }
  90. func (self *SLoadbalancer) CreateILoadBalancerListener(ctx context.Context, listener *cloudprovider.SLoadbalancerListenerCreateOptions) (cloudprovider.ICloudLoadbalancerListener, error) {
  91. return nil, cloudprovider.ErrNotSupported
  92. }
  93. func (self *SLoadbalancer) GetILoadBalancerListenerById(listenerId string) (cloudprovider.ICloudLoadbalancerListener, error) {
  94. return nil, cloudprovider.ErrNotSupported
  95. }