Documentation ¶
Overview ¶
Package files is generated by Handlergenerator tooling Make sure to insert real Description here
Package files is generated by Handlergenerator tooling Make sure to insert real Description here
Package files is generated by Handlergenerator tooling This Handler is used to print Payloads onto a file
Index ¶
- Variables
- func NewListDirectoryHandler() handlers.Handler
- func NewReadFileHandler() handlers.Handler
- func NewWriteFileHandler() handlers.Handler
- type ListDirectory
- func (a *ListDirectory) GetConfiguration() *property.Configuration
- func (a *ListDirectory) GetErrorChannel() chan error
- func (a *ListDirectory) GetHandlerName() string
- func (a *ListDirectory) Handle(ctx context.Context, p payload.Payload, topics ...string) error
- func (a *ListDirectory) ListDirectory() ([]payload.Payload, error)
- func (a *ListDirectory) SetMetricProvider(p metric.Provider, prefix string) error
- func (a *ListDirectory) Subscriptionless() bool
- func (a *ListDirectory) ValidateConfiguration() (bool, []string)
- type ReadFile
- func (a *ReadFile) GetConfiguration() *property.Configuration
- func (a *ReadFile) GetErrorChannel() chan error
- func (a *ReadFile) GetHandlerName() string
- func (a *ReadFile) Handle(ctx context.Context, input payload.Payload, topics ...string) error
- func (a *ReadFile) SetMetricProvider(p metric.Provider, prefix string) error
- func (a *ReadFile) Subscriptionless() bool
- func (a *ReadFile) ValidateConfiguration() (bool, []string)
- type WriteFile
- func (a *WriteFile) GetConfiguration() *property.Configuration
- func (a *WriteFile) GetErrorChannel() chan error
- func (a *WriteFile) GetHandlerName() string
- func (a *WriteFile) Handle(ctx context.Context, input payload.Payload, topics ...string) error
- func (a *WriteFile) SetMetricProvider(p metric.Provider, prefix string) error
- func (a *WriteFile) Subscriptionless() bool
- func (a *WriteFile) ValidateConfiguration() (bool, []string)
Constants ¶
This section is empty.
Variables ¶
var ( //ErrBadWriteData is thrown when the size written to file is not the same as the payload ErrBadWriteData error = errors.New("the size written to file does not match the payload") //ErrFileExists is when trying to write to Files that already exist, but Append is set to false ErrFileExists = errors.New("trying to write to file that already exists, but append is false") )
var ( // DefaultBufferTime is how long in seconds a file should be fulfillremembered DefaultBufferTime int64 = 3600 )
Functions ¶
func NewListDirectoryHandler ¶
NewListDirectoryHandler generates a new ListDirectory Handler
func NewReadFileHandler ¶
NewReadFileHandler generates a new ReadFile Handler
func NewWriteFileHandler ¶
NewWriteFileHandler generates a new WriteFile Handler
Types ¶
type ListDirectory ¶
type ListDirectory struct { // Cfg is values needed to properly run the Handle func Cfg *property.Configuration `json:"configs" yaml:"configs"` Name string `json:"handler" yaml:"handler_name"` sync.Mutex `json:"-" yaml:"-"` // MetricPayloadOut is how many payloads the processor has outputted MetricPayloadOut string // MetricPayloadIn is how many payloads the processor has inputted MetricPayloadIn string // contains filtered or unexported fields }
ListDirectory is used to list all FILES in a given path
func (*ListDirectory) GetConfiguration ¶
func (a *ListDirectory) GetConfiguration() *property.Configuration
GetConfiguration will return the CFG for the Handler
func (*ListDirectory) GetErrorChannel ¶
func (a *ListDirectory) GetErrorChannel() chan error
GetErrorChannel will return a channel that the Handler can output eventual errors onto
func (*ListDirectory) GetHandlerName ¶
func (a *ListDirectory) GetHandlerName() string
GetHandlerName is used to retrun a unqiue string name
func (*ListDirectory) ListDirectory ¶
func (a *ListDirectory) ListDirectory() ([]payload.Payload, error)
ListDirectory will do all the main work, list directory or return error
func (*ListDirectory) SetMetricProvider ¶
func (a *ListDirectory) SetMetricProvider(p metric.Provider, prefix string) error
SetMetricProvider is used to change what metrics provider is used by the handler
func (*ListDirectory) Subscriptionless ¶
func (a *ListDirectory) Subscriptionless() bool
Subscriptionless is used to send out true
func (*ListDirectory) ValidateConfiguration ¶
func (a *ListDirectory) ValidateConfiguration() (bool, []string)
ValidateConfiguration is used to see that all needed configurations are assigned before starting
type ReadFile ¶
type ReadFile struct { // Cfg is values needed to properly run the Handle func Cfg *property.Configuration `json:"configs" yaml:"configs"` Name string `json:"handler" yaml:"handler_name"` // MetricPayloadOut is how many payloads the processor has outputted MetricPayloadOut string // MetricPayloadIn is how many payloads the processor has inputted MetricPayloadIn string // contains filtered or unexported fields }
ReadFile is used to ReadFiles data
func (*ReadFile) GetConfiguration ¶
func (a *ReadFile) GetConfiguration() *property.Configuration
GetConfiguration will return the CFG for the Handler
func (*ReadFile) GetErrorChannel ¶
GetErrorChannel will return a channel that the Handler can output eventual errors onto
func (*ReadFile) GetHandlerName ¶
GetHandlerName is used to retrun a unqiue string name
func (*ReadFile) Handle ¶
Handle is used to Read the content of a file from the former payload Expects a filepath in the input payload
func (*ReadFile) SetMetricProvider ¶
SetMetricProvider is used to change what metrics provider is used by the handler
func (*ReadFile) Subscriptionless ¶
Subscriptionless will return true/false if the Handler is genereating payloads itself
func (*ReadFile) ValidateConfiguration ¶
ValidateConfiguration is used to see that all needed configurations are assigned before starting
type WriteFile ¶
type WriteFile struct { // Cfg is values needed to properly run the Handle func Cfg *property.Configuration `json:"configs" yaml:"configs"` Name string `json:"name" yaml:"handler_name"` // MetricPayloadOut is how many payloads the processor has outputted MetricPayloadOut string // MetricPayloadIn is how many payloads the processor has inputted MetricPayloadIn string // contains filtered or unexported fields }
WriteFile is used to will print the stringified version of GetPayload into a file
func (*WriteFile) GetConfiguration ¶
func (a *WriteFile) GetConfiguration() *property.Configuration
GetConfiguration will return the CFG for the Handler
func (*WriteFile) GetErrorChannel ¶
GetErrorChannel will return a channel that the Handler can output eventual errors onto
func (*WriteFile) GetHandlerName ¶
GetHandlerName is used to retrun a unqiue string name
func (*WriteFile) SetMetricProvider ¶
SetMetricProvider is used to change what metrics provider is used by the handler
func (*WriteFile) Subscriptionless ¶
Subscriptionless will return true/false if the Handler is genereating payloads itself
func (*WriteFile) ValidateConfiguration ¶
ValidateConfiguration is used to see that all needed configurations are assigned before starting