Documentation ¶
Index ¶
- Constants
- func BuildExtractors() factable.ExtractFns
- func BuildSchemaSpec() factable.SchemaSpec
- func Mapping(_ message.Mappable) (journal pb.Journal, contentType string, e error)
- func PublishQuotes(begin, end int, relPath string, ajc client.AsyncJournalClient) (err error)
- func StartApplication(tc TestCase, app runconsumer.Application) *consumertest.Consumer
- type Quote
- type Specs
- type TestCase
Constants ¶
View Source
const ( MapQuoteWords = "MapQuoteWords" DimQuoteAuthor = "DimQuoteAuthor" DimQuoteCount = "DimQuoteCount" DimQuoteID = "DimQuoteID" DimQuoteTime = "DimQuoteTime" DimQuoteWord = "DimQuoteWord" DimQuoteWordCount = "DimQuoteWordCount" DimQuoteWordTotalCount = "DimQuoteWordTotalCount" MetricLastQuoteID = "MetricLastQuoteID" MetricSumQuoteCount = "MetricSumQuoteCount" MetricSumWordQuoteCount = "MetricSumWordQuoteCount" MetricSumWordTotalCount = "MetricSumWordTotalCount" MetricUniqueWords = "MetricUniqueWords" RelQuoteWords = "RelQuoteWords" MVWordStats = "MVWordStats" MVQuoteStats = "MVQuoteStats" MVRecentQuotes = "MVRecentQuotes" MapQuoteWordsTag factable.MapTag = iota DimQuoteAuthorTag factable.DimTag = iota DimQuoteCountTag factable.DimTag = iota DimQuoteIDTag factable.DimTag = iota DimQuoteTimeTag factable.DimTag = iota DimQuoteWordCountTag factable.DimTag = iota DimQuoteWordTag factable.DimTag = iota DimQuoteWordTotalCountTag factable.DimTag = iota MVWordStatsTag factable.MVTag = iota MVQuoteStatsTag factable.MVTag = iota MVRecentQuotesTag factable.MVTag = iota )
View Source
const ( InputJournal pb.Journal = "examples/factable/quotes/input" SchemaSpecKey = "/path/to/schema/key" )
Variables ¶
This section is empty.
Functions ¶
func BuildExtractors ¶
func BuildExtractors() factable.ExtractFns
func BuildSchemaSpec ¶
func BuildSchemaSpec() factable.SchemaSpec
func PublishQuotes ¶
func PublishQuotes(begin, end int, relPath string, ajc client.AsyncJournalClient) (err error)
PublishQuotes publishes quotes [begin, end) of the corpus. |relPath| is the relative path of the package invoking PublishQuotes with respect to the repository `pkg` directory.
func StartApplication ¶
func StartApplication(tc TestCase, app runconsumer.Application) *consumertest.Consumer
StartApplication configures and initializes a Extractor or VTable Application.
Types ¶
type Quote ¶
type Quote struct { ID int64 // Unique ID of the Quote. Author string // Language of the Quote. Text string // Text of the Document. Time time.Time // Timestamp of the Quote. }
func (Quote) GetUUID ¶
Keep it simple. Do not opt into exactly-once semantics. Do this at a later time.
func (Quote) NewAcknowledgement ¶
TODO is this correct? (If it is, why have such a trivial method in the first place?)
type Specs ¶
type Specs struct { Journals []*broker.JournalSpec ExtractorShards []*consumer.ShardSpec VTableShards []*consumer.ShardSpec }
Specs bundles JournalSpecs and ShardSpecs for extractor and vtable consumers operating against the `quotes` package.
Click to show internal directories.
Click to hide internal directories.