Documentation ¶
Overview ¶
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack available. * * Copyright (C) 2012-2019 Tencent. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use * this file except in compliance with the License. You may obtain a copy of the * License at * * https://opensource.org/licenses/Apache-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller is the API controller
func NewController ¶
func NewController(ipam floatingip.IPAM, lister v1.PodLister) *Controller
NewController construct a controller object
func (*Controller) ListIPs ¶
func (c *Controller) ListIPs(req *restful.Request, resp *restful.Response)
ListIPs lists floating ips
func (*Controller) ReleaseIPs ¶
func (c *Controller) ReleaseIPs(req *restful.Request, resp *restful.Response)
ReleaseIPs releases floating ips #lizard forgives
type FloatingIP ¶
type FloatingIP struct { IP string `json:"ip"` Namespace string `json:"namespace,omitempty"` AppName string `json:"appName,omitempty"` PodName string `json:"podName,omitempty"` PoolName string `json:"poolName,omitempty"` Policy uint16 `json:"policy"` AppType string `json:"appType,omitempty"` UpdateTime time.Time `json:"updateTime,omitempty"` Status string `json:"status,omitempty"` Releasable bool `json:"releasable,omitempty"` // contains filtered or unexported fields }
FloatingIP is the floating ip info
func (FloatingIP) SwaggerDoc ¶
func (FloatingIP) SwaggerDoc() map[string]string
SwaggerDoc is to generate Swagger docs
type GetPoolResp ¶
type ListIPResp ¶
type ListIPResp struct { pageutil.Page Content []FloatingIP `json:"content,omitempty"` }
ListIPResp is the ListIPs response
type Pool ¶
type Pool struct { Name string `json:"name"` Size int `json:"size"` PreAllocateIP bool `json:"preAllocateIP"` }
func (Pool) SwaggerDoc ¶
type PoolController ¶
type PoolController struct { Client versioned.Interface PoolLister list.PoolLister LockPoolFunc func(poolName string) func() // returns unlock func IPAM floatingip.IPAM }
func (*PoolController) CreateOrUpdate ¶
func (c *PoolController) CreateOrUpdate(req *restful.Request, resp *restful.Response)
func (*PoolController) Delete ¶
func (c *PoolController) Delete(req *restful.Request, resp *restful.Response)
func (*PoolController) Get ¶
func (c *PoolController) Get(req *restful.Request, resp *restful.Response)
type ReleaseIPReq ¶
type ReleaseIPReq struct {
IPs []FloatingIP `json:"ips"`
}
ReleaseIPReq is the request to release ips
type ReleaseIPResp ¶
ReleaseIPResp is the response of release ip
func (ReleaseIPResp) SwaggerDoc ¶
func (ReleaseIPResp) SwaggerDoc() map[string]string
SwaggerDoc generates swagger doc for release ip response
type UpdatePoolResp ¶
func (UpdatePoolResp) SwaggerDoc ¶
func (UpdatePoolResp) SwaggerDoc() map[string]string