Documentation ¶
Index ¶
- Variables
- func BindSubClusterAction(req *http.Request) (interface{}, error)
- func CreateAction(req *http.Request) (interface{}, error)
- func DeleteAction(req *http.Request) (interface{}, error)
- func ListAction(req *http.Request) (interface{}, error)
- func OneAction(req *http.Request) (interface{}, error)
- func PassiveHealthCheckParamC2M(passiveHealthCheck *PassiveHealthCheckParam) *icluster_conf.ClusterPassiveHealthCheckParam
- func ReadyAction(req *http.Request) (interface{}, error)
- func UpdateAction(req *http.Request) (interface{}, error)
- type AutoLbMatrix
- type Basic
- type BasicParam
- type BindSubCluster
- type Buffers
- type BuffersParam
- type ClusterData
- type Connection
- type ConnectionParam
- type CreateCluster
- type HealthCheckParam
- type OneParam
- type PassiveHealthCheck
- type PassiveHealthCheckParam
- type ReadyRspParam
- type Retries
- type RetriesParam
- type StickySessions
- type StickySessionsParam
- type Timeouts
- type TimeoutsParam
- type UpsertParam
Constants ¶
This section is empty.
Variables ¶
var BindSubClusterEndpoint = &xreq.Endpoint{ Path: "/products/{product_name}/clusters/{cluster_name}/sub-clusters", Method: http.MethodPatch, Handler: xreq.Convert(BindSubClusterAction), Authorizer: iauth.FAP(iauth.FeatureProductCluster, iauth.ActionUpdate), }
BindSubClusterRoute route AUTO GEN BY ctrl, MODIFY AS U NEED
var CreateEndpoint = &xreq.Endpoint{ Path: "/products/{product_name}/clusters", Method: http.MethodPost, Handler: xreq.Convert(CreateAction), Authorizer: iauth.FAP(iauth.FeatureProductCluster, iauth.ActionCreate), }
CreateRoute route AUTO GEN BY ctrl, MODIFY AS U NEED
var DeleteEndpoint = &xreq.Endpoint{ Path: "/products/{product_name}/clusters/{cluster_name}", Method: http.MethodDelete, Handler: xreq.Convert(DeleteAction), Authorizer: iauth.FAP(iauth.FeatureProductCluster, iauth.ActionDelete), }
DeleteRoute route AUTO GEN BY ctrl, MODIFY AS U NEED
var Endpoints = []*xreq.Endpoint{ OneEndpoint, ListEndpoint, CreateEndpoint, UpdateBasicEndpoint, DeleteEndpoint, BindSubClusterEndpoint, ReadyEndpoint, }
var ListEndpoint = &xreq.Endpoint{ Path: "/products/{product_name}/clusters", Method: http.MethodGet, Handler: xreq.Convert(ListAction), Authorizer: iauth.FAP(iauth.FeatureProductCluster, iauth.ActionRead), }
ListRoute route AUTO GEN BY ctrl, MODIFY AS U NEED
var OneEndpoint = &xreq.Endpoint{ Path: "/products/{product_name}/clusters/{cluster_name}", Method: http.MethodGet, Handler: xreq.Convert(OneAction), Authorizer: iauth.FAP(iauth.FeatureProductCluster, iauth.ActionRead), }
OneRoute route AUTO GEN BY ctrl, MODIFY AS U NEED
var ReadyEndpoint = &xreq.Endpoint{ Path: "/products/{product_name}/clusters/{cluster_name}/ready", Method: http.MethodGet, Handler: xreq.Convert(ReadyAction), Authorizer: iauth.FAP(iauth.FeatureProductCluster, iauth.ActionRead), }
ReadyRoute route AUTO GEN BY ctrl, MODIFY AS U NEED
var UpdateBasicEndpoint = &xreq.Endpoint{ Path: "/products/{product_name}/clusters/{cluster_name}", Method: http.MethodPatch, Handler: xreq.Convert(UpdateAction), Authorizer: iauth.FAP(iauth.FeatureProductCluster, iauth.ActionUpdate), }
UpdateBasicRoute route AUTO GEN BY ctrl, MODIFY AS U NEED
Functions ¶
func BindSubClusterAction ¶
BindSubClusterAction action AUTO GEN BY ctrl, MODIFY AS U NEED
func CreateAction ¶
CreateAction action AUTO GEN BY ctrl, MODIFY AS U NEED
func DeleteAction ¶
DeleteAction action AUTO GEN BY ctrl, MODIFY AS U NEED
func ListAction ¶
ListAction action AUTO GEN BY ctrl, MODIFY AS U NEED
func PassiveHealthCheckParamC2M ¶
func PassiveHealthCheckParamC2M(passiveHealthCheck *PassiveHealthCheckParam) *icluster_conf.ClusterPassiveHealthCheckParam
func ReadyAction ¶
ReadyAction action AUTO GEN BY ctrl, MODIFY AS U NEED
func UpdateAction ¶
UpdateAction action AUTO GEN BY ctrl, MODIFY AS U NEED
Types ¶
type AutoLbMatrix ¶
type Basic ¶
type Basic struct { Connection *Connection `json:"connection" uri:"connection"` Retries *Retries `json:"retries" uri:"retries"` Buffers *Buffers `json:"buffers" uri:"buffers"` Timeouts *Timeouts `json:"timeouts" uri:"timeouts"` }
Basic Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type BasicParam ¶
type BasicParam struct { Connection *ConnectionParam `json:"connection" validate:"required"` Retries *RetriesParam `json:"retries" validate:"required"` Buffers *BuffersParam `json:"buffers" validate:"required"` Timeouts *TimeoutsParam `json:"timeouts" validate:"required"` }
BasicParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type BindSubCluster ¶
type BindSubCluster struct { ClusterName *string `uri:"cluster_name" validate:"required,min=1"` SubClusters []string `json:"sub_clusters" uri:"sub_clusters" validate:"required,min=1"` }
BindSubCluster Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type Buffers ¶
type Buffers struct {
ReqWriteBufferSize int32 `json:"req_write_buffer_size" uri:"req_write_buffer_size"`
}
Buffers Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type BuffersParam ¶
type BuffersParam struct {
ReqWriteBufferSize *int32 `json:"req_write_buffer_size" validate:"required,min=0"`
}
BuffersParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type ClusterData ¶
type ClusterData struct { Name string `json:"name" uri:"name"` Description string `json:"description" uri:"description"` Basic *Basic `json:"basic" uri:"basic"` StickySessions *StickySessions `json:"sticky_sessions" uri:"sticky_sessions"` Ready bool `json:"ready"` PassiveHealthCheck *PassiveHealthCheck `json:"passive_health_check"` SubClusters []string `json:"sub_clusters"` Scheduler map[string]map[string]int `json:"scheduler,omitempty"` }
ClusterData Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
func CreateActionProcess ¶
func CreateActionProcess(req *http.Request, _param *UpsertParam) (*ClusterData, error)
type Connection ¶
type Connection struct { MaxIdleConnPerRs int16 `json:"max_idle_conn_per_rs" uri:"max_idle_conn_per_rs"` CancelOnClientClose bool `json:"cancel_on_client_close" uri:"cancel_on_client_close"` }
Connection Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type ConnectionParam ¶
type ConnectionParam struct { MaxIdleConnPerRs *int16 `json:"max_idle_conn_per_rs" validate:"required,min=0"` CancelOnClientClose *bool `json:"cancel_on_client_close" validate:"required"` }
ConnectionParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type CreateCluster ¶
type CreateCluster struct {
Name *string `json:"name" validate:"required,min=1"`
}
CreateCluster Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type HealthCheckParam ¶
type HealthCheckParam struct { HealthcheckInterval *int32 `json:"healthcheck_interval" validate:"required,min=1"` HealthcheckFailnum *int32 `json:"healthcheck_failnum" validate:"required,min=1"` HealthcheckStatuscode *int32 `json:"healthcheck_statuscode" validate:"required,min=0"` HealthcheckHost *string `json:"healthcheck_host" validate:"required,min=1"` HealthcheckUri *string `json:"healthcheck_uri" validate:"required,min=1,startswith=/"` }
HealthCheckParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type OneParam ¶
type OneParam struct {
Name *string `uri:"cluster_name" validate:"required,min=2"`
}
OneParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type PassiveHealthCheck ¶
type PassiveHealthCheck struct { Schema string `json:"schema"` Interval int32 `json:"interval" validate:"required,min=1"` Failnum int32 `json:"failnum" validate:"required,min=1"` Statuscode int32 `json:"statuscode" validate:"required,min=0"` Host string `json:"host" validate:"required,min=1"` Uri string `json:"uri" validate:"required,min=1,startswith=/"` }
func PassiveHealthCheckM2C ¶
func PassiveHealthCheckM2C(phc *icluster_conf.ClusterPassiveHealthCheck) *PassiveHealthCheck
type PassiveHealthCheckParam ¶
type PassiveHealthCheckParam struct { Schema *string `json:"schema"` Interval *int32 `json:"interval" validate:"required,min=1"` Failnum *int32 `json:"failnum" validate:"required,min=1"` Statuscode *int32 `json:"statuscode" validate:"required,min=0"` Host *string `json:"host" validate:"required,min=1"` Uri *string `json:"uri" validate:"required,min=1,startswith=/"` }
type ReadyRspParam ¶
ReadyRspParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type Retries ¶
type Retries struct { MaxRetryInSubcluster int8 `json:"max_retry_in_subcluster" uri:"max_retry_in_subcluster"` MaxRetryCrossSubcluster int8 `json:"max_retry_cross_subcluster" uri:"max_retry_cross_subcluster"` }
Retries Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type RetriesParam ¶
type RetriesParam struct { MaxRetryInSubcluster *int8 `json:"max_retry_in_subcluster" validate:"required,min=0"` MaxRetryCrossSubcluster *int8 `json:"max_retry_cross_subcluster" validate:"required,min=0"` }
RetriesParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type StickySessions ¶
type StickySessions struct { SessionStickyType string `json:"session_sticky_type" uri:"session_sticky_type"` HashStrategy string `json:"hash_strategy" uri:"hash_strategy"` HashHeader string `json:"hash_header" uri:"hash_header"` }
StickySessions Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type StickySessionsParam ¶
type StickySessionsParam struct { SessionStickyType *string `json:"session_sticky_type" validate:"required,oneof=INSTANCE SUB_CLUSTER"` HashStrategy *string `json:"hash_strategy" validate:"required,oneof=CLIENT_IP_ONLY CLIENT_ID_ONLY CLIENT_ID_PREFERED"` HashHeader *string `json:"hash_header"` }
StickySessionsParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type Timeouts ¶
type Timeouts struct { TimeoutConnServ int32 `json:"timeout_conn_serv" uri:"timeout_conn_serv"` TimeoutResponseHeader int32 `json:"timeout_response_header" uri:"timeout_response_header"` TimeoutReadbodyClient int32 `json:"timeout_readbody_client" uri:"timeout_readbody_client"` TimeoutReadClientAgain int32 `json:"timeout_read_client_again" uri:"timeout_read_client_again"` TimeoutWriteClient int32 `json:"timeout_write_client" uri:"timeout_write_client"` }
Timeouts Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type TimeoutsParam ¶
type TimeoutsParam struct { TimeoutConnServ *int32 `json:"timeout_conn_serv" validate:"required,min=1"` TimeoutResponseHeader *int32 `json:"timeout_response_header" validate:"required,min=1"` TimeoutReadbodyClient *int32 `json:"timeout_readbody_client" validate:"required,min=1"` TimeoutReadClientAgain *int32 `json:"timeout_read_client_again" validate:"required,min=1"` TimeoutWriteClient *int32 `json:"timeout_write_client" validate:"required,min=1"` }
TimeoutsParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED
type UpsertParam ¶
type UpsertParam struct { Name *string `json:"name" uri:"cluster_name"` Description *string `json:"description"` Basic *BasicParam `json:"basic"` StickySessions *StickySessionsParam `json:"sticky_sessions"` SubClusters []string `json:"sub_clusters"` Scheduler map[string]map[string]int `json:"scheduler"` PassiveHealthCheck *PassiveHealthCheckParam `json:"passive_health_check"` }
UpsertParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED