Documentation ¶
Index ¶
- Constants
- type AppRouteSlice
- type AppRouteStats
- type ByLength
- type DomainStats
- type HostSlice
- type HostStats
- func (hs *HostStats) AddPath(path string, routeId string, ignoreOnExists bool) *RouteStats
- func (hs *HostStats) AddPathDynamic(fullPath string, routeId string) *RouteStats
- func (hs *HostStats) AddPort(port int, routeId string, ignoreOnExists bool) *RouteStats
- func (hs *HostStats) FindPathMatch(findPath string) string
- func (hs *HostStats) FindRouteStats(findPath string) *RouteStats
- type HttpMethodSlice
- type HttpMethodStats
- type RouteSlice
- type RouteStats
Constants ¶
View Source
const OTHER = "OTHER"
Used as an overflow key when too many values are in map E.g., if too many values in UserAgent map, use OTHER bucket
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppRouteSlice ¶
type AppRouteSlice []*AppRouteStats
type AppRouteStats ¶
type AppRouteStats struct { AppId string // E.g., GET, PUT, POST, DELETE HttpMethodStatsMap map[events.Method]*HttpMethodStats // Good idea?? UserAgentMap map[string]int64 }
func NewAppRouteStats ¶
func NewAppRouteStats(appId string) *AppRouteStats
func (*AppRouteStats) FindHttpMethodStats ¶
func (ars *AppRouteStats) FindHttpMethodStats(httpMethod events.Method) *HttpMethodStats
type DomainStats ¶
Domain --> Host --> Path -> AppId = RouteStats
func NewDomainStats ¶
func NewDomainStats(domainId string) *DomainStats
func (*DomainStats) Id ¶
func (ds *DomainStats) Id() string
type HostStats ¶
type HostStats struct { // Key: path (needs to include empty string as key for root path) RouteStatsMap map[string]*RouteStats // Key: tcp port (for TCP based routes) TcpRouteStatsMap map[int]*RouteStats // contains filtered or unexported fields }
func NewHostStats ¶
func (*HostStats) AddPath ¶
func (hs *HostStats) AddPath(path string, routeId string, ignoreOnExists bool) *RouteStats
func (*HostStats) AddPathDynamic ¶
func (hs *HostStats) AddPathDynamic(fullPath string, routeId string) *RouteStats
func (*HostStats) AddPort ¶
func (hs *HostStats) AddPort(port int, routeId string, ignoreOnExists bool) *RouteStats
func (*HostStats) FindPathMatch ¶
Find matching route for given path TODO: Are "path" definitions in CF case sensative?
[0] "/webappa/subapp1" [1] "/webappa" [2] ""
findPath = "/webappabc" => "" findPath = "/webappa" => "/webappa" findPath = "/webappa/" => "/webappa" findPath = "/webappa/doc" => "/webappa"
func (*HostStats) FindRouteStats ¶
func (hs *HostStats) FindRouteStats(findPath string) *RouteStats
type HttpMethodSlice ¶
type HttpMethodSlice []*HttpMethodStats
type HttpMethodStats ¶
type HttpMethodStats struct { Method events.Method LastAccess time.Time AvgResponseL60Time float64 // updated after a clone of this object EventL60Rate int // updated after a clone of this object AvgResponseL10Time float64 // updated after a clone of this object EventL10Rate int // updated after a clone of this object AvgResponseL1Time float64 // updated after a clone of this object EventL1Rate int // updated after a clone of this object RequestCount int64 // E.g., 200, 404, 500 HttpStatusCode map[int32]int64 // NOTE: is this realistic?? There could be unlimited number of RemoteAddresses // PCF 1.6 - All we have it remoteAddresses // PCF 1.7 - All we have it remoteAddresses as format of uri is messed up // PCF 1.8: "forwarded" (array) - pick the first/top forwarded value from HttpStartStop event array // NOTE: PCF 1.8 - remote address includes a port Forwarder map[string]int64 ResponseContentLength int64 // Not currently used RequestContentLength int64 // contains filtered or unexported fields }
func NewHttpMethodStats ¶
func NewHttpMethodStats(httpMethod events.Method) *HttpMethodStats
type RouteSlice ¶
type RouteSlice []*RouteStats
type RouteStats ¶
type RouteStats struct { RouteId string // Key: appId AppRouteStatsMap map[string]*AppRouteStats }
func NewRouteStats ¶
func NewRouteStats(routeId string) *RouteStats
func (*RouteStats) FindAppRouteStats ¶
func (rs *RouteStats) FindAppRouteStats(appId string) *AppRouteStats
func (*RouteStats) Id ¶
func (rs *RouteStats) Id() string
Click to show internal directories.
Click to hide internal directories.