Documentation ¶
Index ¶
- Constants
- type ElasticSink
- func (es *ElasticSink) Accept(articles []newsrover.Article)
- func (es *ElasticSink) Fail(article newsrover.Article)
- func (es *ElasticSink) FailAll(articles []interface{})
- func (es *ElasticSink) Name() string
- func (es *ElasticSink) Serve()
- func (es *ElasticSink) SetLogger(logger *log.Logger)
- func (es *ElasticSink) Stop()
- type ElasticSinkParams
- type File
- type Segment
- type Upload
Constants ¶
View Source
const ( MM3_SEED = 538273 ES_INDEX = "nzb" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ElasticSink ¶
type ElasticSink struct {
// contains filtered or unexported fields
}
func NewElasticSink ¶
func NewElasticSink(params ElasticSinkParams) (*ElasticSink, error)
func (*ElasticSink) Accept ¶
func (es *ElasticSink) Accept(articles []newsrover.Article)
func (*ElasticSink) Fail ¶
func (es *ElasticSink) Fail(article newsrover.Article)
func (*ElasticSink) FailAll ¶
func (es *ElasticSink) FailAll(articles []interface{})
func (*ElasticSink) Name ¶
func (es *ElasticSink) Name() string
func (*ElasticSink) Serve ¶
func (es *ElasticSink) Serve()
func (*ElasticSink) SetLogger ¶
func (es *ElasticSink) SetLogger(logger *log.Logger)
func (*ElasticSink) Stop ¶
func (es *ElasticSink) Stop()
type ElasticSinkParams ¶
type File ¶
type File struct { Id string `json:"_id"` Poster string `json:"poster"` Subject string `json:"subject"` Date time.Time `json:"date"` Group []string `json:"group"` Length int `json:"length"` Complete int `json:"complete"` Size int64 `json:"size"` Filename string `json:"filename"` Segments []*Segment `json:"segments"` ParentId string `json:"-"` }
type Segment ¶
type Segment struct { Group string `json:"group"` Subject string `json:"subject,omitempty"` Filename string `json:"filename"` Poster string `json:"poster"` Date time.Time `json:"date"` ServerArticleId int64 `json:"server_article_id"` MessageId string `json:"message_id"` Bytes int64 `json:"bytes"` Part int `json:"part"` Length int `json:"length"` Added time.Time `json:"added"` }
type Upload ¶
type Upload struct { Id string `json:"_id"` Poster string `json:"poster"` Subject string `json:"subject"` Date time.Time `json:"date"` Group []string `json:"group"` Dmca bool `json:"dmca"` Length int `json:"length"` Complete int `json:"complete"` Completion float64 `json:"completion"` Size int64 `json:"size"` Segments []*Segment `json:"segments"` Types map[string]int `json:"types"` }
Click to show internal directories.
Click to hide internal directories.