pusher

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractNameVersion

func ExtractNameVersion(record *corev1.Record) (string, error)

extractNameVersion extracts "name@version" from a record.

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:

  1. Return per-record error responses instead of terminating the stream
  2. Allow the stream to continue processing remaining records after individual failures
  3. 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL