Documentation
¶
Index ¶
- func OffsetSyncsTopicLocationTypeChoices() []string
- func ReplicationPolicyClassTypeChoices() []string
- type Handler
- type KafkaMirrorMakerHandler
- func (h *KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerCreateReplicationFlow(ctx context.Context, project string, serviceName string, ...) error
- func (h *KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerDeleteReplicationFlow(ctx context.Context, project string, serviceName string, sourceCluster string, ...) error
- func (h *KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerGetReplicationFlow(ctx context.Context, project string, serviceName string, sourceCluster string, ...) (*ServiceKafkaMirrorMakerGetReplicationFlowOut, error)
- func (h *KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerGetReplicationFlows(ctx context.Context, project string, serviceName string) ([]ReplicationFlowOut, error)
- func (h *KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerPatchReplicationFlow(ctx context.Context, project string, serviceName string, sourceCluster string, ...) (*ServiceKafkaMirrorMakerPatchReplicationFlowOut, error)
- type OffsetSyncsTopicLocationType
- type ReplicationFlowOut
- type ReplicationPolicyClassType
- type ServiceKafkaMirrorMakerCreateReplicationFlowIn
- type ServiceKafkaMirrorMakerGetReplicationFlowOut
- type ServiceKafkaMirrorMakerPatchReplicationFlowIn
- type ServiceKafkaMirrorMakerPatchReplicationFlowOut
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OffsetSyncsTopicLocationTypeChoices ¶
func OffsetSyncsTopicLocationTypeChoices() []string
func ReplicationPolicyClassTypeChoices ¶
func ReplicationPolicyClassTypeChoices() []string
Types ¶
type Handler ¶
type Handler interface {
// ServiceKafkaMirrorMakerCreateReplicationFlow create a replication flow
// POST /v1/project/{project}/service/{service_name}/mirrormaker/replication-flows
// https://api.aiven.io/doc/#tag/Service:_Kafka_MirrorMaker/operation/ServiceKafkaMirrorMakerCreateReplicationFlow
ServiceKafkaMirrorMakerCreateReplicationFlow(ctx context.Context, project string, serviceName string, in *ServiceKafkaMirrorMakerCreateReplicationFlowIn) error
// ServiceKafkaMirrorMakerDeleteReplicationFlow delete a replication flow
// DELETE /v1/project/{project}/service/{service_name}/mirrormaker/replication-flows/{source_cluster}/{target_cluster}
// https://api.aiven.io/doc/#tag/Service:_Kafka_MirrorMaker/operation/ServiceKafkaMirrorMakerDeleteReplicationFlow
ServiceKafkaMirrorMakerDeleteReplicationFlow(ctx context.Context, project string, serviceName string, sourceCluster string, targetCluster string) error
// ServiceKafkaMirrorMakerGetReplicationFlow get a replication flow
// GET /v1/project/{project}/service/{service_name}/mirrormaker/replication-flows/{source_cluster}/{target_cluster}
// https://api.aiven.io/doc/#tag/Service:_Kafka_MirrorMaker/operation/ServiceKafkaMirrorMakerGetReplicationFlow
ServiceKafkaMirrorMakerGetReplicationFlow(ctx context.Context, project string, serviceName string, sourceCluster string, targetCluster string) (*ServiceKafkaMirrorMakerGetReplicationFlowOut, error)
// ServiceKafkaMirrorMakerGetReplicationFlows get replication flows
// GET /v1/project/{project}/service/{service_name}/mirrormaker/replication-flows
// https://api.aiven.io/doc/#tag/Service:_Kafka_MirrorMaker/operation/ServiceKafkaMirrorMakerGetReplicationFlows
ServiceKafkaMirrorMakerGetReplicationFlows(ctx context.Context, project string, serviceName string) ([]ReplicationFlowOut, error)
// ServiceKafkaMirrorMakerPatchReplicationFlow update a replication flow
// PUT /v1/project/{project}/service/{service_name}/mirrormaker/replication-flows/{source_cluster}/{target_cluster}
// https://api.aiven.io/doc/#tag/Service:_Kafka_MirrorMaker/operation/ServiceKafkaMirrorMakerPatchReplicationFlow
ServiceKafkaMirrorMakerPatchReplicationFlow(ctx context.Context, project string, serviceName string, sourceCluster string, targetCluster string, in *ServiceKafkaMirrorMakerPatchReplicationFlowIn) (*ServiceKafkaMirrorMakerPatchReplicationFlowOut, error)
}
type KafkaMirrorMakerHandler ¶
type KafkaMirrorMakerHandler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(doer doer) KafkaMirrorMakerHandler
func (*KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerCreateReplicationFlow ¶
func (h *KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerCreateReplicationFlow(ctx context.Context, project string, serviceName string, in *ServiceKafkaMirrorMakerCreateReplicationFlowIn) error
func (*KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerDeleteReplicationFlow ¶
func (*KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerGetReplicationFlow ¶
func (h *KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerGetReplicationFlow(ctx context.Context, project string, serviceName string, sourceCluster string, targetCluster string) (*ServiceKafkaMirrorMakerGetReplicationFlowOut, error)
func (*KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerGetReplicationFlows ¶
func (h *KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerGetReplicationFlows(ctx context.Context, project string, serviceName string) ([]ReplicationFlowOut, error)
func (*KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerPatchReplicationFlow ¶
func (h *KafkaMirrorMakerHandler) ServiceKafkaMirrorMakerPatchReplicationFlow(ctx context.Context, project string, serviceName string, sourceCluster string, targetCluster string, in *ServiceKafkaMirrorMakerPatchReplicationFlowIn) (*ServiceKafkaMirrorMakerPatchReplicationFlowOut, error)
type OffsetSyncsTopicLocationType ¶
type OffsetSyncsTopicLocationType string
const ( OffsetSyncsTopicLocationTypeSource OffsetSyncsTopicLocationType = "source" OffsetSyncsTopicLocationTypeTarget OffsetSyncsTopicLocationType = "target" )
type ReplicationFlowOut ¶
type ReplicationFlowOut struct {
ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` // A comma separated list of topic configuration properties and/or regexes that should not be replicated. If omitted, MirrorMaker will use default list of exclusions. For stability reasons, we always include the unclean.leader.election.enable field in the excluded parameters. If you have specific requirements for this configuration, please reach out to our support team for assistance.
EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` // Whether to emit heartbeats to the direction opposite to the flow, i.e. to the source cluster
EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` // Whether to emit heartbeats to the target cluster
Enabled bool `json:"enabled"` // Is replication flow enabled
ExactlyOnceDeliveryEnabled *bool `json:"exactly_once_delivery_enabled,omitempty"` // Whether to enable exactly-once message delivery. We recommend you set this to enabled for new replications.
OffsetLagMax *int `json:"offset_lag_max,omitempty"` // How out-of-sync a remote partition can be before it is resynced (default: 100)
OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` // The location of the offset-syncs topic
ReplicationFactor *int `json:"replication_factor,omitempty"` // Replication factor used when creating the remote topics. If the replication factor surpasses the number of nodes in the target cluster, topic creation will fail.
ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` // Class which defines the remote topic naming convention
ReplicationProgress *float64 `json:"replication_progress,omitempty"` // The overall progress of replication across topics
SourceCluster string `json:"source_cluster"` // The alias of the source cluster to use in this replication flow. Can contain the following symbols: ASCII alphanumerics, '.', '_', and '-'.
SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` // Whether to periodically write the translated offsets of replicated consumer groups (in the source cluster) to __consumer_offsets topic in target cluster, as long as no active consumers in that group are connected to the target cluster
SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` // Frequency at which consumer group offsets are synced (default: 60, every minute)
TargetCluster string `json:"target_cluster"` // The alias of the target cluster to use in this replication flow. Can contain the following symbols: ASCII alphanumerics, '.', '_', and '-'.
Topics []string `json:"topics,omitempty"` // Topic names and regular expressions that match topic names that should be replicated. MirrorMaker will replicate these topics if they are not matched by "topics.exclude". Currently defaults to [".*"].
TopicsBlacklist []string `json:"topics.blacklist,omitempty"` // Topic names and regular expressions that match topic names that should not be replicated. MirrorMaker will not replicate these topics even if they are matched by "topics". If not set, MM2 uses the default exclusion.
TopicsExclude []string `json:"topics_exclude,omitempty"` // Topic names and regular expressions that match topic names that should not be replicated. MirrorMaker will not replicate these topics even if they are matched by "topics". If not set, MM2 uses the default exclusion.
}
type ReplicationPolicyClassType ¶
type ReplicationPolicyClassType string
const ( ReplicationPolicyClassTypeDefault ReplicationPolicyClassType = "org.apache.kafka.connect.mirror.DefaultReplicationPolicy" ReplicationPolicyClassTypeIdentity ReplicationPolicyClassType = "org.apache.kafka.connect.mirror.IdentityReplicationPolicy" )
type ServiceKafkaMirrorMakerCreateReplicationFlowIn ¶
type ServiceKafkaMirrorMakerCreateReplicationFlowIn struct {
ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` // A comma separated list of topic configuration properties and/or regexes that should not be replicated. If omitted, MirrorMaker will use default list of exclusions. For stability reasons, we always include the unclean.leader.election.enable field in the excluded parameters. If you have specific requirements for this configuration, please reach out to our support team for assistance.
EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` // Whether to emit heartbeats to the direction opposite to the flow, i.e. to the source cluster
EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` // Whether to emit heartbeats to the target cluster
Enabled bool `json:"enabled"` // Is replication flow enabled
ExactlyOnceDeliveryEnabled *bool `json:"exactly_once_delivery_enabled,omitempty"` // Whether to enable exactly-once message delivery. We recommend you set this to enabled for new replications.
OffsetLagMax *int `json:"offset_lag_max,omitempty"` // How out-of-sync a remote partition can be before it is resynced (default: 100)
OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` // The location of the offset-syncs topic
ReplicationFactor *int `json:"replication_factor,omitempty"` // Replication factor used when creating the remote topics. If the replication factor surpasses the number of nodes in the target cluster, topic creation will fail.
ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` // Class which defines the remote topic naming convention
SourceCluster string `json:"source_cluster"` // The alias of the source cluster to use in this replication flow. Can contain the following symbols: ASCII alphanumerics, '.', '_', and '-'.
SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` // Whether to periodically write the translated offsets of replicated consumer groups (in the source cluster) to __consumer_offsets topic in target cluster, as long as no active consumers in that group are connected to the target cluster
SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` // Frequency at which consumer group offsets are synced (default: 60, every minute)
TargetCluster string `json:"target_cluster"` // The alias of the target cluster to use in this replication flow. Can contain the following symbols: ASCII alphanumerics, '.', '_', and '-'.
Topics *[]string `json:"topics,omitempty"` // Topic names and regular expressions that match topic names that should be replicated. MirrorMaker will replicate these topics if they are not matched by "topics.exclude". Currently defaults to [".*"].
TopicsBlacklist *[]string `json:"topics.blacklist,omitempty"` // Topic names and regular expressions that match topic names that should not be replicated. MirrorMaker will not replicate these topics even if they are matched by "topics". If not set, MM2 uses the default exclusion.
TopicsExclude *[]string `json:"topics_exclude,omitempty"` // Topic names and regular expressions that match topic names that should not be replicated. MirrorMaker will not replicate these topics even if they are matched by "topics". If not set, MM2 uses the default exclusion.
}
ServiceKafkaMirrorMakerCreateReplicationFlowIn ServiceKafkaMirrorMakerCreateReplicationFlowRequestBody
type ServiceKafkaMirrorMakerGetReplicationFlowOut ¶
type ServiceKafkaMirrorMakerGetReplicationFlowOut struct {
ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` // A comma separated list of topic configuration properties and/or regexes that should not be replicated. If omitted, MirrorMaker will use default list of exclusions. For stability reasons, we always include the unclean.leader.election.enable field in the excluded parameters. If you have specific requirements for this configuration, please reach out to our support team for assistance.
EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` // Whether to emit heartbeats to the direction opposite to the flow, i.e. to the source cluster
EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` // Whether to emit heartbeats to the target cluster
Enabled bool `json:"enabled"` // Is replication flow enabled
ExactlyOnceDeliveryEnabled *bool `json:"exactly_once_delivery_enabled,omitempty"` // Whether to enable exactly-once message delivery. We recommend you set this to enabled for new replications.
OffsetLagMax *int `json:"offset_lag_max,omitempty"` // How out-of-sync a remote partition can be before it is resynced (default: 100)
OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` // The location of the offset-syncs topic
ReplicationFactor *int `json:"replication_factor,omitempty"` // Replication factor used when creating the remote topics. If the replication factor surpasses the number of nodes in the target cluster, topic creation will fail.
ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` // Class which defines the remote topic naming convention
ReplicationProgress *float64 `json:"replication_progress,omitempty"` // The overall progress of replication across topics
SourceCluster string `json:"source_cluster"` // The alias of the source cluster to use in this replication flow. Can contain the following symbols: ASCII alphanumerics, '.', '_', and '-'.
SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` // Whether to periodically write the translated offsets of replicated consumer groups (in the source cluster) to __consumer_offsets topic in target cluster, as long as no active consumers in that group are connected to the target cluster
SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` // Frequency at which consumer group offsets are synced (default: 60, every minute)
TargetCluster string `json:"target_cluster"` // The alias of the target cluster to use in this replication flow. Can contain the following symbols: ASCII alphanumerics, '.', '_', and '-'.
Topics []string `json:"topics,omitempty"` // Topic names and regular expressions that match topic names that should be replicated. MirrorMaker will replicate these topics if they are not matched by "topics.exclude". Currently defaults to [".*"].
TopicsBlacklist []string `json:"topics.blacklist,omitempty"` // Topic names and regular expressions that match topic names that should not be replicated. MirrorMaker will not replicate these topics even if they are matched by "topics". If not set, MM2 uses the default exclusion.
TopicsExclude []string `json:"topics_exclude,omitempty"` // Topic names and regular expressions that match topic names that should not be replicated. MirrorMaker will not replicate these topics even if they are matched by "topics". If not set, MM2 uses the default exclusion.
}
ServiceKafkaMirrorMakerGetReplicationFlowOut Replication flow
type ServiceKafkaMirrorMakerPatchReplicationFlowIn ¶
type ServiceKafkaMirrorMakerPatchReplicationFlowIn struct {
ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` // A comma separated list of topic configuration properties and/or regexes that should not be replicated. If omitted, MirrorMaker will use default list of exclusions. For stability reasons, we always include the unclean.leader.election.enable field in the excluded parameters. If you have specific requirements for this configuration, please reach out to our support team for assistance.
EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` // Whether to emit heartbeats to the direction opposite to the flow, i.e. to the source cluster
EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` // Whether to emit heartbeats to the target cluster
Enabled *bool `json:"enabled,omitempty"` // Is replication flow enabled
ExactlyOnceDeliveryEnabled *bool `json:"exactly_once_delivery_enabled,omitempty"` // Whether to enable exactly-once message delivery. We recommend you set this to enabled for new replications.
OffsetLagMax *int `json:"offset_lag_max,omitempty"` // How out-of-sync a remote partition can be before it is resynced (default: 100)
OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` // The location of the offset-syncs topic
ReplicationFactor *int `json:"replication_factor,omitempty"` // Replication factor used when creating the remote topics. If the replication factor surpasses the number of nodes in the target cluster, topic creation will fail.
ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` // Class which defines the remote topic naming convention
SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` // Whether to periodically write the translated offsets of replicated consumer groups (in the source cluster) to __consumer_offsets topic in target cluster, as long as no active consumers in that group are connected to the target cluster
SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` // Frequency at which consumer group offsets are synced (default: 60, every minute)
Topics *[]string `json:"topics,omitempty"` // Topic names and regular expressions that match topic names that should be replicated. MirrorMaker will replicate these topics if they are not matched by "topics.exclude". Currently defaults to [".*"].
TopicsBlacklist *[]string `json:"topics.blacklist,omitempty"` // Topic names and regular expressions that match topic names that should not be replicated. MirrorMaker will not replicate these topics even if they are matched by "topics". If not set, MM2 uses the default exclusion.
TopicsExclude *[]string `json:"topics_exclude,omitempty"` // Topic names and regular expressions that match topic names that should not be replicated. MirrorMaker will not replicate these topics even if they are matched by "topics". If not set, MM2 uses the default exclusion.
}
ServiceKafkaMirrorMakerPatchReplicationFlowIn ServiceKafkaMirrorMakerPatchReplicationFlowRequestBody
type ServiceKafkaMirrorMakerPatchReplicationFlowOut ¶
type ServiceKafkaMirrorMakerPatchReplicationFlowOut struct {
ConfigPropertiesExclude *string `json:"config_properties_exclude,omitempty"` // A comma separated list of topic configuration properties and/or regexes that should not be replicated. If omitted, MirrorMaker will use default list of exclusions. For stability reasons, we always include the unclean.leader.election.enable field in the excluded parameters. If you have specific requirements for this configuration, please reach out to our support team for assistance.
EmitBackwardHeartbeatsEnabled *bool `json:"emit_backward_heartbeats_enabled,omitempty"` // Whether to emit heartbeats to the direction opposite to the flow, i.e. to the source cluster
EmitHeartbeatsEnabled *bool `json:"emit_heartbeats_enabled,omitempty"` // Whether to emit heartbeats to the target cluster
Enabled bool `json:"enabled"` // Is replication flow enabled
ExactlyOnceDeliveryEnabled *bool `json:"exactly_once_delivery_enabled,omitempty"` // Whether to enable exactly-once message delivery. We recommend you set this to enabled for new replications.
OffsetLagMax *int `json:"offset_lag_max,omitempty"` // How out-of-sync a remote partition can be before it is resynced (default: 100)
OffsetSyncsTopicLocation OffsetSyncsTopicLocationType `json:"offset_syncs_topic_location,omitempty"` // The location of the offset-syncs topic
ReplicationFactor *int `json:"replication_factor,omitempty"` // Replication factor used when creating the remote topics. If the replication factor surpasses the number of nodes in the target cluster, topic creation will fail.
ReplicationPolicyClass ReplicationPolicyClassType `json:"replication_policy_class,omitempty"` // Class which defines the remote topic naming convention
ReplicationProgress *float64 `json:"replication_progress,omitempty"` // The overall progress of replication across topics
SourceCluster string `json:"source_cluster"` // The alias of the source cluster to use in this replication flow. Can contain the following symbols: ASCII alphanumerics, '.', '_', and '-'.
SyncGroupOffsetsEnabled *bool `json:"sync_group_offsets_enabled,omitempty"` // Whether to periodically write the translated offsets of replicated consumer groups (in the source cluster) to __consumer_offsets topic in target cluster, as long as no active consumers in that group are connected to the target cluster
SyncGroupOffsetsIntervalSeconds *int `json:"sync_group_offsets_interval_seconds,omitempty"` // Frequency at which consumer group offsets are synced (default: 60, every minute)
TargetCluster string `json:"target_cluster"` // The alias of the target cluster to use in this replication flow. Can contain the following symbols: ASCII alphanumerics, '.', '_', and '-'.
Topics []string `json:"topics,omitempty"` // Topic names and regular expressions that match topic names that should be replicated. MirrorMaker will replicate these topics if they are not matched by "topics.exclude". Currently defaults to [".*"].
TopicsBlacklist []string `json:"topics.blacklist,omitempty"` // Topic names and regular expressions that match topic names that should not be replicated. MirrorMaker will not replicate these topics even if they are matched by "topics". If not set, MM2 uses the default exclusion.
TopicsExclude []string `json:"topics_exclude,omitempty"` // Topic names and regular expressions that match topic names that should not be replicated. MirrorMaker will not replicate these topics even if they are matched by "topics". If not set, MM2 uses the default exclusion.
}
ServiceKafkaMirrorMakerPatchReplicationFlowOut Replication flow
Click to show internal directories.
Click to hide internal directories.