traffic

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ManualUpdateEndpoint = &xreq.Endpoint{
	Path:       "/products/{product_name}/clusters/{cluster_name}/scheduler",
	Method:     http.MethodPatch,
	Handler:    xreq.Convert(ManualUpdateAction),
	Authorizer: iauth.FAP(iauth.FeatureTraffic, iauth.ActionUpdate),
}

ManualUpdateRoute route AUTO GEN BY ctrl, MODIFY AS U NEED

View Source
var OneEndpoint = &xreq.Endpoint{
	Path:       "/products/{product_name}/clusters/{cluster_name}/scheduler",
	Method:     http.MethodGet,
	Handler:    xreq.Convert(OneAction),
	Authorizer: iauth.FAP(iauth.FeatureTraffic, iauth.ActionRead),
}

OneRoute route AUTO GEN BY ctrl, MODIFY AS U NEED

Functions

func ManualUpdateAction

func ManualUpdateAction(req *http.Request) (interface{}, error)

ManualUpdateAction action AUTO GEN BY ctrl, MODIFY AS U NEED

func OneAction

func OneAction(req *http.Request) (interface{}, error)

OneAction action AUTO GEN BY ctrl, MODIFY AS U NEED

Types

type AutoScheduler

type AutoScheduler struct {
	MaxRegionLoad    float64          `json:"max_region_load" uri:"max_region_load"`
	MaxBlackholeLoad float64          `json:"max_blackhole_load" uri:"max_blackhole_load"`
	BlackholeEnabled bool             `json:"blackhole_enabled" uri:"blackhole_enabled"`
	Capacity         map[string]int64 `json:"capacity"`
}

AutoScheduler Request Param AUTO GEN BY ctrl, MODIFY AS U NEED

type OneData

type OneData struct {
	Cluster       string                    `json:"cluster" uri:"cluster"`
	Scheduler     map[string]map[string]int `json:"scheduler,omitempty" uri:"scheduler"`
	AutoScheduler *AutoScheduler            `json:"auto_scheduler,omitempty" uri:"auto_scheduler"`
}

OneData Request Param AUTO GEN BY ctrl, MODIFY AS U NEED

type OneParam

type OneParam struct {
	ClusterName string `json:"cluster_name" uri:"cluster_name" validate:"required,min=2"`
}

OneParam Request Param AUTO GEN BY ctrl, MODIFY AS U NEED

type SubCluster

type SubCluster struct {
	Name     string `json:"name" uri:"name" validate:"required,min=1"`
	Capacity int64  `json:"capacity" uri:"capacity" validate:"required,min=1"`
}

SubCluster Request Param AUTO GEN BY ctrl, MODIFY AS U NEED

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL