Documentation ¶
Index ¶
- type HTTPClient
- type Limiter
- type RequestType
- type Service
- type URLPath
- func (u URLPath) FilterChain(req *restful.Request) (RequestType, error)
- func (u *URLPath) WithAdmin(req *restful.Request) (isHit bool)
- func (u *URLPath) WithCloud(req *restful.Request) (isHit bool)
- func (u *URLPath) WithDataCollect(req *restful.Request) (isHit bool)
- func (u *URLPath) WithEvent(req *restful.Request) (isHit bool)
- func (u *URLPath) WithHost(req *restful.Request) (isHit bool)
- func (u *URLPath) WithOperation(req *restful.Request) (isHit bool)
- func (u *URLPath) WithProc(req *restful.Request) (isHit bool)
- func (u *URLPath) WithTask(req *restful.Request) (isHit bool)
- func (u *URLPath) WithTopo(req *restful.Request) (isHit bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPClient ¶
HTTPClient http client method
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
func NewLimiter ¶
func (*Limiter) GetMatchedRule ¶
func (l *Limiter) GetMatchedRule(req *restful.Request) *metadata.LimiterRule
GetMatchedRule get the matched limiter rule according request
func (*Limiter) GetRules ¶
func (l *Limiter) GetRules() map[string]*metadata.LimiterRule
GetRules get all rules of limiter
func (*Limiter) LenOfRules ¶
LenOfRules get the count of limiter's rules
func (*Limiter) SyncLimiterRules ¶
SyncLimiterRules sync the api limiter rules from zk
type RequestType ¶
type RequestType string
const ( UnknownType RequestType = "unknown" TopoType RequestType = "topo" HostType RequestType = "host" ProcType RequestType = "proc" EventType RequestType = "event" DataCollectType RequestType = "collect" OperationType RequestType = "operation" TaskType RequestType = "task" AdminType RequestType = "admin" CloudType RequestType = "cloud" )
type Service ¶
type Service interface { WebServices() []*restful.WebService SetConfig(engine *backbone.Engine, httpClient HTTPClient, discovery discovery.DiscoveryInterface, clientSet apimachinery.ClientSetInterface, cache *redis.Client, limiter *Limiter) }
Service service methods
type URLPath ¶
type URLPath string
URLPath url path filter
func (URLPath) FilterChain ¶
func (u URLPath) FilterChain(req *restful.Request) (RequestType, error)
FilterChain url path filter
func (*URLPath) WithDataCollect ¶
WithDataCollect transform DataCollect's url
func (*URLPath) WithOperation ¶
WithOperation transform OperationStatistic's url
Click to show internal directories.
Click to hide internal directories.