Documentation
¶
Overview ¶
define the interface and the structures for pipe-filter style implemention
Index ¶
- Constants
- Variables
- func GetFibonacciSerie(n int) []int
- type Agent
- type BasicInfo
- type BasicInfoList
- type Collector
- type CollectorsError
- type EmployeeJSON
- type Event
- type EventReceiver
- type Filter
- type JobInfo
- type Request
- type Response
- type SplitFilter
- type StraightPipeline
- type SumFilter
- type ToIntFilter
Constants ¶
const ( Waiting = iota Running )
Variables ¶
var ErrorSumFilterWrongFormat = errors.New("input data should be []int")
var ErrorToIntFilterWrongFormat = errors.New("ipnut data should be []string")
var ErrorWrongState = errors.New("can not take the operation in the current state")
var SplitFilterWrongFormatError = errors.New("input data should be string")
Functions ¶
func GetFibonacciSerie ¶
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func (*Agent) EventProcessGroutine ¶
func (agt *Agent) EventProcessGroutine()
func (*Agent) RegisterCollector ¶
type BasicInfo ¶
func (BasicInfo) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (BasicInfo) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*BasicInfo) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*BasicInfo) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type BasicInfoList ¶
type BasicInfoList []BasicInfo
easyjson:json
func (BasicInfoList) MarshalEasyJSON ¶
func (v BasicInfoList) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (BasicInfoList) MarshalJSON ¶
func (v BasicInfoList) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*BasicInfoList) UnmarshalEasyJSON ¶
func (v *BasicInfoList) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*BasicInfoList) UnmarshalJSON ¶
func (v *BasicInfoList) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type CollectorsError ¶
type CollectorsError struct {
CollectorErrors []error
}
func (CollectorsError) Error ¶
func (ce CollectorsError) Error() string
type EmployeeJSON ¶
type EmployeeJSON struct { BasicInfo BasicInfo `json:"basic_info"` JobInfo JobInfo `json:"job_info"` }
func (EmployeeJSON) MarshalEasyJSON ¶
func (v EmployeeJSON) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EmployeeJSON) MarshalJSON ¶
func (v EmployeeJSON) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EmployeeJSON) UnmarshalEasyJSON ¶
func (v *EmployeeJSON) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EmployeeJSON) UnmarshalJSON ¶
func (v *EmployeeJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventReceiver ¶
type EventReceiver interface {
OnEvent(evt Event)
}
type Filter ¶
Filter interface is the definition of the data processing components Pipe-Filter structure
type JobInfo ¶
type JobInfo struct {
Skills []string `json:"skills"`
}
func (JobInfo) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (JobInfo) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*JobInfo) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*JobInfo) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type SplitFilter ¶
type SplitFilter struct {
// contains filtered or unexported fields
}
func NewSplitFilter ¶
func NewSplitFilter(delimiter string) *SplitFilter
type StraightPipeline ¶
func NewStraightPipeline ¶
func NewStraightPipeline(name string, filters ...Filter) *StraightPipeline
type ToIntFilter ¶
type ToIntFilter struct { }
func NewToIntFilter ¶
func NewToIntFilter() *ToIntFilter