Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientPusher ¶
type ClientPusher struct {
// contains filtered or unexported fields
}
ClientPusher is a Pusher implementation that uses the DIR client.
func NewClientPusher ¶
func NewClientPusher(client config.ClientInterface, debug bool, signFunc config.SignFunc) *ClientPusher
NewClientPusher creates a new ClientPusher.
func (*ClientPusher) Push ¶
func (p *ClientPusher) Push(ctx context.Context, inputCh <-chan *corev1.Record) (<-chan *corev1.RecordRef, <-chan error)
Push sends records to DIR using the client.
IMPLEMENTATION NOTE: This implementation pushes records sequentially (one-by-one) instead of using batch/streaming push. This is a temporary workaround because the current gRPC streaming implementation terminates the entire stream when a single record fails validation, preventing subsequent records from being processed.
TODO: Switch back to streaming/batch push (PushStream) once the server-side implementation is updated to:
- Return per-record error responses instead of terminating the stream
- Allow the stream to continue processing remaining records after individual failures
- This will require updating the proto to support a response type that can carry either a RecordRef (success) or an error message (failure)
The sequential approach ensures all records are attempted, even if some fail, at the cost of reduced throughput and increased latency.