This library provides an interface to the KCL MultiLangDaemon, which is part of the Amazon Kinesis Client Library. This interface manages the interaction with the MultiLangDaemon so that developers can focus on implementing their record processor executable. A record processor executable typically looks something like:
package main
import(
"github.com/marcy-go/kcl"
)
type Sample struct {}
func (s *Sample) Init(str string) error {
return nil
}
func (s *Sample) ProcessRecords(rs []*kcl.Record, cp *kcl.CheckPointer) error {
return nil
}
func (s *Sample) Shutdown(cp *kcl.CheckPointer, reason string) error {
return nil
}
func main() {
var rp kcl.RecordProcessor
rp = &Sample{}
p := kcl.NewProcess(rp)
p.Run()
}
Note, the initial implementation of this library is largely based on the reference Amazon Kinesis Client Library for Python provided by Amazon.
If your want to run a sample implementation, you get the sample binary from here:
https://drone.io/github.com/marcy-go/kclsample/files
executableName = /path/to/kclsample
streamName = kclsample
applicationName = GoKCLSample
AWSCredentialsProvider = DefaultAWSCredentialsProviderChain
processingLanguage = go/1.3.1
initialPositionInStream = TRIM_HORIZON
regionName = ap-northeast-1
https://drone.io/github.com/marcy-go/kclhelper/files
# Get Jar files from Maven projects
kclhelper setup
# Run KCL
kclhelper run -p <path-to-properties> [-j <path-to-java>]
See CHANGELOG
- Fork it ( https://github.com/marcy-go/kcl/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request