teastats

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: MIT, MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllStartedServers = maps.Map{} // serverId => *ServerQueue
View Source
var AllStatFilters = []maps.Map{}

Functions

func FindAllStatFilters

func FindAllStatFilters() []maps.Map

获取所有的filter

func FindPeriodName

func FindPeriodName(period string) string

获取时间period对应的名称

func RegisterFilter

func RegisterFilter(filters ...FilterInterface)

注册一个或多个筛选器

func RestartServerFilters

func RestartServerFilters(serverId string, codes []string)

启动一个服务的筛选器

Types

type BackendAllPeriodFilter

type BackendAllPeriodFilter struct {
	CounterFilter
}

后端统计

func (*BackendAllPeriodFilter) Codes

func (this *BackendAllPeriodFilter) Codes() []string

func (*BackendAllPeriodFilter) Description

func (this *BackendAllPeriodFilter) Description() string

func (*BackendAllPeriodFilter) Filter

func (this *BackendAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*BackendAllPeriodFilter) Indexes

func (this *BackendAllPeriodFilter) Indexes() []string

func (*BackendAllPeriodFilter) Name

func (this *BackendAllPeriodFilter) Name() string

func (*BackendAllPeriodFilter) ParamVariables

func (this *BackendAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*BackendAllPeriodFilter) Start

func (this *BackendAllPeriodFilter) Start(queue *Queue, code string)

func (*BackendAllPeriodFilter) Stop

func (this *BackendAllPeriodFilter) Stop()

func (*BackendAllPeriodFilter) ValueVariables

