netsample

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2017 License: MPL-2.0 Imports: 12 Imported by: 0

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(context.Context) error
	Report(*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.
}

type Sample

type Sample struct {
	// contains filtered or unexported fields
}

func Acquire

func Acquire(tag string) *Sample

func (*Sample) AddTag

func (s *Sample) AddTag(tag string)

func (*Sample) Err

func (s *Sample) Err() error

func (*Sample) Id

func (s *Sample) Id() int

func (*Sample) ProtoCode

func (s *Sample) ProtoCode() int

func (*Sample) SetErr

func (s *Sample) SetErr(err error)

func (*Sample) SetId

func (s *Sample) SetId(id int)

func (*Sample) SetProtoCode

func (s *Sample) SetProtoCode(code int)

func (*Sample) String

func (s *Sample) String() string

func (*Sample) Tags

func (s *Sample) Tags() string

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) error

Jump to

Keyboard shortcuts

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