Documentation
¶
Index ¶
Constants ¶
View Source
const (
ProtoCodeError = 999
)
Variables ¶
This section is empty.
Functions ¶
func WrapAggregator ¶
func WrapAggregator(a Aggregator) core.Aggregator
Types ¶
type Aggregator ¶
type Aggregator interface {
Run(ctx context.Context, deps core.AggregatorDeps) error
Report(sample *Sample)
}
func NewPhout ¶
func NewPhout(fs afero.Fs, conf PhoutConfig) (a Aggregator, err error)
func UnwrapAggregator ¶
func UnwrapAggregator(a core.Aggregator) Aggregator
type PhoutConfig ¶
type PhoutConfig struct {
Destination string // Destination file name
Id bool // Print ammo ids if true.
FlushTime time.Duration `config:"flush-time"`
SampleQueueSize int `config:"sample-queue-size"`
Buffer coreutil.BufferSizeConfig `config:",squash"`
}
func DefaultPhoutConfig ¶
func DefaultPhoutConfig() PhoutConfig
type Sample ¶
type Sample struct {
// contains filtered or unexported fields
}
func (*Sample) SetProtoCode ¶
type TestAggregator ¶
type TestAggregator struct {
Samples []*Sample
}
func (*TestAggregator) Report ¶
func (t *TestAggregator) Report(s *Sample)
func (*TestAggregator) Run ¶
func (t *TestAggregator) Run(ctx context.Context, _ core.AggregatorDeps) error
Click to show internal directories.
Click to hide internal directories.