yunion.io/x/cloudmux@v0.3.10-0-alpha.1/pkg/cloudprovider/loadbalancerlistener.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 cloudprovider
    16  
    17  type SLoadbalancerListener struct {
    18  	Name                    string
    19  	LoadbalancerID          string
    20  	ListenerType            string
    21  	ListenerPort            int
    22  	BackendGroupType        string
    23  	BackendGroupID          string
    24  	Scheduler               string
    25  	AccessControlListStatus string
    26  	AccessControlListType   string
    27  	AccessControlListID     string
    28  	EnableHTTP2             bool
    29  	CertificateID           string
    30  	EgressMbps              int
    31  	Description             string
    32  	EstablishedTimeout      int
    33  
    34  	ClientRequestTimeout  int
    35  	ClientIdleTimeout     int
    36  	BackendConnectTimeout int
    37  	BackendIdleTimeout    int
    38  
    39  	HealthCheckReq string
    40  	HealthCheckExp string
    41  
    42  	HealthCheck         string
    43  	HealthCheckType     string
    44  	HealthCheckTimeout  int
    45  	HealthCheckDomain   string
    46  	HealthCheckHttpCode string
    47  	HealthCheckURI      string
    48  	HealthCheckInterval int
    49  
    50  	HealthCheckRise int
    51  	HealthCheckFail int
    52  
    53  	StickySession              string
    54  	StickySessionCookie        string
    55  	StickySessionType          string
    56  	StickySessionCookieTimeout int
    57  
    58  	BackendServerPort int
    59  	XForwardedFor     bool
    60  	Gzip              bool
    61  
    62  	TLSCipherPolicy string
    63  }
    64  
    65  type SLoadbalancerListenerRule struct {
    66  	Name             string
    67  	Domain           string
    68  	Path             string
    69  	BackendGroupID   string
    70  	BackendGroupType string
    71  
    72  	Condition string // for aws only
    73  
    74  	Scheduler           string // for qcloud only
    75  	HealthCheck         string // for qcloud only
    76  	HealthCheckType     string // for qcloud only
    77  	HealthCheckTimeout  int    // for qcloud only
    78  	HealthCheckDomain   string // for qcloud only
    79  	HealthCheckHttpCode string // for qcloud only
    80  	HealthCheckURI      string // for qcloud only
    81  	HealthCheckInterval int    // for qcloud only
    82  
    83  	HealthCheckRise int // for qcloud only
    84  	HealthCheckFail int // for qcloud only
    85  
    86  	StickySessionCookieTimeout int // for qcloud only
    87  
    88  	// openstack redirect
    89  	Redirect       string `width:"16" nullable:"true" list:"user" create:"optional" update:"user" default:"off"` // 跳转类型
    90  	RedirectCode   int    `nullable:"true" list:"user" create:"optional" update:"user"`                          // 跳转HTTP code
    91  	RedirectScheme string `width:"16" nullable:"true" list:"user" create:"optional" update:"user"`               // 跳转uri scheme
    92  	RedirectHost   string `nullable:"true" list:"user" create:"optional" update:"user"`                          // 跳转时变更Host
    93  	RedirectPath   string `nullable:"true" list:"user" create:"optional" update:"user"`                          // 跳转时变更Path
    94  }