Documentation
¶
Overview ¶
Package migrate wires the manifest, source, target, and reconcile engine together for `kcp migration resources create`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSourceAdmin ¶
func BuildSourceAdmin(conn types.KafkaSourceConn) (client.KafkaAdmin, error)
BuildSourceAdmin opens a Kafka admin connection to the source cluster for a one-off read (e.g. native ACL listing via acls.ReadNativeACLs) that lives outside the KafkaSourceReader lifecycle. The caller owns Close().
Types ¶
type KafkaSourceReader ¶
type KafkaSourceReader struct {
// contains filtered or unexported fields
}
KafkaSourceReader reads a migration source via the Kafka admin protocol. The source may be Apache Kafka, MSK, or Confluent — auth is in the connection.
func NewKafkaSourceReader ¶
func NewKafkaSourceReader(conn types.KafkaSourceConn) *KafkaSourceReader
func (*KafkaSourceReader) ClusterID ¶
func (r *KafkaSourceReader) ClusterID(ctx context.Context) (string, error)
ClusterID returns the live source cluster id, opening an admin connection on the first call and memoizing the result for subsequent calls. Only a successful read is cached, so a failed probe still retries on the next call.
func (*KafkaSourceReader) DescribeTopics ¶
func (r *KafkaSourceReader) DescribeTopics(ctx context.Context, names []string) ([]TopicSpec, error)
DescribeTopics opens an admin connection and returns the recreate-relevant shape of the requested topics, with only explicitly-set (non-default) configs. Topics in names that are absent from the source are silently skipped. Results are sorted by name.
func (*KafkaSourceReader) ListTopics ¶
func (r *KafkaSourceReader) ListTopics(ctx context.Context) ([]string, error)
ListTopics opens an admin connection and returns the source topic names, sorted.
type Source ¶
type Source interface {
ClusterID(ctx context.Context) (string, error)
ListTopics(ctx context.Context) ([]string, error)
DescribeTopics(ctx context.Context, names []string) ([]TopicSpec, error)
}
Source is the live read of the migration source. The cluster id supports the desired-state read (§8.2); ListTopics/DescribeTopics support topic mirroring and recreation. Bootstrap servers and auth come from the parsed credentials, not a live read.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package acls implements the source-read stage of the native-ACL migration plane: flattening sarama's ACL listing into the canonical types.Acls tuple and reading the MSK "allow.everyone.if.no.acl.found" server property.
|
Package acls implements the source-read stage of the native-ACL migration plane: flattening sarama's ACL listing into the canonical types.Acls tuple and reading the MSK "allow.everyone.if.no.acl.found" server property. |
|
Package clusterlink implements the cluster-link Reconciler: it reconciles the desired link (derived from the live source + manifest) against the actual link on the target, additively (§8.2, §8.6).
|
Package clusterlink implements the cluster-link Reconciler: it reconciles the desired link (derived from the live source + manifest) against the actual link on the target, additively (§8.2, §8.6). |
|
Package mirrortopics reconciles spec.topics (mode: mirror): it creates a mirror topic on the cluster link for each selected source topic that is not already mirrored.
|
Package mirrortopics reconciles spec.topics (mode: mirror): it creates a mirror topic on the cluster link for each selected source topic that is not already mirrored. |
|
Package newtopics reconciles spec.topics (mode: new): it creates a plain topic on the target for each selected source topic, reproducing partition count, RF, and all explicitly-set (non-default) configs.
|
Package newtopics reconciles spec.topics (mode: new): it creates a plain topic on the target for each selected source topic, reproducing partition count, RF, and all explicitly-set (non-default) configs. |
|
Package serviceaccounts derives Confluent Cloud service-account display names from source Kafka principals.
|
Package serviceaccounts derives Confluent Cloud service-account display names from source Kafka principals. |
|
Package topicselect resolves a desired topic set from a live source topic list using glob include/exclude patterns.
|
Package topicselect resolves a desired topic set from a live source topic list using glob include/exclude patterns. |