Documentation ¶
Index ¶
- Constants
- type AuditBase
- type Error
- type LBService
- type LBTcpMonitorProfile
- type LBVirtualServer
- type LoadBalancer
- type LoadBalancerOptions
- type LoadBalancerPool
- type LoadBalancerPoolMember
- type LoadBalancerPoolResults
- type MonitorPort
- type NSGroup
- type NSXClient
- func (c *NSXClient) AllocateIP(pool string) (string, error)
- func (c *NSXClient) CreateLoadBalancer(opts LoadBalancerOptions) (string, bool, error)
- func (c *NSXClient) CreateOrUpdateHTTPHealthCheck(id string, opts MonitorPort) (string, error)
- func (c *NSXClient) CreateOrUpdateNSGroup(name string, id string, targetType string, tags map[string]string) (*NSGroup, error)
- func (c *NSXClient) CreateOrUpdateTCPHealthCheck(id string, opts MonitorPort) (string, error)
- func (c *NSXClient) DrainLoadBalancerMember(name, ip string) error
- func (c *NSXClient) GET(path string) ([]byte, int, error)
- func (c *NSXClient) GetLoadBalancer(name string) (*loadbalancer.LbVirtualServer, error)
- func (c *NSXClient) GetLoadBalancerPool(name string) (*loadbalancer.LbPool, error)
- func (c *NSXClient) GetLogicalPorts(ctx context.Context, vm string) ([]manager.LogicalPort, error)
- func (c *NSXClient) Init() error
- func (c *NSXClient) POST(path string, body interface{}) ([]byte, int, error)
- func (c *NSXClient) Ping() (string, error)
- func (c *NSXClient) TagLogicalPort(ctx context.Context, id string, tags map[string]string) error
- func (c *NSXClient) UpdateLoadBalancer(lb *loadbalancer.LbVirtualServer, opts LoadBalancerOptions) (string, bool, error)
- type PolicyBase
- type PolicyLoadBalancerPool
- type SegmentPort
Constants ¶
View Source
const (
TCPProtocol = "TCP"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditBase ¶ added in v0.17.14
type AuditBase struct { CreateTime int64 `json:"_create_time"` LastModifiedUser string `json:"_last_modified_user"` LastModifiedTime int64 `json:"_last_modified_time"` SystemOwned bool `json:"_system_owned"` CreateUser string `json:"_create_user"` Protection string `json:"_protection"` Revision int `json:"_revision"` }
type LBTcpMonitorProfile ¶ added in v0.17.14
type LBVirtualServer ¶ added in v0.17.14
type LBVirtualServer struct { PolicyBase `json:",inline"` Enabled bool `json:"enabled"` IPAddress string `json:"ip_address"` Ports []string `json:"ports"` AccessLogEnabled bool `json:"access_log_enabled"` LbPersistenceProfilePath string `json:"lb_persistence_profile_path"` LbServicePath string `json:"lb_service_path"` PoolPath string `json:"pool_path"` ApplicationProfilePath string `json:"application_profile_path"` LogSignificantEventOnly bool `json:"log_significant_event_only"` }
type LoadBalancer ¶
type LoadBalancer struct { Id string // contains filtered or unexported fields }
nolint: structcheck, unused, golint, stylecheck
type LoadBalancerOptions ¶
type LoadBalancerOptions struct { Name string IPPool string Protocol string Ports []string Tier0 string MemberTags map[string]string SnatTranslation *loadbalancer.LbSnatTranslation MonitorPort MonitorPort }
type LoadBalancerPool ¶ added in v0.17.14
type LoadBalancerPool struct {
Members []LoadBalancerPoolMember `json:"members,omitempty"`
}
type LoadBalancerPoolMember ¶ added in v0.17.14
type LoadBalancerPoolResults ¶ added in v0.17.14
type LoadBalancerPoolResults struct { ResultCount int `json:"result_count"` Results []LoadBalancerPool `json:"results"` }
type MonitorPort ¶ added in v0.23.4
type NSGroup ¶
type NSGroup struct {
Name, Id string
// contains filtered or unexported fields
}
nolint: golint, stylecheck
type NSXClient ¶
type NSXClient struct { logger.Logger Username, Password, Host string RemoteAuth bool // contains filtered or unexported fields }
nolint: golint
func (*NSXClient) CreateLoadBalancer ¶
func (c *NSXClient) CreateLoadBalancer(opts LoadBalancerOptions) (string, bool, error)
CreateLoadBalancer creates a new loadbalancer or returns the existing loadbalancer's IP
func (*NSXClient) CreateOrUpdateHTTPHealthCheck ¶ added in v0.23.4
func (c *NSXClient) CreateOrUpdateHTTPHealthCheck(id string, opts MonitorPort) (string, error)
func (*NSXClient) CreateOrUpdateNSGroup ¶
func (*NSXClient) CreateOrUpdateTCPHealthCheck ¶ added in v0.23.4
func (c *NSXClient) CreateOrUpdateTCPHealthCheck(id string, opts MonitorPort) (string, error)
func (*NSXClient) DrainLoadBalancerMember ¶ added in v0.17.14
func (*NSXClient) GetLoadBalancer ¶
func (c *NSXClient) GetLoadBalancer(name string) (*loadbalancer.LbVirtualServer, error)
func (*NSXClient) GetLoadBalancerPool ¶ added in v0.17.14
func (c *NSXClient) GetLoadBalancerPool(name string) (*loadbalancer.LbPool, error)
func (*NSXClient) GetLogicalPorts ¶
func (*NSXClient) TagLogicalPort ¶
func (*NSXClient) UpdateLoadBalancer ¶ added in v0.23.4
func (c *NSXClient) UpdateLoadBalancer(lb *loadbalancer.LbVirtualServer, opts LoadBalancerOptions) (string, bool, error)
type PolicyBase ¶ added in v0.17.14
type PolicyBase struct { ResourceType string `json:"resource_type"` ID string `json:"id"` DisplayName string `json:"display_name"` Tags []struct { Scope string `json:"scope"` Tag string `json:"tag"` } `json:"tags,omitempty"` Path string `json:"path,omitempty"` RelativePath string `json:"relative_path,omitempty"` ParentPath string `json:"parent_path,omitempty"` UniqueID string `json:"unique_id,omitempty"` MarkedForDelete bool `json:"marked_for_delete,omitempty"` Overridden bool `json:"overridden,omitempty"` AuditBase `json:",inline"` }
type PolicyLoadBalancerPool ¶ added in v0.17.14
type PolicyLoadBalancerPool struct { PolicyBase `json:",inline"` Algorithm string `json:"algorithm"` MemberGroup struct { GroupPath string `json:"group_path"` Port int `json:"port"` IPRevisionFilter string `json:"ip_revision_filter"` } `json:"member_group"` ActiveMonitorPaths []string `json:"active_monitor_paths"` SnatTranslation struct { Type string `json:"type"` } `json:"snat_translation"` TCPMultiplexingEnabled bool `json:"tcp_multiplexing_enabled"` TCPMultiplexingNumber int `json:"tcp_multiplexing_number"` MinActiveMembers int `json:"min_active_members"` }
type SegmentPort ¶ added in v0.17.14
type SegmentPort struct { PolicyBase `json:",inline"` Attachment struct { ID string `json:"id"` TrafficTag int `json:"traffic_tag"` HyperbusMode string `json:"hyperbus_mode"` } `json:"attachment"` AdminState string `json:"admin_state"` }
Click to show internal directories.
Click to hide internal directories.