Documentation ¶
Index ¶
- type BinaryKV
- type BinarySync2KafkaClient
- func (c *BinarySync2KafkaClient) Close() error
- func (c *BinarySync2KafkaClient) Connect(ctx context.Context) (err error)
- func (c *BinarySync2KafkaClient) EndTransfer() (err error)
- func (c *BinarySync2KafkaClient) SendValue(kv BinaryKV) (err error)
- func (c *BinarySync2KafkaClient) StartTransfer() (err error)
- type JsonKV
- type JsonSync2KafkaClient
- type SyncInitInfo
- type SyncResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinarySync2KafkaClient ¶
type BinarySync2KafkaClient struct {
// contains filtered or unexported fields
}
BinarySync2KafkaClient communicates with sync2kafka with binary encoded messages
func NewBinary ¶
func NewBinary(config *SyncInitInfo, target string, insecureSkipVerify, useTls bool, caCert string) (client *BinarySync2KafkaClient)
NewBinary creates a new binary client for sync2kafaka server (uses []byte key value messages for input)
func (*BinarySync2KafkaClient) Close ¶
func (c *BinarySync2KafkaClient) Close() error
func (*BinarySync2KafkaClient) Connect ¶
Connect connects this sync2kafka client to a sync2kafka server.
func (*BinarySync2KafkaClient) EndTransfer ¶
func (c *BinarySync2KafkaClient) EndTransfer() (err error)
EndTransfer ends a data transfer session
func (*BinarySync2KafkaClient) SendValue ¶
func (c *BinarySync2KafkaClient) SendValue(kv BinaryKV) (err error)
SendValue send one value in a Transfer session (after calling StartTransfer() and before calling EndTransfer()
func (*BinarySync2KafkaClient) StartTransfer ¶
func (c *BinarySync2KafkaClient) StartTransfer() (err error)
StartTransfer starts a data transfert session. Endtransfer() must be called after transferring all data
type JsonKV ¶
type JsonKV struct { Key *json.RawMessage `json:"k"` Value *json.RawMessage `json:"v"` EndOfTransfer bool `json:"EOT"` }
type JsonSync2KafkaClient ¶
type JsonSync2KafkaClient struct {
// contains filtered or unexported fields
}
func NewJson ¶
func NewJson(config *SyncInitInfo, target string, insecureSkipVerify, useTls bool, caCert string) (client *JsonSync2KafkaClient)
NewJson creates a new json client for sync2kafaka server (uses precomputed json key value messages for input)
func (*JsonSync2KafkaClient) Close ¶
func (c *JsonSync2KafkaClient) Close() error
func (*JsonSync2KafkaClient) Connect ¶
Connect connects this sync2kafka client to a sync2kafka server.
func (*JsonSync2KafkaClient) EndTransfer ¶
func (c *JsonSync2KafkaClient) EndTransfer() (err error)
EndTransfer ends a data transfer session
func (*JsonSync2KafkaClient) StartTransfer ¶
func (c *JsonSync2KafkaClient) StartTransfer() (err error)
StartTransfer starts a data transfert session. Endtransfer() must be called after transferring all data
type SyncInitInfo ¶
type SyncInitInfo struct { // Format of data. Can be `json` or `binary`. Format string `json:"format"` // DoDelete makes the sync delete unseen keys. No deletions if false (the default case). DoDelete bool `json:"doDelete"` // Token for authn Token string `json:"token"` // Topic target topic if not default Topic string `json:"topic"` }
type SyncResult ¶
type SyncResult struct {
OK bool `json:"ok"`
}