Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Destination ¶
type Destination interface { AddRecord(Record) Close() }
Destination is an output destination where forklift will deliver it's results. It knows how to add records and "close".
type JSONRecord ¶
type JSONRecord struct { Raw string // contains filtered or unexported fields }
JSONRecord parses arbitrary JSON strings
func (JSONRecord) FormatPath ¶
func (jr JSONRecord) FormatPath(uri string) string
FormatPath formats the parent output path template into an actual location We also currently parse the JSON here if it hasn't been already
func (JSONRecord) GetBytes ¶
func (jr JSONRecord) GetBytes() []byte
GetBytes returns the bytes for the raw record
func (JSONRecord) JSONValue ¶
func (jr JSONRecord) JSONValue(key string) string
JSONValue returns the string value from the provided key
type Record ¶
Record is an individual record that will get routed to an output destination. We can get ra bytes from it and each record can format its output path.
type S3Uploader ¶
type S3Uploader struct {
// contains filtered or unexported fields
}
S3Uploader uploads arbitrary byte strings to S3
func NewS3Uploader ¶
func NewS3Uploader(u string) *S3Uploader
NewS3Uploader initializes the S3 Uploader and returns a pointer to S3Uploader in order to satisfy the interface requirements.
func (*S3Uploader) AddRecord ¶
func (s3u *S3Uploader) AddRecord(r Record)
AddRecord determines where each record should get written to And then sends a Write command
func (*S3Uploader) Close ¶
func (s3u *S3Uploader) Close()
Close waits for all data to finish uploading
type StdOutPassthrough ¶
type StdOutPassthrough struct{}
StdOutPassthrough just passes all input data through to stdout
func NewStdOutPassthrough ¶
func NewStdOutPassthrough() StdOutPassthrough
NewStdOutPassthrough initializes the S3 Uploader
func (StdOutPassthrough) AddRecord ¶
func (sop StdOutPassthrough) AddRecord(r Record)
AddRecord determines where each record should get written to And then sends a Write command