Documentation ¶
Index ¶
- Constants
- Variables
- func NewMetric(tp string) (metric.Collector, error)
- type CleanInfo
- type LogExportRunner
- type Manager
- type ManagerConfig
- type MetricRunner
- type RestService
- type Runner
- func NewCustomRunner(rc RunnerConfig, cleanChan chan<- cleaner.CleanSignal, ...) (runner Runner, err error)
- func NewRunner(rc RunnerConfig, cleanChan chan<- cleaner.CleanSignal) (runner Runner, err error)
- func NewRunnerWithService(info RunnerInfo, reader reader.Reader, cleaner *cleaner.Cleaner, ...) (runner Runner, err error)
- type RunnerConfig
- type RunnerInfo
- type RunnerLag
- type RunnerStatus
Constants ¶
View Source
const ( StatsShell = "stats" PREFIX = "/logkit" )
View Source
const (
KeyMetricType = "type"
)
Variables ¶
View Source
var DEFAULT_PORT = 4000
View Source
var DIR_NOT_EXIST_SLEEP_TIME = 300 //300 s
Functions ¶
Types ¶
type LogExportRunner ¶
type LogExportRunner struct { RunnerInfo // contains filtered or unexported fields }
func NewLogExportRunner ¶
func NewLogExportRunner(rc RunnerConfig, cleanChan chan<- cleaner.CleanSignal, ps *parser.ParserRegistry, sr *sender.SenderRegistry) (runner *LogExportRunner, err error)
func (*LogExportRunner) Cleaner ¶
func (r *LogExportRunner) Cleaner() CleanInfo
func (*LogExportRunner) LagStats ¶
func (r *LogExportRunner) LagStats() (rl RunnerLag, err error)
func (*LogExportRunner) Name ¶
func (r *LogExportRunner) Name() string
func (*LogExportRunner) Run ¶
func (r *LogExportRunner) Run()
func (*LogExportRunner) Status ¶
func (r *LogExportRunner) Status() RunnerStatus
func (*LogExportRunner) Stop ¶
func (r *LogExportRunner) Stop()
type Manager ¶
type Manager struct { ManagerConfig // contains filtered or unexported fields }
func NewCustomManager ¶
func NewCustomManager(conf ManagerConfig, pr *parser.ParserRegistry, sr *sender.SenderRegistry) (*Manager, error)
func NewManager ¶
func NewManager(conf ManagerConfig) (*Manager, error)
func (*Manager) Status ¶
func (m *Manager) Status() (rss map[string]RunnerStatus)
type ManagerConfig ¶
type MetricRunner ¶
type MetricRunner struct { RunnerName string `json:"name"` // contains filtered or unexported fields }
func NewMetricRunner ¶
func NewMetricRunner(rc RunnerConfig, sr *sender.SenderRegistry) (runner *MetricRunner, err error)
func (*MetricRunner) Cleaner ¶
func (_ *MetricRunner) Cleaner() CleanInfo
func (*MetricRunner) Name ¶
func (mr *MetricRunner) Name() string
func (*MetricRunner) Run ¶
func (r *MetricRunner) Run()
func (*MetricRunner) Status ¶
func (mr *MetricRunner) Status() RunnerStatus
func (*MetricRunner) Stop ¶
func (mr *MetricRunner) Stop()
type RestService ¶
type RestService struct {
// contains filtered or unexported fields
}
func NewRestService ¶
func NewRestService(mgr *Manager) *RestService
func (*RestService) GetStatus ¶
func (rs *RestService) GetStatus(rw http.ResponseWriter, req *http.Request)
get /logkit/status
type Runner ¶
type Runner interface { Name() string Run() Stop() Cleaner() CleanInfo Status() RunnerStatus }
func NewCustomRunner ¶
func NewCustomRunner(rc RunnerConfig, cleanChan chan<- cleaner.CleanSignal, ps *parser.ParserRegistry, sr *sender.SenderRegistry) (runner Runner, err error)
func NewRunner ¶
func NewRunner(rc RunnerConfig, cleanChan chan<- cleaner.CleanSignal) (runner Runner, err error)
NewRunner 创建Runner
type RunnerConfig ¶
type RunnerConfig struct { RunnerInfo Metric []conf.MapConf `json:"metric"` ReaderConfig conf.MapConf `json:"reader"` CleanerConfig conf.MapConf `json:"cleaner"` ParserConf conf.MapConf `json:"parser"` SenderConfig []conf.MapConf `json:"senders"` }
RunnerConfig 从多数据源读取,经过解析后,发往多个数据目的地
type RunnerInfo ¶
type RunnerInfo struct { RunnerName string `json:"name"` CollectInterval string `json:"collect_interval"` // metric runner收集的频率 MaxBatchLen int `json:"batch_len"` // 每个read batch的行数 MaxBatchSize int `json:"batch_size"` // 每个read batch的字节数 MaxBatchInteval int `json:"batch_interval"` // 最大发送时间间隔 MaxBatchTryTimes int `json:"batch_try_times"` // 最大发送次数,小于等于0代表无限重试 }
type RunnerStatus ¶
Click to show internal directories.
Click to hide internal directories.