func (this *BackendAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type BrowserAllPeriodFilter

type BrowserAllPeriodFilter struct {
	CounterFilter
}

浏览器统计

func (*BrowserAllPeriodFilter) Codes

func (this *BrowserAllPeriodFilter) Codes() []string

func (*BrowserAllPeriodFilter) Description

func (this *BrowserAllPeriodFilter) Description() string

func (*BrowserAllPeriodFilter) Filter

func (this *BrowserAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*BrowserAllPeriodFilter) Indexes

func (this *BrowserAllPeriodFilter) Indexes() []string

func (*BrowserAllPeriodFilter) Name

func (this *BrowserAllPeriodFilter) Name() string

func (*BrowserAllPeriodFilter) ParamVariables

func (this *BrowserAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*BrowserAllPeriodFilter) Start

func (this *BrowserAllPeriodFilter) Start(queue *Queue, code string)

func (*BrowserAllPeriodFilter) Stop

func (this *BrowserAllPeriodFilter) Stop()

func (*BrowserAllPeriodFilter) ValueVariables

func (this *BrowserAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type CityAllPeriodFilter

type CityAllPeriodFilter struct {
	CounterFilter
}

城市统计

func (*CityAllPeriodFilter) Codes

func (this *CityAllPeriodFilter) Codes() []string

func (*CityAllPeriodFilter) Description

func (this *CityAllPeriodFilter) Description() string

func (*CityAllPeriodFilter) Filter

func (this *CityAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*CityAllPeriodFilter) Indexes

func (this *CityAllPeriodFilter) Indexes() []string

func (*CityAllPeriodFilter) Name

func (this *CityAllPeriodFilter) Name() string

func (*CityAllPeriodFilter) ParamVariables

func (this *CityAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*CityAllPeriodFilter) Start

func (this *CityAllPeriodFilter) Start(queue *Queue, code string)

func (*CityAllPeriodFilter) Stop

func (this *CityAllPeriodFilter) Stop()

func (*CityAllPeriodFilter) ValueVariables

func (this *CityAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type CostAllPeriodFilter

type CostAllPeriodFilter struct {
	CounterFilter
}

耗时统计

func (*CostAllPeriodFilter) Codes

func (this *CostAllPeriodFilter) Codes() []string

func (*CostAllPeriodFilter) Description

func (this *CostAllPeriodFilter) Description() string

func (*CostAllPeriodFilter) Filter

func (this *CostAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*CostAllPeriodFilter) Indexes

func (this *CostAllPeriodFilter) Indexes() []string

func (*CostAllPeriodFilter) Name

func (this *CostAllPeriodFilter) Name() string

func (*CostAllPeriodFilter) ParamVariables

func (this *CostAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*CostAllPeriodFilter) Start

func (this *CostAllPeriodFilter) Start(queue *Queue, code string)

func (*CostAllPeriodFilter) Stop

func (this *CostAllPeriodFilter) Stop()

func (*CostAllPeriodFilter) ValueVariables

func (this *CostAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type CostPagePeriodFilter

type CostPagePeriodFilter struct {
	CounterFilter
}

耗时统计

func (*CostPagePeriodFilter) Codes

func (this *CostPagePeriodFilter) Codes() []string

func (*CostPagePeriodFilter) Description

func (this *CostPagePeriodFilter) Description() string

func (*CostPagePeriodFilter) Filter

func (this *CostPagePeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*CostPagePeriodFilter) Indexes

func (this *CostPagePeriodFilter) Indexes() []string

func (*CostPagePeriodFilter) Name

func (this *CostPagePeriodFilter) Name() string

func (*CostPagePeriodFilter) ParamVariables

func (this *CostPagePeriodFilter) ParamVariables() []*Variable

参数说明

func (*CostPagePeriodFilter) Start

func (this *CostPagePeriodFilter) Start(queue *Queue, code string)

func (*CostPagePeriodFilter) Stop

func (this *CostPagePeriodFilter) Stop()

func (*CostPagePeriodFilter) ValueVariables

func (this *CostPagePeriodFilter) ValueVariables() []*Variable

统计数据说明

type CounterFilter

type CounterFilter struct {
	Period stats.ValuePeriod

	IncreaseFunc func(value maps.Map, inc maps.Map) maps.Map
	// contains filtered or unexported fields
}

数值增长型的统计

func (*CounterFilter) ApplyFilter

func (this *CounterFilter) ApplyFilter(accessLog *accesslogs.AccessLog, params map[string]string, incrValue map[string]interface{})

应用筛选器

func (*CounterFilter) CheckNewIP

func (this *CounterFilter) CheckNewIP(accessLog *accesslogs.AccessLog, attachKey string) bool

检查新IP

func (*CounterFilter) CheckNewUV

func (this *CounterFilter) CheckNewUV(accessLog *accesslogs.AccessLog, attachKey string) bool

检查新UV

func (*CounterFilter) Commit

func (this *CounterFilter) Commit()

提交

func (*CounterFilter) StartFilter

func (this *CounterFilter) StartFilter(code string, period stats.ValuePeriod)

启动筛选器

func (*CounterFilter) StopFilter

func (this *CounterFilter) StopFilter()

停止筛选器

type CounterValue

type CounterValue struct {
	Timestamp int64                  `json:"timestamp"` // 时间戳
	Params    map[string]string      `json:"params"`    // 参数,用来区分单个统计项内的不同的项目
	Value     map[string]interface{} `json:"value"`     // 数值
}

数值增长型的统计值

type DeviceAllPeriodFilter

type DeviceAllPeriodFilter struct {
	CounterFilter
}

设备统计

func (*DeviceAllPeriodFilter) Codes

func (this *DeviceAllPeriodFilter) Codes() []string

func (*DeviceAllPeriodFilter) Description

func (this *DeviceAllPeriodFilter) Description() string

func (*DeviceAllPeriodFilter) Filter

func (this *DeviceAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*DeviceAllPeriodFilter) Indexes

func (this *DeviceAllPeriodFilter) Indexes() []string

func (*DeviceAllPeriodFilter) Name

func (this *DeviceAllPeriodFilter) Name() string

func (*DeviceAllPeriodFilter) ParamVariables

func (this *DeviceAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*DeviceAllPeriodFilter) Start

func (this *DeviceAllPeriodFilter) Start(queue *Queue, code string)

func (*DeviceAllPeriodFilter) Stop

func (this *DeviceAllPeriodFilter) Stop()

func (*DeviceAllPeriodFilter) ValueVariables

func (this *DeviceAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type FastcgiAllPeriodFilter

type FastcgiAllPeriodFilter struct {
	CounterFilter
}

Fastcgi请求统计

func (*FastcgiAllPeriodFilter) Codes

func (this *FastcgiAllPeriodFilter) Codes() []string

func (*FastcgiAllPeriodFilter) Description

func (this *FastcgiAllPeriodFilter) Description() string

func (*FastcgiAllPeriodFilter) Filter

func (this *FastcgiAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*FastcgiAllPeriodFilter) Indexes

func (this *FastcgiAllPeriodFilter) Indexes() []string

func (*FastcgiAllPeriodFilter) Name

func (this *FastcgiAllPeriodFilter) Name() string

func (*FastcgiAllPeriodFilter) ParamVariables

func (this *FastcgiAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*FastcgiAllPeriodFilter) Start

func (this *FastcgiAllPeriodFilter) Start(queue *Queue, code string)

func (*FastcgiAllPeriodFilter) Stop

func (this *FastcgiAllPeriodFilter) Stop()

func (*FastcgiAllPeriodFilter) ValueVariables

func (this *FastcgiAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type FilterInterface

type FilterInterface interface {
	// 名称
	Name() string

	// 描述
	Description() string

	// 代号
	Codes() []string

	// 参数说明
	ParamVariables() []*Variable

	// 统计数据说明
	ValueVariables() []*Variable

	// 索引参数
	Indexes() []string

	// 启动
	Start(queue *Queue, code string)

	// 筛选某个访问日志
	Filter(accessLog *accesslogs.AccessLog)

	// 提交数据
	Commit()

	// 停止
	Stop()
}

筛选器接口

func FindNewFilter

func FindNewFilter(code string) FilterInterface

查找单个Filter

func FindSharedFilter

func FindSharedFilter(code string) FilterInterface

查找单个Filter信息

type IPAllPeriodFilter

type IPAllPeriodFilter struct {
	CounterFilter
}

IP统计

func (*IPAllPeriodFilter) Codes

func (this *IPAllPeriodFilter) Codes() []string

func (*IPAllPeriodFilter) Description

func (this *IPAllPeriodFilter) Description() string

func (*IPAllPeriodFilter) Filter

func (this *IPAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*IPAllPeriodFilter) Indexes

func (this *IPAllPeriodFilter) Indexes() []string

func (*IPAllPeriodFilter) Name

func (this *IPAllPeriodFilter) Name() string

func (*IPAllPeriodFilter) ParamVariables

func (this *IPAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*IPAllPeriodFilter) Start

func (this *IPAllPeriodFilter) Start(queue *Queue, code string)

func (*IPAllPeriodFilter) Stop

func (this *IPAllPeriodFilter) Stop()

func (*IPAllPeriodFilter) ValueVariables

func (this *IPAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type IPPagePeriodFilter

type IPPagePeriodFilter struct {
	CounterFilter
}

IP统计

func (*IPPagePeriodFilter) Codes

func (this *IPPagePeriodFilter) Codes() []string

func (*IPPagePeriodFilter) Description

func (this *IPPagePeriodFilter) Description() string

func (*IPPagePeriodFilter) Filter

func (this *IPPagePeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*IPPagePeriodFilter) Indexes

func (this *IPPagePeriodFilter) Indexes() []string

func (*IPPagePeriodFilter) Name

func (this *IPPagePeriodFilter) Name() string

func (*IPPagePeriodFilter) ParamVariables

func (this *IPPagePeriodFilter) ParamVariables() []*Variable

参数说明

func (*IPPagePeriodFilter) Start

func (this *IPPagePeriodFilter) Start(queue *Queue, code string)

func (*IPPagePeriodFilter) Stop

func (this *IPPagePeriodFilter) Stop()

func (*IPPagePeriodFilter) ValueVariables

func (this *IPPagePeriodFilter) ValueVariables() []*Variable

统计数据说明

type KVStorage

type KVStorage struct {
	// contains filtered or unexported fields
}

KV存储引擎

func NewKVStorage

func NewKVStorage(filename string) *KVStorage

获取新对象

func (*KVStorage) Close

func (this *KVStorage) Close() error

关闭

func (*KVStorage) Get

func (this *KVStorage) Get(key string) (string, error)

获取键对应的值

func (*KVStorage) Has

func (this *KVStorage) Has(key string) (bool, error)

检查key是否存在,并不检查是否过期

func (*KVStorage) Set

func (this *KVStorage) Set(key string, value string, life time.Duration) error

设置键值对

type LandingPagePeriodFilter

type LandingPagePeriodFilter struct {
	CounterFilter
}

登陆页统计

func (*LandingPagePeriodFilter) Codes

func (this *LandingPagePeriodFilter) Codes() []string

func (*LandingPagePeriodFilter) Description

func (this *LandingPagePeriodFilter) Description() string

func (*LandingPagePeriodFilter) Filter

func (this *LandingPagePeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*LandingPagePeriodFilter) Indexes

func (this *LandingPagePeriodFilter) Indexes() []string

func (*LandingPagePeriodFilter) Name

func (this *LandingPagePeriodFilter) Name() string

func (*LandingPagePeriodFilter) ParamVariables

func (this *LandingPagePeriodFilter) ParamVariables() []*Variable

参数说明

func (*LandingPagePeriodFilter) Start

func (this *LandingPagePeriodFilter) Start(queue *Queue, code string)

func (*LandingPagePeriodFilter) Stop

func (this *LandingPagePeriodFilter) Stop()

func (*LandingPagePeriodFilter) ValueVariables

func (this *LandingPagePeriodFilter) ValueVariables() []*Variable

统计数据说明

type LocationAllPeriodFilter

type LocationAllPeriodFilter struct {
	CounterFilter
}

路径规则请求统计

func (*LocationAllPeriodFilter) Codes

func (this *LocationAllPeriodFilter) Codes() []string

func (*LocationAllPeriodFilter) Description

func (this *LocationAllPeriodFilter) Description() string

func (*LocationAllPeriodFilter) Filter

func (this *LocationAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*LocationAllPeriodFilter) Indexes

func (this *LocationAllPeriodFilter) Indexes() []string

func (*LocationAllPeriodFilter) Name

func (this *LocationAllPeriodFilter) Name() string

func (*LocationAllPeriodFilter) ParamVariables

func (this *LocationAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*LocationAllPeriodFilter) Start

func (this *LocationAllPeriodFilter) Start(queue *Queue, code string)

func (*LocationAllPeriodFilter) Stop

func (this *LocationAllPeriodFilter) Stop()

func (*LocationAllPeriodFilter) ValueVariables

func (this *LocationAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type MethodAllPeriodFilter

type MethodAllPeriodFilter struct {
	CounterFilter
}

请求方法统计

func (*MethodAllPeriodFilter) Codes

func (this *MethodAllPeriodFilter) Codes() []string

func (*MethodAllPeriodFilter) Description

func (this *MethodAllPeriodFilter) Description() string

func (*MethodAllPeriodFilter) Filter

func (this *MethodAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*MethodAllPeriodFilter) Indexes

func (this *MethodAllPeriodFilter) Indexes() []string

func (*MethodAllPeriodFilter) Name

func (this *MethodAllPeriodFilter) Name() string

func (*MethodAllPeriodFilter) ParamVariables

func (this *MethodAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*MethodAllPeriodFilter) Start

func (this *MethodAllPeriodFilter) Start(queue *Queue, code string)

func (*MethodAllPeriodFilter) Stop

func (this *MethodAllPeriodFilter) Stop()

func (*MethodAllPeriodFilter) ValueVariables

func (this *MethodAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type MethodPagePeriodFilter

type MethodPagePeriodFilter struct {
	CounterFilter
}

请求方法统计

func (*MethodPagePeriodFilter) Codes

func (this *MethodPagePeriodFilter) Codes() []string

func (*MethodPagePeriodFilter) Description

func (this *MethodPagePeriodFilter) Description() string

func (*MethodPagePeriodFilter) Filter

func (this *MethodPagePeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*MethodPagePeriodFilter) Indexes

func (this *MethodPagePeriodFilter) Indexes() []string

func (*MethodPagePeriodFilter) Name

func (this *MethodPagePeriodFilter) Name() string

func (*MethodPagePeriodFilter) ParamVariables

func (this *MethodPagePeriodFilter) ParamVariables() []*Variable

参数说明

func (*MethodPagePeriodFilter) Start

func (this *MethodPagePeriodFilter) Start(queue *Queue, code string)

func (*MethodPagePeriodFilter) Stop

func (this *MethodPagePeriodFilter) Stop()

func (*MethodPagePeriodFilter) ValueVariables

func (this *MethodPagePeriodFilter) ValueVariables() []*Variable

统计数据说明

type OSAllPeriodFilter

type OSAllPeriodFilter struct {
	CounterFilter
}

操作系统统计

func (*OSAllPeriodFilter) Codes

func (this *OSAllPeriodFilter) Codes() []string

func (*OSAllPeriodFilter) Description

func (this *OSAllPeriodFilter) Description() string

func (*OSAllPeriodFilter) Filter

func (this *OSAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*OSAllPeriodFilter) Indexes

func (this *OSAllPeriodFilter) Indexes() []string

func (*OSAllPeriodFilter) Name

func (this *OSAllPeriodFilter) Name() string

func (*OSAllPeriodFilter) ParamVariables

func (this *OSAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*OSAllPeriodFilter) Start

func (this *OSAllPeriodFilter) Start(queue *Queue, code string)

func (*OSAllPeriodFilter) Stop

func (this *OSAllPeriodFilter) Stop()

func (*OSAllPeriodFilter) ValueVariables

func (this *OSAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type PVAllPeriodFilter

type PVAllPeriodFilter struct {
	CounterFilter
}

PV统计

func (*PVAllPeriodFilter) Codes

func (this *PVAllPeriodFilter) Codes() []string

func (*PVAllPeriodFilter) Description

func (this *PVAllPeriodFilter) Description() string

func (*PVAllPeriodFilter) Filter

func (this *PVAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*PVAllPeriodFilter) Indexes

func (this *PVAllPeriodFilter) Indexes() []string

func (*PVAllPeriodFilter) Name

func (this *PVAllPeriodFilter) Name() string

func (*PVAllPeriodFilter) ParamVariables

func (this *PVAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*PVAllPeriodFilter) Start

func (this *PVAllPeriodFilter) Start(queue *Queue, code string)

func (*PVAllPeriodFilter) Stop

func (this *PVAllPeriodFilter) Stop()

func (*PVAllPeriodFilter) ValueVariables

func (this *PVAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type PVPagePeriodFilter

type PVPagePeriodFilter struct {
	CounterFilter
}

PV统计

func (*PVPagePeriodFilter) Codes

func (this *PVPagePeriodFilter) Codes() []string

func (*PVPagePeriodFilter) Description

func (this *PVPagePeriodFilter) Description() string

func (*PVPagePeriodFilter) Filter

func (this *PVPagePeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*PVPagePeriodFilter) Indexes

func (this *PVPagePeriodFilter) Indexes() []string

func (*PVPagePeriodFilter) Name

func (this *PVPagePeriodFilter) Name() string

func (*PVPagePeriodFilter) ParamVariables

func (this *PVPagePeriodFilter) ParamVariables() []*Variable

参数说明

func (*PVPagePeriodFilter) Start

func (this *PVPagePeriodFilter) Start(queue *Queue, code string)

func (*PVPagePeriodFilter) Stop

func (this *PVPagePeriodFilter) Stop()

func (*PVPagePeriodFilter) ValueVariables

func (this *PVPagePeriodFilter) ValueVariables() []*Variable

统计数据说明

type ProvinceAllPeriodFilter

type ProvinceAllPeriodFilter struct {
	CounterFilter
}

省份统计

func (*ProvinceAllPeriodFilter) Codes

func (this *ProvinceAllPeriodFilter) Codes() []string

func (*ProvinceAllPeriodFilter) Description

func (this *ProvinceAllPeriodFilter) Description() string

func (*ProvinceAllPeriodFilter) Filter

func (this *ProvinceAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*ProvinceAllPeriodFilter) Indexes

func (this *ProvinceAllPeriodFilter) Indexes() []string

func (*ProvinceAllPeriodFilter) Name

func (this *ProvinceAllPeriodFilter) Name() string

func (*ProvinceAllPeriodFilter) ParamVariables

func (this *ProvinceAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*ProvinceAllPeriodFilter) Start

func (this *ProvinceAllPeriodFilter) Start(queue *Queue, code string)

func (*ProvinceAllPeriodFilter) Stop

func (this *ProvinceAllPeriodFilter) Stop()

func (*ProvinceAllPeriodFilter) ValueVariables

func (this *ProvinceAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type Queue

type Queue struct {
	ServerId string
	// contains filtered or unexported fields
}

入库队列

func NewQueue

func NewQueue() *Queue

获取新对象

func (*Queue) Add

func (this *Queue) Add(itemCode string, t time.Time, period stats.ValuePeriod, params map[string]string, value maps.Map)

添加指标值

func (*Queue) Index

func (this *Queue) Index(index []string)

添加索引

func (*Queue) Start

func (this *Queue) Start(serverId string)

队列单例

func (*Queue) Stop

func (this *Queue) Stop()

停止

type Rank

type Rank struct {
	// contains filtered or unexported fields
}

排行计算

func NewRank

func NewRank(topSize int, bufferSize int) *Rank

获取新对象

func (*Rank) Add

func (this *Rank) Add(key string)

添加键值

func (*Rank) Load

func (this *Rank) Load(db *leveldb.DB, prefix string)

从LevelDB中加载

func (*Rank) Reset

func (this *Rank) Reset()

重置

func (*Rank) Save

func (this *Rank) Save(db *leveldb.DB, prefix string)

保存到LevelDB

func (*Rank) Top

func (this *Rank) Top() []*RankValue

获取排行结果

type RankValue

type RankValue struct {
	Key   string `json:"key"`
	Value int    `json:"value"`
}

排行值

type RefererDomainPeriodFilter

type RefererDomainPeriodFilter struct {
	CounterFilter
}

来源域名统计

func (*RefererDomainPeriodFilter) Codes

func (this *RefererDomainPeriodFilter) Codes() []string

func (*RefererDomainPeriodFilter) Description

func (this *RefererDomainPeriodFilter) Description() string

func (*RefererDomainPeriodFilter) Filter

func (this *RefererDomainPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*RefererDomainPeriodFilter) Indexes

func (this *RefererDomainPeriodFilter) Indexes() []string

func (*RefererDomainPeriodFilter) Name

func (this *RefererDomainPeriodFilter) Name() string

func (*RefererDomainPeriodFilter) ParamVariables

func (this *RefererDomainPeriodFilter) ParamVariables() []*Variable

参数说明

func (*RefererDomainPeriodFilter) Start

func (this *RefererDomainPeriodFilter) Start(queue *Queue, code string)

func (*RefererDomainPeriodFilter) Stop

func (this *RefererDomainPeriodFilter) Stop()

func (*RefererDomainPeriodFilter) ValueVariables

func (this *RefererDomainPeriodFilter) ValueVariables() []*Variable

统计数据说明

type RefererURLPeriodFilter

type RefererURLPeriodFilter struct {
	CounterFilter
}

来源URL统计

func (*RefererURLPeriodFilter) Codes

func (this *RefererURLPeriodFilter) Codes() []string

func (*RefererURLPeriodFilter) Description

func (this *RefererURLPeriodFilter) Description() string

func (*RefererURLPeriodFilter) Filter

func (this *RefererURLPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*RefererURLPeriodFilter) Indexes

func (this *RefererURLPeriodFilter) Indexes() []string

func (*RefererURLPeriodFilter) Name

func (this *RefererURLPeriodFilter) Name() string

func (*RefererURLPeriodFilter) ParamVariables

func (this *RefererURLPeriodFilter) ParamVariables() []*Variable

参数说明

func (*RefererURLPeriodFilter) Start

func (this *RefererURLPeriodFilter) Start(queue *Queue, code string)

func (*RefererURLPeriodFilter) Stop

func (this *RefererURLPeriodFilter) Stop()

func (*RefererURLPeriodFilter) ValueVariables

func (this *RefererURLPeriodFilter) ValueVariables() []*Variable

统计数据说明

type RegionAllPeriodFilter

type RegionAllPeriodFilter struct {
	CounterFilter
}

区域统计

func (*RegionAllPeriodFilter) Codes

func (this *RegionAllPeriodFilter) Codes() []string

func (*RegionAllPeriodFilter) Description

func (this *RegionAllPeriodFilter) Description() string

func (*RegionAllPeriodFilter) Filter

func (this *RegionAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*RegionAllPeriodFilter) Indexes

func (this *RegionAllPeriodFilter) Indexes() []string

func (*RegionAllPeriodFilter) Name

func (this *RegionAllPeriodFilter) Name() string

func (*RegionAllPeriodFilter) ParamVariables

func (this *RegionAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*RegionAllPeriodFilter) Start

func (this *RegionAllPeriodFilter) Start(queue *Queue, code string)

func (*RegionAllPeriodFilter) Stop

func (this *RegionAllPeriodFilter) Stop()

func (*RegionAllPeriodFilter) ValueVariables

func (this *RegionAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type RequestAllPeriodFilter

type RequestAllPeriodFilter struct {
	CounterFilter
}

请求数统计

func (*RequestAllPeriodFilter) Codes

func (this *RequestAllPeriodFilter) Codes() []string

func (*RequestAllPeriodFilter) Description

func (this *RequestAllPeriodFilter) Description() string

func (*RequestAllPeriodFilter) Filter

func (this *RequestAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*RequestAllPeriodFilter) Indexes

func (this *RequestAllPeriodFilter) Indexes() []string

func (*RequestAllPeriodFilter) Name

func (this *RequestAllPeriodFilter) Name() string

func (*RequestAllPeriodFilter) ParamVariables

func (this *RequestAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*RequestAllPeriodFilter) Start

func (this *RequestAllPeriodFilter) Start(queue *Queue, code string)

func (*RequestAllPeriodFilter) Stop

func (this *RequestAllPeriodFilter) Stop()

func (*RequestAllPeriodFilter) ValueVariables

func (this *RequestAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type RequestIPPeriodFilter

type RequestIPPeriodFilter struct {
	// contains filtered or unexported fields
}

请求IP数统计

func (*RequestIPPeriodFilter) Codes

func (this *RequestIPPeriodFilter) Codes() []string

func (*RequestIPPeriodFilter) Commit

func (this *RequestIPPeriodFilter) Commit()

func (*RequestIPPeriodFilter) Description

func (this *RequestIPPeriodFilter) Description() string

func (*RequestIPPeriodFilter) Filter

func (this *RequestIPPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*RequestIPPeriodFilter) Indexes

func (this *RequestIPPeriodFilter) Indexes() []string

func (*RequestIPPeriodFilter) Name

func (this *RequestIPPeriodFilter) Name() string

func (*RequestIPPeriodFilter) ParamVariables

func (this *RequestIPPeriodFilter) ParamVariables() []*Variable

参数说明

func (*RequestIPPeriodFilter) Start

func (this *RequestIPPeriodFilter) Start(queue *Queue, code string)

func (*RequestIPPeriodFilter) Stop

func (this *RequestIPPeriodFilter) Stop()

func (*RequestIPPeriodFilter) ValueVariables

func (this *RequestIPPeriodFilter) ValueVariables() []*Variable

统计数据说明

type RequestPagePeriodFilter

type RequestPagePeriodFilter struct {
	CounterFilter
}

请求数统计

func (*RequestPagePeriodFilter) Codes

func (this *RequestPagePeriodFilter) Codes() []string

func (*RequestPagePeriodFilter) Description

func (this *RequestPagePeriodFilter) Description() string

func (*RequestPagePeriodFilter) Filter

func (this *RequestPagePeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*RequestPagePeriodFilter) Indexes

func (this *RequestPagePeriodFilter) Indexes() []string

func (*RequestPagePeriodFilter) Name

func (this *RequestPagePeriodFilter) Name() string

func (*RequestPagePeriodFilter) ParamVariables

func (this *RequestPagePeriodFilter) ParamVariables() []*Variable

参数说明

func (*RequestPagePeriodFilter) Start

func (this *RequestPagePeriodFilter) Start(queue *Queue, code string)

func (*RequestPagePeriodFilter) Stop

func (this *RequestPagePeriodFilter) Stop()

func (*RequestPagePeriodFilter) ValueVariables

func (this *RequestPagePeriodFilter) ValueVariables() []*Variable

统计数据说明

type RewriteAllPeriodFilter

type RewriteAllPeriodFilter struct {
	CounterFilter
}

重写规则请求统计

func (*RewriteAllPeriodFilter) Codes

func (this *RewriteAllPeriodFilter) Codes() []string

func (*RewriteAllPeriodFilter) Description

func (this *RewriteAllPeriodFilter) Description() string

func (*RewriteAllPeriodFilter) Filter

func (this *RewriteAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*RewriteAllPeriodFilter) Indexes

func (this *RewriteAllPeriodFilter) Indexes() []string

func (*RewriteAllPeriodFilter) Name

func (this *RewriteAllPeriodFilter) Name() string

func (*RewriteAllPeriodFilter) ParamVariables

func (this *RewriteAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*RewriteAllPeriodFilter) Start

func (this *RewriteAllPeriodFilter) Start(queue *Queue, code string)

func (*RewriteAllPeriodFilter) Stop

func (this *RewriteAllPeriodFilter) Stop()

func (*RewriteAllPeriodFilter) ValueVariables

func (this *RewriteAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type ServerQueue

type ServerQueue struct {
	Queue   *Queue
	Filters map[string]FilterInterface // code => instance
}

服务队列配置 为每一个代理服务配置一个服务队列

func FindServerQueue

func FindServerQueue(serverId string) *ServerQueue

查找ServerQueue

func (*ServerQueue) Commit

func (this *ServerQueue) Commit()

提交数据

func (*ServerQueue) Filter

func (this *ServerQueue) Filter(accessLog *accesslogs.AccessLog)

筛选

func (*ServerQueue) StartFilter

func (this *ServerQueue) StartFilter(code string)

启动一个Filter

func (*ServerQueue) Stop

func (this *ServerQueue) Stop()

停止队列

type StatusAllPeriodFilter

type StatusAllPeriodFilter struct {
	CounterFilter
}

状态码统计

func (*StatusAllPeriodFilter) Codes

func (this *StatusAllPeriodFilter) Codes() []string

func (*StatusAllPeriodFilter) Description

func (this *StatusAllPeriodFilter) Description() string

func (*StatusAllPeriodFilter) Filter

func (this *StatusAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*StatusAllPeriodFilter) Indexes

func (this *StatusAllPeriodFilter) Indexes() []string

func (*StatusAllPeriodFilter) Name

func (this *StatusAllPeriodFilter) Name() string

func (*StatusAllPeriodFilter) ParamVariables

func (this *StatusAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*StatusAllPeriodFilter) Start

func (this *StatusAllPeriodFilter) Start(queue *Queue, code string)

func (*StatusAllPeriodFilter) Stop

func (this *StatusAllPeriodFilter) Stop()

func (*StatusAllPeriodFilter) ValueVariables

func (this *StatusAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type StatusPagePeriodFilter

type StatusPagePeriodFilter struct {
	CounterFilter
}

状态码统计

func (*StatusPagePeriodFilter) Codes

func (this *StatusPagePeriodFilter) Codes() []string

提供的代码

func (*StatusPagePeriodFilter) Description

func (this *StatusPagePeriodFilter) Description() string

func (*StatusPagePeriodFilter) Filter

func (this *StatusPagePeriodFilter) Filter(accessLog *accesslogs.AccessLog)

筛选

func (*StatusPagePeriodFilter) Indexes

func (this *StatusPagePeriodFilter) Indexes() []string

func (*StatusPagePeriodFilter) Name

func (this *StatusPagePeriodFilter) Name() string

func (*StatusPagePeriodFilter) ParamVariables

func (this *StatusPagePeriodFilter) ParamVariables() []*Variable

参数说明

func (*StatusPagePeriodFilter) Start

func (this *StatusPagePeriodFilter) Start(queue *Queue, code string)

启动

func (*StatusPagePeriodFilter) Stop

func (this *StatusPagePeriodFilter) Stop()

停止

func (*StatusPagePeriodFilter) ValueVariables

func (this *StatusPagePeriodFilter) ValueVariables() []*Variable

统计数据说明

type TrafficAllPeriodFilter

type TrafficAllPeriodFilter struct {
	CounterFilter
}

流量统计

func (*TrafficAllPeriodFilter) Codes

func (this *TrafficAllPeriodFilter) Codes() []string

func (*TrafficAllPeriodFilter) Description

func (this *TrafficAllPeriodFilter) Description() string

func (*TrafficAllPeriodFilter) Filter

func (this *TrafficAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*TrafficAllPeriodFilter) Indexes

func (this *TrafficAllPeriodFilter) Indexes() []string

func (*TrafficAllPeriodFilter) Name

func (this *TrafficAllPeriodFilter) Name() string

func (*TrafficAllPeriodFilter) ParamVariables

func (this *TrafficAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*TrafficAllPeriodFilter) Start

func (this *TrafficAllPeriodFilter) Start(queue *Queue, code string)

func (*TrafficAllPeriodFilter) Stop

func (this *TrafficAllPeriodFilter) Stop()

func (*TrafficAllPeriodFilter) ValueVariables

func (this *TrafficAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type TrafficPagePeriodFilter

type TrafficPagePeriodFilter struct {
	CounterFilter
}

流量统计

func (*TrafficPagePeriodFilter) Codes

func (this *TrafficPagePeriodFilter) Codes() []string

func (*TrafficPagePeriodFilter) Description

func (this *TrafficPagePeriodFilter) Description() string

func (*TrafficPagePeriodFilter) Filter

func (this *TrafficPagePeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*TrafficPagePeriodFilter) Indexes

func (this *TrafficPagePeriodFilter) Indexes() []string

func (*TrafficPagePeriodFilter) Name

func (this *TrafficPagePeriodFilter) Name() string

func (*TrafficPagePeriodFilter) ParamVariables

func (this *TrafficPagePeriodFilter) ParamVariables() []*Variable

参数说明

func (*TrafficPagePeriodFilter) Start

func (this *TrafficPagePeriodFilter) Start(queue *Queue, code string)

func (*TrafficPagePeriodFilter) Stop

func (this *TrafficPagePeriodFilter) Stop()

func (*TrafficPagePeriodFilter) ValueVariables

func (this *TrafficPagePeriodFilter) ValueVariables() []*Variable

统计数据说明

type UVAllPeriodFilter

type UVAllPeriodFilter struct {
	CounterFilter
}

UV统计

func (*UVAllPeriodFilter) Codes

func (this *UVAllPeriodFilter) Codes() []string

func (*UVAllPeriodFilter) Description

func (this *UVAllPeriodFilter) Description() string

func (*UVAllPeriodFilter) Filter

func (this *UVAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*UVAllPeriodFilter) Indexes

func (this *UVAllPeriodFilter) Indexes() []string

func (*UVAllPeriodFilter) Name

func (this *UVAllPeriodFilter) Name() string

func (*UVAllPeriodFilter) ParamVariables

func (this *UVAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*UVAllPeriodFilter) Start

func (this *UVAllPeriodFilter) Start(queue *Queue, code string)

func (*UVAllPeriodFilter) Stop

func (this *UVAllPeriodFilter) Stop()

func (*UVAllPeriodFilter) ValueVariables

func (this *UVAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

type UVPagePeriodFilter

type UVPagePeriodFilter struct {
	CounterFilter
}

UV统计

func (*UVPagePeriodFilter) Codes

func (this *UVPagePeriodFilter) Codes() []string

func (*UVPagePeriodFilter) Description

func (this *UVPagePeriodFilter) Description() string

func (*UVPagePeriodFilter) Filter

func (this *UVPagePeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*UVPagePeriodFilter) Indexes

func (this *UVPagePeriodFilter) Indexes() []string

func (*UVPagePeriodFilter) Name

func (this *UVPagePeriodFilter) Name() string

func (*UVPagePeriodFilter) ParamVariables

func (this *UVPagePeriodFilter) ParamVariables() []*Variable

参数说明

func (*UVPagePeriodFilter) Start

func (this *UVPagePeriodFilter) Start(queue *Queue, code string)

func (*UVPagePeriodFilter) Stop

func (this *UVPagePeriodFilter) Stop()

func (*UVPagePeriodFilter) ValueVariables

func (this *UVPagePeriodFilter) ValueVariables() []*Variable

统计数据说明

type Variable

type Variable struct {
	Code        string `yaml:"code" json:"code"`               // 代号
	Description string `yaml:"description" json:"description"` // 描述
}

变量说明

func NewVariable

func NewVariable(code, description string) *Variable

获取新变量

type WAFBlockAllPeriodFilter

type WAFBlockAllPeriodFilter struct {
	CounterFilter
}

WAF拦截统计

func (*WAFBlockAllPeriodFilter) Codes

func (this *WAFBlockAllPeriodFilter) Codes() []string

func (*WAFBlockAllPeriodFilter) Description

func (this *WAFBlockAllPeriodFilter) Description() string

func (*WAFBlockAllPeriodFilter) Filter

func (this *WAFBlockAllPeriodFilter) Filter(accessLog *accesslogs.AccessLog)

func (*WAFBlockAllPeriodFilter) Indexes

func (this *WAFBlockAllPeriodFilter) Indexes() []string

func (*WAFBlockAllPeriodFilter) Name

func (this *WAFBlockAllPeriodFilter) Name() string

func (*WAFBlockAllPeriodFilter) ParamVariables

func (this *WAFBlockAllPeriodFilter) ParamVariables() []*Variable

参数说明

func (*WAFBlockAllPeriodFilter) Start

func (this *WAFBlockAllPeriodFilter) Start(queue *Queue, code string)

func (*WAFBlockAllPeriodFilter) Stop

func (this *WAFBlockAllPeriodFilter) Stop()

func (*WAFBlockAllPeriodFilter) ValueVariables

func (this *WAFBlockAllPeriodFilter) ValueVariables() []*Variable

统计数据说明

Jump to

Keyboard shortcuts

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