Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogLineDesc = baker.InputDesc{
	Name:   "LogLine",
	New:    NewLogLine,
	Config: &LogLineConfig{},
}

    LogLineDesc describes the LogLine input. This input is made for testing.

    View Source
    var RandomDesc = baker.InputDesc{
    	Name:   "Random",
    	New:    NewRandom,
    	Config: &RandomConfig{},
    }

      RandomDesc describes the Random input.

      View Source
      var RecordsDesc = baker.InputDesc{
      	Name:   "Records",
      	New:    NewRecords,
      	Config: &RecordsConfig{},
      }

        RecordsDesc describes the Records input. This input is made for testing.

        Functions

        func NewLogLine

        func NewLogLine(cfg baker.InputParams) (baker.Input, error)

          NewLogLine creates a LogLine baker input.

          func NewRandom

          func NewRandom(cfg baker.InputParams) (baker.Input, error)

            NewRandom creates a Random baker input.

            func NewRecords

            func NewRecords(cfg baker.InputParams) (baker.Input, error)

              NewRecords creates a Records baker input.

              Types

              type Base

              type Base struct{}

                Base is a nop implementation of baker.Input useful to be embedded in tests and to redeclare one or more methods.

                func (Base) FreeMem

                func (Base) FreeMem(*baker.Data)

                func (Base) Run

                func (Base) Run(_ chan<- *baker.Data) error

                func (Base) Stats

                func (Base) Stats() baker.InputStats

                func (Base) Stop

                func (Base) Stop()

                type LogLine

                type LogLine struct {
                	LogLineConfig
                }

                  A LogLine input is a Baker input used for testing.

                  func (*LogLine) FreeMem

                  func (in *LogLine) FreeMem(data *baker.Data)

                  func (*LogLine) Run

                  func (in *LogLine) Run(output chan<- *baker.Data) error

                  func (*LogLine) Stats

                  func (in *LogLine) Stats() (stats baker.InputStats)

                  func (*LogLine) Stop

                  func (in *LogLine) Stop()

                  type LogLineConfig

                  type LogLineConfig struct {
                  	Lines    []*baker.LogLine // Lines to pipe into the filter chain.
                  	Metadata baker.Metadata   // Metadata to assign to every log line.
                  }

                    LogLineConfig holds the log lines to be fed to the Baker topology.

                    type Random

                    type Random struct {
                    	Cfg *RandomConfig
                    }

                      A Random input is baker input used for testing. It generates a specified number of random, but valid, records.

                      func (*Random) FreeMem

                      func (r *Random) FreeMem(data *baker.Data)

                      func (*Random) Run

                      func (r *Random) Run(output chan<- *baker.Data) error

                      func (*Random) Stats

                      func (r *Random) Stats() (stats baker.InputStats)

                      func (*Random) Stop

                      func (r *Random) Stop()

                      type RandomConfig

                      type RandomConfig struct {
                      	Records  int
                      	RandSeed int64
                      }

                        RandomConfig specifies the number of random records to generate as well as the seed for the PRNG.

                        type Records

                        type Records struct {
                        	RecordsConfig
                        }

                          A Records input is a Baker input used for testing.

                          func (Records) FreeMem

                          func (Records) FreeMem(data *baker.Data)

                          func (*Records) Run

                          func (in *Records) Run(output chan<- *baker.Data) error

                          func (Records) Stats

                          func (Records) Stats() (stats baker.InputStats)

                          func (Records) Stop

                          func (Records) Stop()

                          type RecordsConfig

                          type RecordsConfig struct {
                          	Records []baker.Record
                          }

                            RecordsConfig holds the log lines to be fed to the Baker topology.