Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNilChan error = fmt.Errorf("Source channel is nil")
ErrNilChan indicates that the FilePublisher has no source channel
var ErrNoDest error = fmt.Errorf("No destination path set")
ErrNoDest indicates that the FilePublisher has no destination path
Functions ¶
Types ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher reads Events and writes them to disk
func (*Publisher) GetResumeID ¶
GetResumeID attempts to read the ID of the last processed event from disk and returns it
func (*Publisher) ProcessEvent ¶
ProcessEvent writes a single event to a file
func (*Publisher) ReadAndPublish ¶
ReadAndPublish will read Events from the input channel and write them to file File names are sequential and relative to the destination directory If the FilePublisher's destionation directory is not set, ReadAndPublish returns ErrNoDest
Calling ReadAndPublish() will reset the processed message counter of the underlying Publisher and returns the value of the counter when the Publisher's source channel is closed
func (*Publisher) ValidateConnection ¶
ValidateConnection always returns nil and only serves to satisfy the Publisher interface
type PublisherConfig ¶
type PublisherConfig struct {
Destination string
}
PublisherConfig contains configuration for the file Publisher