store

package
Version: v0.0.0-...-a4d0d92 Latest Latest
Warning

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

Go to latest
Published: May 6, 2014 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountResultsRequest

type CountResultsRequest struct {
	Referer  string
	Response chan CountResultsResponse
}

type CountResultsResponse

type CountResultsResponse struct {
	Count int
	Err   error
}

type ParsedQuery

type ParsedQuery struct {
	Query          int
	MeasurementId  string
	Timestamp      time.Time
	ClientIp       net.IP
	ClientLocation string
	Substrate      string
	Parameters     map[string]sql.NullString
}

type ParsedResult

type ParsedResult struct {
	Result         int
	Timestamp      time.Time
	MeasurementId  string
	Outcome        string
	Message        string
	Origin         string
	Referer        string
	ClientIp       net.IP
	ClientLocation string
	UserAgent      string
}

type Query

type Query struct {
	Id             int
	Timestamp      time.Time
	RemoteAddr     string
	RawRequest     []byte
	Task           int
	Substrate      string
	ParametersJson []byte
	ResponseBody   []byte
}

type Result

type Result struct {
	Id         int
	Timestamp  time.Time
	RemoteAddr string
	RawRequest []byte
}

type ResultsPerCountryRequest

type ResultsPerCountryRequest struct {
	Referer  string
	Response chan ResultsPerCountryResponse
}

type ResultsPerCountryResponse

type ResultsPerCountryResponse struct {
	Results map[string]int
	Err     error
}

type ResultsPerDayRequest

type ResultsPerDayRequest struct {
	Referer  string
	Response chan ResultsPerDayResponse
}

type ResultsPerDayResponse

type ResultsPerDayResponse struct {
	Results map[string]int
	Err     error
}

type Store

type Store interface {
	Close()
	ScheduleTaskFunctions()
	Tasks(<-chan *TaskRequest)
	WriteTasks(tasks <-chan *Task)
	WriteQueries(queries <-chan *Query)
	Queries() <-chan *Query
	UnparsedQueries() <-chan *Query
	WriteParsedQueries(queries <-chan *ParsedQuery)
	WriteResults(results <-chan *Result)
	Results() <-chan *Result
	UnparsedResults() <-chan *Result
	WriteParsedResults(results <-chan *ParsedResult)
	CountResultsForReferrer(requests <-chan CountResultsRequest)
	ResultsPerDayForReferrer(requests <-chan ResultsPerDayRequest)
	ResultsPerCountryForReferrer(requests <-chan ResultsPerCountryRequest)
	ComputeResultsTables() error
}

func Open

func Open() Store

type Task

type Task struct {
	Id         int
	Parameters map[string]sql.NullString
}

type TaskRequest

type TaskRequest struct {
	Hints    map[string]string
	Response chan *Task
}

Jump to

Keyboard shortcuts

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