Documentation
¶
Index ¶
- Constants
- Variables
- func AllAuthTypes() []string
- type ACLMapping
- type AWSClientInformation
- type Acls
- type AuthMethodConfig
- type AuthType
- type BrokerType
- type CloudWatchTimeWindow
- type ClusterAuth
- type ClusterMetrics
- type ClusterNetworking
- type ConnectAuthMethod
- type ConnectSaslScramAuth
- type ConnectTlsAuth
- type ConnectorSummary
- type CostAggregate
- type CostInformation
- type CostMetadata
- type CostQueryInfo
- type CostQueryTimePeriod
- type Credentials
- type DiscoveredClient
- type DiscoveredCluster
- type DiscoveredRegion
- type ExtOutboundClusterKafkaBroker
- type ExtOutboundClusterKafkaEndpoint
- type GatewayResource
- type GatewaySpec
- type GlueSchema
- type GlueSchemaRegistryInformation
- type GlueSchemaRegistryMigrationConfig
- type GlueSchemaVersion
- type IAMConfig
- type KafkaAdminClientInformation
- func (c *KafkaAdminClientInformation) CalculateTopicSummary() TopicSummary
- func (c *KafkaAdminClientInformation) MergeFrom(other KafkaAdminClientInformation)
- func (c *KafkaAdminClientInformation) SetSelfManagedConnectors(connectors []SelfManagedConnector)
- func (c *KafkaAdminClientInformation) SetTopics(topicDetails []TopicDetails)
- type KcpBuildInfo
- type Manifest
- type MetricAggregate
- type MetricMetadata
- type MetricQueryInfo
- type MigrateAclsRequest
- type MigrateGlueSchemasRequest
- type MigrateSchemasRequest
- type MigrationConfig
- type MigrationInfraTerraformModule
- type MigrationInfraTerraformProject
- type MigrationScriptsTerraformFolder
- type MigrationScriptsTerraformProject
- type MigrationState
- type MigrationType
- type MigrationWizardRequest
- type MirrorTopicsRequest
- type ProcessedAggregates
- type ProcessedCluster
- type ProcessedClusterMetrics
- type ProcessedCost
- type ProcessedCostBreakdown
- type ProcessedMetric
- type ProcessedRegion
- type ProcessedRegionCosts
- type ProcessedState
- type RegionAuth
- type ReverseProxyRequest
- type Route
- type RouteFence
- type RouteSecurity
- type RouteSecurityAuthentication
- type RouteSecurityConfig
- type RouteStreamingDomain
- type SASLPlainConfig
- type SASLScramConfig
- type SchemaRegistriesState
- type SchemaRegistryAuthType
- type SchemaRegistryExporterConfig
- type SchemaRegistryInformation
- type SelfManagedConnector
- type SelfManagedConnectors
- type ServiceCostAggregates
- type State
- func (s *State) GetClusterByArn(clusterArn string) (*DiscoveredCluster, error)
- func (s *State) PersistStateFile(stateFile string) error
- func (s *State) UnmarshalJSON(data []byte) error
- func (s *State) UpsertDiscoveredClients(regionName string, clusterName string, discoveredClients []DiscoveredClient) error
- func (s *State) UpsertRegion(newRegion DiscoveredRegion)
- func (s *State) WriteReportCommands(filePath string, stateFilePath string) error
- func (s *State) WriteToFile(filePath string) error
- type StreamingDomain
- type Subject
- type SubnetInfo
- type TLSConfig
- type TargetClusterWizardRequest
- type TerraformFiles
- type TerraformOutput
- type TerraformOutputOld
- type TerraformOutputValue
- type TerraformState
- type TerraformVariable
- type TopicDetails
- type TopicSummary
- type Topics
- type UnauthenticatedPlaintextConfig
- type UnauthenticatedTLSConfig
Constants ¶
const ( StateUninitialized = "uninitialized" StateInitialized = "initialized" StateLagsOk = "lags_ok" StateFenced = "fenced" StatePromoted = "promoted" StateSwitched = "switched" )
FSM State constants
const ( EventInitialize = "initialize" EventWaitForLags = "wait_for_lags" EventFence = "fence" EventPromote = "promote" EventSwitch = "switch" )
FSM Event constants
const ( ServiceAWSCertificateManager = "AWS Certificate Manager" ServiceMSK = "Amazon Managed Streaming for Apache Kafka" ServiceEC2Other = "EC2 - Other" ServiceELB = "Amazon Elastic Load Balancing" ServiceVPC = "Amazon Virtual Private Cloud" )
AWS service name constants — single source of truth for Cost Explorer service filters. Frontend constants (cmd/ui/frontend/src/constants/index.ts AWS_SERVICES) should mirror these.
Variables ¶
var AclMap = map[string]ACLMapping{ "kafka-cluster:AlterCluster": { Operation: "Alter", ResourceType: "Cluster", RequiresPattern: false, }, "kafka-cluster:AlterClusterDynamicConfiguration": { Operation: "AlterConfigs", ResourceType: "Cluster", RequiresPattern: false, }, "kafka-cluster:AlterGroup": { Operation: "Read", ResourceType: "Group", RequiresPattern: true, }, "kafka-cluster:AlterTopic": { Operation: "Alter", ResourceType: "Topic", RequiresPattern: true, }, "kafka-cluster:AlterTopicDynamicConfiguration": { Operation: "AlterConfigs", ResourceType: "Topic", RequiresPattern: true, }, "kafka-cluster:AlterTransactionalId": { Operation: "Write", ResourceType: "TransactionalId", RequiresPattern: true, }, "kafka-cluster:CreateTopic": { Operation: "Create", ResourceType: "Topic", RequiresPattern: true, }, "kafka-cluster:DeleteGroup": { Operation: "Delete", ResourceType: "Group", RequiresPattern: true, }, "kafka-cluster:DeleteTopic": { Operation: "Delete", ResourceType: "Topic", RequiresPattern: true, }, "kafka-cluster:DescribeCluster": { Operation: "Describe", ResourceType: "Cluster", RequiresPattern: false, }, "kafka-cluster:DescribeClusterDynamicConfiguration": { Operation: "DescribeConfigs", ResourceType: "Cluster", RequiresPattern: false, }, "kafka-cluster:DescribeGroup": { Operation: "Describe", ResourceType: "Group", RequiresPattern: true, }, "kafka-cluster:DescribeTopic": { Operation: "Describe", ResourceType: "Topic", RequiresPattern: true, }, "kafka-cluster:DescribeTopicDynamicConfiguration": { Operation: "DescribeConfigs", ResourceType: "Topic", RequiresPattern: true, }, "kafka-cluster:DescribeTransactionalId": { Operation: "Describe", ResourceType: "TransactionalId", RequiresPattern: true, }, "kafka-cluster:ReadData": { Operation: "Read", ResourceType: "Topic", RequiresPattern: true, }, "kafka-cluster:WriteData": { Operation: "Write", ResourceType: "Topic", RequiresPattern: true, }, "kafka-cluster:WriteDataIdempotently": { Operation: "IdempotentWrite", ResourceType: "Cluster", RequiresPattern: true, }, }
https://docs.aws.amazon.com/service-authorization/latest/reference/list_apachekafkaapisforamazonmskclusters.html https://docs.confluent.io/cloud/current/security/access-control/acl.html#acl-resources-and-operations-for-ccloud-summary
Functions ¶
func AllAuthTypes ¶
func AllAuthTypes() []string
AllAuthTypes returns all possible AuthType values as strings This can be called statically without needing an AuthType instance
Types ¶
type ACLMapping ¶ added in v0.2.1
type AWSClientInformation ¶ added in v0.4.0
type AWSClientInformation struct {
MskClusterConfig kafkatypes.Cluster `json:"msk_cluster_config"`
ClientVpcConnections []kafkatypes.ClientVpcConnection `json:"client_vpc_connections"`
ClusterOperations []kafkatypes.ClusterOperationV2Summary `json:"cluster_operations"`
Nodes []kafkatypes.NodeInfo `json:"nodes"`
ScramSecrets []string `json:"ScramSecrets"`
BootstrapBrokers kafka.GetBootstrapBrokersOutput `json:"bootstrap_brokers"`
Policy kafka.GetClusterPolicyOutput `json:"policy"`
CompatibleVersions kafka.GetCompatibleKafkaVersionsOutput `json:"compatible_versions"`
ClusterNetworking ClusterNetworking `json:"cluster_networking"`
Connectors []ConnectorSummary `json:"connectors"`
}
func (*AWSClientInformation) GetAllBootstrapBrokersForAuthType ¶ added in v0.4.0
func (c *AWSClientInformation) GetAllBootstrapBrokersForAuthType(authType AuthType) ([]string, error)
Returns all bootstrap brokers for a given auth type.
func (*AWSClientInformation) GetBootstrapBrokersForAuthType ¶ added in v0.4.0
func (c *AWSClientInformation) GetBootstrapBrokersForAuthType(authType AuthType) ([]string, error)
Returns only one bootstrap broker per authentication type.
type Acls ¶ added in v0.2.1
type Acls struct {
ResourceType string `json:"ResourceType"`
ResourceName string `json:"ResourceName"`
ResourcePatternType string `json:"ResourcePatternType"`
Principal string `json:"Principal"`
Host string `json:"Host"`
Operation string `json:"Operation"`
PermissionType string `json:"PermissionType"`
}
Preferred over sarama.ResourceAcls because it is flattened vs sarama's nested structure.
type AuthMethodConfig ¶ added in v0.2.7
type AuthMethodConfig struct {
IAM *IAMConfig `yaml:"iam,omitempty"`
SASLScram *SASLScramConfig `yaml:"sasl_scram,omitempty"`
SASLPlain *SASLPlainConfig `yaml:"sasl_plain,omitempty"`
TLS *TLSConfig `yaml:"tls,omitempty"`
UnauthenticatedTLS *UnauthenticatedTLSConfig `yaml:"unauthenticated_tls,omitempty"`
UnauthenticatedPlaintext *UnauthenticatedPlaintextConfig `yaml:"unauthenticated_plaintext,omitempty"`
}
func (*AuthMethodConfig) MergeWith ¶ added in v0.4.0
func (amc *AuthMethodConfig) MergeWith(existing AuthMethodConfig)
MergeWith preserves existing auth configurations only for auth methods that still exist in the new config
type AuthType ¶
type AuthType string
AuthType represents the different authentication types supported by MSK clusters
const ( AuthTypeSASLSCRAM AuthType = "SASL/SCRAM" AuthTypeIAM AuthType = "SASL/IAM" AuthTypeTLS AuthType = "TLS" AuthTypeUnauthenticatedPlaintext AuthType = "Unauthenticated (Plaintext)" AuthTypeUnauthenticatedTLS AuthType = "Unauthenticated (TLS Encryption)" AuthTypeSASLPlain AuthType = "SASL/PLAIN" )
type BrokerType ¶ added in v0.6.4
type BrokerType string
----- metrics -----
const ( BrokerTypeExpress BrokerType = "express" BrokerTypeStandard BrokerType = "standard" )
type CloudWatchTimeWindow ¶ added in v0.4.0
type ClusterAuth ¶ added in v0.4.0
type ClusterAuth struct {
Name string `yaml:"name"`
Arn string `yaml:"arn"`
AuthMethod AuthMethodConfig `yaml:"auth_method"`
}
func (ClusterAuth) GetAuthMethods ¶ added in v0.4.0
func (ce ClusterAuth) GetAuthMethods() []AuthType
Gets a list of the authentication method(s) selected in the `creds.yaml` file generated during discovery.
func (ClusterAuth) GetSelectedAuthType ¶ added in v0.4.0
func (ce ClusterAuth) GetSelectedAuthType() (AuthType, error)
type ClusterMetrics ¶
type ClusterMetrics struct {
MetricMetadata MetricMetadata `json:"metadata"`
Results []cloudwatchtypes.MetricDataResult `json:"results"`
QueryInfo []MetricQueryInfo `json:"query_info"`
}
type ClusterNetworking ¶ added in v0.2.2
type ClusterNetworking struct {
VpcId string `json:"vpc_id"`
SubnetIds []string `json:"subnet_ids"`
SecurityGroups []string `json:"security_groups"`
Subnets []SubnetInfo `json:"subnets"`
}
type ConnectAuthMethod ¶ added in v0.4.2
type ConnectAuthMethod string
const ( ConnectAuthMethodSaslScram ConnectAuthMethod = "SASL/SCRAM" ConnectAuthMethodTls ConnectAuthMethod = "TLS" ConnectAuthMethodUnauthenticated ConnectAuthMethod = "Unauthenticated" )
type ConnectSaslScramAuth ¶ added in v0.4.2
type ConnectTlsAuth ¶ added in v0.4.2
type ConnectorSummary ¶ added in v0.4.0
type ConnectorSummary struct {
ConnectorArn string `json:"connector_arn"`
ConnectorName string `json:"connector_name"`
ConnectorState string `json:"connector_state"`
CreationTime string `json:"creation_time"`
KafkaCluster kafkaconnecttypes.ApacheKafkaClusterDescription `json:"kafka_cluster"`
KafkaClusterClientAuthentication kafkaconnecttypes.KafkaClusterClientAuthenticationDescription `json:"kafka_cluster_client_authentication"`
Capacity kafkaconnecttypes.CapacityDescription `json:"capacity"`
Plugins []kafkaconnecttypes.PluginDescription `json:"plugins"`
ConnectorConfiguration map[string]string `json:"connector_configuration"`
}
type CostAggregate ¶ added in v0.4.0
type CostInformation ¶ added in v0.4.0
type CostInformation struct {
CostMetadata CostMetadata `json:"metadata"`
CostResults []costexplorertypes.ResultByTime `json:"results"`
QueryInfo CostQueryInfo `json:"query_info"`
}
type CostMetadata ¶ added in v0.4.0
type CostQueryInfo ¶ added in v0.6.9
type CostQueryInfo struct {
TimePeriod CostQueryTimePeriod `json:"time_period"`
Granularity string `json:"granularity"`
Services []string `json:"services"`
Regions []string `json:"regions"`
GroupBy []string `json:"group_by"`
Metrics []string `json:"metrics"`
Tags map[string][]string `json:"tags,omitempty"`
AWSCLICommand string `json:"aws_cli_command"`
ConsoleURL string `json:"console_url"`
AggregationNote string `json:"aggregation_note"`
}
type CostQueryTimePeriod ¶ added in v0.6.9
----- costs -----
type Credentials ¶ added in v0.2.7
type Credentials struct {
Regions []RegionAuth `yaml:"regions"`
}
func NewCredentialsFrom ¶ added in v0.4.0
func NewCredentialsFrom(fromCredentials *Credentials) *Credentials
func NewCredentialsFromFile ¶ added in v0.4.0
func NewCredentialsFromFile(credentialsYamlPath string) (*Credentials, []error)
func (*Credentials) FindClusterByArn ¶ added in v0.7.0
func (c *Credentials) FindClusterByArn(arn string) (*ClusterAuth, error)
FindClusterByArn searches all regions for a cluster matching the given ARN.
func (*Credentials) ToYaml ¶ added in v0.2.7
func (c *Credentials) ToYaml() ([]byte, error)
func (*Credentials) UpsertRegion ¶ added in v0.4.0
func (c *Credentials) UpsertRegion(newRegion RegionAuth)
UpsertRegion inserts a new region or updates an existing one by name Automatically preserves existing cluster auth configurations
func (Credentials) Validate ¶ added in v0.2.7
func (c Credentials) Validate() (bool, []error)
func (*Credentials) WriteToFile ¶ added in v0.2.7
func (c *Credentials) WriteToFile(filePath string) error
type DiscoveredClient ¶ added in v0.5.2
type DiscoveredCluster ¶ added in v0.4.0
type DiscoveredCluster struct {
Name string `json:"name"`
Arn string `json:"arn"`
Region string `json:"region"`
ClusterMetrics ClusterMetrics `json:"metrics"`
AWSClientInformation AWSClientInformation `json:"aws_client_information"`
KafkaAdminClientInformation KafkaAdminClientInformation `json:"kafka_admin_client_information"`
DiscoveredClients []DiscoveredClient `json:"discovered_clients"`
}
type DiscoveredRegion ¶ added in v0.4.0
type DiscoveredRegion struct {
Name string `json:"name"`
Configurations []kafka.DescribeConfigurationRevisionOutput `json:"configurations"`
Costs CostInformation `json:"costs"`
Clusters []DiscoveredCluster `json:"clusters"`
// internal only - exclude from JSON output
ClusterArns []string `json:"-"`
}
func (*DiscoveredRegion) RefreshClusters ¶ added in v0.4.0
func (dr *DiscoveredRegion) RefreshClusters(newClusters []DiscoveredCluster)
RefreshClusters replaces the cluster list but merges KafkaAdminClientInformation from existing clusters New discoveries take precedence over old values (only uses old values when new values are empty/nil)
type ExtOutboundClusterKafkaBroker ¶ added in v0.5.0
type ExtOutboundClusterKafkaBroker struct {
ID string `json:"broker_id"`
SubnetID string `json:"subnet_id"`
Endpoints []ExtOutboundClusterKafkaEndpoint `json:"endpoints"`
}
type ExtOutboundClusterKafkaEndpoint ¶ added in v0.5.0
type GatewayResource ¶ added in v0.7.0
type GatewayResource struct {
Spec GatewaySpec `yaml:"spec"`
}
type GatewaySpec ¶ added in v0.7.0
type GatewaySpec struct {
StreamingDomains []StreamingDomain `yaml:"streamingDomains"`
Routes []Route `yaml:"routes"`
}
type GlueSchema ¶ added in v0.7.2
type GlueSchema struct {
SchemaName string `json:"schema_name"`
SchemaArn string `json:"schema_arn"`
DataFormat string `json:"data_format"`
Versions []GlueSchemaVersion `json:"versions"`
Latest *GlueSchemaVersion `json:"latest_version"`
}
type GlueSchemaRegistryInformation ¶ added in v0.7.2
type GlueSchemaRegistryInformation struct {
RegistryName string `json:"registry_name"`
RegistryArn string `json:"registry_arn"`
Region string `json:"region"`
Schemas []GlueSchema `json:"schemas"`
}
type GlueSchemaRegistryMigrationConfig ¶ added in v0.7.2
type GlueSchemaRegistryMigrationConfig struct {
Migrate bool `json:"migrate"`
RegistryName string `json:"registry_name"`
Region string `json:"region"`
Schemas []GlueSchema `json:"schemas"`
}
type GlueSchemaVersion ¶ added in v0.7.2
type KafkaAdminClientInformation ¶ added in v0.4.0
type KafkaAdminClientInformation struct {
ClusterID string `json:"cluster_id"`
Topics *Topics `json:"topics"`
Acls []Acls `json:"acls"`
SelfManagedConnectors *SelfManagedConnectors `json:"self_managed_connectors"`
}
func (*KafkaAdminClientInformation) CalculateTopicSummary ¶ added in v0.4.0
func (c *KafkaAdminClientInformation) CalculateTopicSummary() TopicSummary
func (*KafkaAdminClientInformation) MergeFrom ¶ added in v0.6.0
func (c *KafkaAdminClientInformation) MergeFrom(other KafkaAdminClientInformation)
MergeFrom merges values from another KafkaAdminClientInformation New discoveries are added, old data is preserved, duplicates are merged (new takes precedence)
func (*KafkaAdminClientInformation) SetSelfManagedConnectors ¶ added in v0.4.2
func (c *KafkaAdminClientInformation) SetSelfManagedConnectors(connectors []SelfManagedConnector)
func (*KafkaAdminClientInformation) SetTopics ¶ added in v0.4.0
func (c *KafkaAdminClientInformation) SetTopics(topicDetails []TopicDetails)
type KcpBuildInfo ¶ added in v0.3.1
type Manifest ¶
type Manifest struct {
MigrationInfraType MigrationType `json:"migration_infra_type"`
}
type MetricAggregate ¶ added in v0.4.0
type MetricMetadata ¶ added in v0.4.0
type MetricMetadata struct {
ClusterType string `json:"cluster_type"`
NumberOfBrokerNodes int `json:"number_of_broker_nodes"`
KafkaVersion string `json:"kafka_version"`
BrokerAzDistribution string `json:"broker_az_distribution"`
EnhancedMonitoring string `json:"enhanced_monitoring"`
StartDate time.Time `json:"start_date"`
EndDate time.Time `json:"end_date"`
Period int32 `json:"period"`
FollowerFetching bool `json:"follower_fetching"`
InstanceType string `json:"instance_type"`
TieredStorage bool `json:"tiered_storage"`
BrokerType BrokerType `json:"broker_type"`
}
type MetricQueryInfo ¶ added in v0.6.9
type MetricQueryInfo struct {
MetricName string `json:"metric_name"`
Namespace string `json:"namespace"`
Dimensions string `json:"dimensions"`
Statistic string `json:"statistic"`
Period int32 `json:"period"`
SearchExpression string `json:"search_expression"`
MathExpression string `json:"math_expression"`
AWSCLICommand string `json:"aws_cli_command"`
ConsoleSourceJSON string `json:"console_source_json"`
AggregationNote string `json:"aggregation_note"`
}
type MigrateAclsRequest ¶ added in v0.5.2
type MigrateAclsRequest struct {
SelectedPrincipals []string `json:"selected_principals"`
TargetClusterId string `json:"target_cluster_id"`
TargetClusterRestEndpoint string `json:"target_cluster_rest_endpoint"`
PreventDestroy bool `json:"prevent_destroy"`
MskRegion string `json:"msk_region"`
MskClusterArn string `json:"msk_cluster_arn"`
// This is not sent by the UI payload but instead built by the API service before being passed on to the HCL service.
AclsByPrincipal map[string][]Acls `json:"-"`
}
type MigrateGlueSchemasRequest ¶ added in v0.7.2
type MigrateGlueSchemasRequest struct {
ConfluentCloudSchemaRegistryURL string `json:"confluent_cloud_schema_registry_url"`
GlueRegistries []GlueSchemaRegistryMigrationConfig `json:"glue_registries"`
}
type MigrateSchemasRequest ¶ added in v0.5.0
type MigrateSchemasRequest struct {
ConfluentCloudSchemaRegistryURL string `json:"confluent_cloud_schema_registry_url"`
SchemaRegistries []SchemaRegistryExporterConfig `json:"schema_registries"`
}
type MigrationConfig ¶ added in v0.7.0
type MigrationConfig struct {
MigrationId string `json:"migration_id"`
CurrentState string `json:"current_state"`
// Gateway configuration
KubeConfigPath string `json:"kube_config_path"`
// Source cluster configuration
SourceBootstrap string `json:"source_bootstrap"`
// Destination cluster configuration
ClusterBootstrap string `json:"cluster_bootstrap"`
ClusterId string `json:"cluster_id"`
ClusterRestEndpoint string `json:"cluster_rest_endpoint"`
ClusterLinkName string `json:"cluster_link_name"`
Topics []string `json:"topics"`
// Migration runtime data (populated during initialization)
ClusterLinkTopics []string `json:"cluster_link_topics"`
ClusterLinkConfigs map[string]string `json:"cluster_link_configs"`
// Gateway CR configuration
InitialCrName string `json:"initial_cr_name"`
K8sNamespace string `json:"k8s_namespace"`
InitialCrYAML []byte `json:"initial_cr_yaml"`
FencedCrYAML []byte `json:"fenced_cr_yaml"`
SwitchoverCrYAML []byte `json:"switchover_cr_yaml"`
}
MigrationConfig holds all domain configuration for a migration This is pure data with no behavior - just fields that get serialized
type MigrationInfraTerraformModule ¶ added in v0.5.0
type MigrationInfraTerraformModule struct {
Name string `json:"name"`
MainTf string `json:"main.tf"`
VariablesTf string `json:"variables.tf"`
OutputsTf string `json:"outputs.tf"`
VersionsTf string `json:"versions.tf"`
AdditionalFiles map[string]string `json:"additional_files"`
}
MigrationInfraTerraformModule represents a Terraform module within the migration infrastructure configuration. Each module contains its own Terraform files and additional assets.
type MigrationInfraTerraformProject ¶ added in v0.5.0
type MigrationInfraTerraformProject struct {
MainTf string `json:"main.tf"`
ProvidersTf string `json:"providers.tf"`
VariablesTf string `json:"variables.tf"`
OutputsTf string `json:"outputs.tf"`
ReadmeMd string `json:"README.md"`
InputsAutoTfvars string `json:"inputs.auto.tfvars"`
Modules []MigrationInfraTerraformModule `json:"modules"`
}
MigrationInfraTerraformProject represents the complete Terraform configuration for migration infrastructure. "project" = root config + modules
type MigrationScriptsTerraformFolder ¶ added in v0.5.0
type MigrationScriptsTerraformFolder struct {
Name string `json:"name"`
MainTf string `json:"main.tf"`
ProvidersTf string `json:"providers.tf"`
VariablesTf string `json:"variables.tf"`
InputsAutoTfvars string `json:"inputs.auto.tfvars"`
AdditionalFiles map[string]string `json:"additional_files,omitempty"`
}
MigrationScriptsTerraformFolder represents a Terraform folder within the migration scripts
type MigrationScriptsTerraformProject ¶ added in v0.5.0
type MigrationScriptsTerraformProject struct {
// not really a module, but its the same structure
Folders []MigrationScriptsTerraformFolder `json:"modules"`
}
MigrationScriptsTerraformProject represents the complete Terraform configuration for migration scripts
type MigrationState ¶ added in v0.7.0
type MigrationState struct {
Migrations []MigrationConfig `json:"migrations"`
KcpBuildInfo KcpBuildInfo `json:"kcp_build_info"`
Timestamp time.Time `json:"timestamp"`
}
MigrationState represents the migration state file structure This is a dedicated state file for migration commands (init, execute, list)
func NewMigrationState ¶ added in v0.7.0
func NewMigrationState() *MigrationState
NewMigrationState creates a new empty MigrationState with metadata
func NewMigrationStateFromFile ¶ added in v0.7.0
func NewMigrationStateFromFile(filePath string) (*MigrationState, error)
NewMigrationStateFromFile loads a MigrationState from a JSON file
func (*MigrationState) GetMigrationById ¶ added in v0.7.0
func (ms *MigrationState) GetMigrationById(migrationId string) (*MigrationConfig, error)
GetMigrationById retrieves a migration by its ID
func (*MigrationState) UpsertMigration ¶ added in v0.7.0
func (ms *MigrationState) UpsertMigration(config MigrationConfig)
UpsertMigration adds a new migration or updates an existing one by ID
func (*MigrationState) WriteToFile ¶ added in v0.7.0
func (ms *MigrationState) WriteToFile(filePath string) error
WriteToFile saves the MigrationState to a JSON file using atomic write
type MigrationType ¶ added in v0.5.0
type MigrationType int
const ( PublicMskEndpoints MigrationType = 1 ExternalOutboundClusterLink MigrationType = 2 ExternalOutboundClusterLinkUnauthTls MigrationType = 3 JumpClusterSaslScram MigrationType = 4 JumpClusterIam MigrationType = 6 )
func ToMigrationType ¶ added in v0.5.0
func ToMigrationType(input string) (MigrationType, error)
func (MigrationType) IsValid ¶ added in v0.5.0
func (m MigrationType) IsValid() bool
type MigrationWizardRequest ¶ added in v0.5.0
type MigrationWizardRequest struct {
HasPublicMskEndpoints bool `json:"has_public_msk_brokers"`
VpcId string `json:"vpc_id"`
UseJumpClusters bool `json:"use_jump_clusters"`
ExtOutboundSecurityGroupId string `json:"ext_outbound_security_group_id"`
ExtOutboundSubnetId string `json:"ext_outbound_subnet_id"`
ExtOutboundBrokers []ExtOutboundClusterKafkaBroker `json:"aws_kafka_brokers"`
ExistingPrivateLinkVpceId string `json:"existing_private_link_vpce_id"`
HasExistingInternetGateway bool `json:"has_existing_internet_gateway"`
JumpClusterInstanceType string `json:"jump_cluster_instance_type"`
JumpClusterBrokerStorage int `json:"jump_cluster_broker_storage"`
JumpClusterBrokerSubnetCidr []string `json:"jump_cluster_broker_subnet_cidr"`
JumpClusterSetupHostSubnetCidr string `json:"jump_cluster_setup_host_subnet_cidr"`
MskJumpClusterAuthType string `json:"msk_jump_cluster_auth_type"`
MskClusterId string `json:"msk_cluster_id"`
JumpClusterIamAuthRoleName string `json:"jump_cluster_iam_auth_role_name"`
MskSaslScramBootstrapServers string `json:"msk_sasl_scram_bootstrap_servers"`
MskSaslIamBootstrapServers string `json:"msk_sasl_iam_bootstrap_servers"`
MskUnauthTlsBootstrapServers string `json:"msk_unauth_tls_bootstrap_servers"`
MskRegion string `json:"msk_region"`
TargetEnvironmentId string `json:"target_environment_id"`
TargetClusterId string `json:"target_cluster_id"`
TargetRestEndpoint string `json:"target_rest_endpoint"`
TargetBootstrapEndpoint string `json:"target_bootstrap_endpoint"`
ClusterLinkName string `json:"cluster_link_name"`
TargetClusterType string `json:"target_cluster_type"`
}
type MirrorTopicsRequest ¶ added in v0.5.0
type ProcessedAggregates ¶ added in v0.4.0
type ProcessedAggregates struct {
AWSCertificateManager ServiceCostAggregates `json:"AWS Certificate Manager"`
AmazonManagedStreamingForApacheKafka ServiceCostAggregates `json:"Amazon Managed Streaming for Apache Kafka"`
EC2Other ServiceCostAggregates `json:"EC2 - Other"`
ElasticLoadBalancing ServiceCostAggregates `json:"Amazon Elastic Load Balancing"`
AmazonVPC ServiceCostAggregates `json:"Amazon Virtual Private Cloud"`
}
ProcessedAggregates represents the specific services we query
func NewProcessedAggregates ¶ added in v0.4.0
func NewProcessedAggregates() ProcessedAggregates
NewProcessedAggregates creates a new ProcessedAggregates with all maps initialized
func (*ProcessedAggregates) ForService ¶ added in v0.6.10
func (a *ProcessedAggregates) ForService(name string) *ServiceCostAggregates
ForService returns a pointer to the ServiceCostAggregates for the given service name, or nil if the service is not recognized.
type ProcessedCluster ¶ added in v0.4.0
type ProcessedCluster struct {
Name string `json:"name"`
Arn string `json:"arn"`
Region string `json:"region"`
ClusterMetrics ProcessedClusterMetrics `json:"metrics"` // Flattened from raw CloudWatch metrics
AWSClientInformation AWSClientInformation `json:"aws_client_information"`
KafkaAdminClientInformation KafkaAdminClientInformation `json:"kafka_admin_client_information"`
DiscoveredClients []DiscoveredClient `json:"discovered_clients"`
}
ProcessedCluster contains the complete cluster data with flattened metrics This is the full cluster information with processed metrics, unlike the simplified version in types.go
type ProcessedClusterMetrics ¶ added in v0.4.0
type ProcessedClusterMetrics struct {
Region string `json:"region"`
ClusterArn string `json:"cluster_arn"`
Metadata MetricMetadata `json:"metadata"`
Metrics []ProcessedMetric `json:"results"`
Aggregates map[string]MetricAggregate `json:"aggregates"`
QueryInfo []MetricQueryInfo `json:"query_info"`
}
type ProcessedCost ¶ added in v0.4.0
type ProcessedCost struct {
Start string `json:"start"`
End string `json:"end"`
Service string `json:"service"`
UsageType string `json:"usage_type"`
Values ProcessedCostBreakdown `json:"values"`
}
type ProcessedCostBreakdown ¶ added in v0.4.0
type ProcessedMetric ¶ added in v0.4.0
type ProcessedRegion ¶ added in v0.4.0
type ProcessedRegion struct {
Name string `json:"name"`
Configurations []kafka.DescribeConfigurationRevisionOutput `json:"configurations"`
Costs ProcessedRegionCosts `json:"costs"` // Flattened from raw AWS Cost Explorer data
Clusters []ProcessedCluster `json:"clusters"` // Simplified from full DiscoveredCluster data
}
ProcessedRegion mirrors DiscoveredRegion but with flattened costs and simplified clusters
type ProcessedRegionCosts ¶ added in v0.4.0
type ProcessedRegionCosts struct {
Region string `json:"region"`
Metadata CostMetadata `json:"metadata"`
Results []ProcessedCost `json:"results"`
Aggregates ProcessedAggregates `json:"aggregates"`
QueryInfo CostQueryInfo `json:"query_info"`
}
type ProcessedState ¶ added in v0.4.0
type ProcessedState struct {
Regions []ProcessedRegion `json:"regions"`
SchemaRegistries *SchemaRegistriesState `json:"schema_registries,omitempty"`
KcpBuildInfo KcpBuildInfo `json:"kcp_build_info"`
Timestamp time.Time `json:"timestamp"`
}
ProcessedState represents the transformed output data structure This is what comes OUT of the frontend/API after processing the raw State data Same structure as State but with costs and metrics flattened for easier frontend consumption
type RegionAuth ¶ added in v0.4.0
type RegionAuth struct {
Name string `yaml:"name"`
Clusters []ClusterAuth `yaml:"clusters"`
}
func (*RegionAuth) MergeClusterConfigs ¶ added in v0.4.0
func (ra *RegionAuth) MergeClusterConfigs(existingRegion RegionAuth)
MergeClusterConfigs preserves existing cluster auth configurations from the existing region
type ReverseProxyRequest ¶ added in v0.5.0
type Route ¶ added in v0.7.0
type Route struct {
Name string `yaml:"name"`
StreamingDomain RouteStreamingDomain `yaml:"streamingDomain"`
Security RouteSecurity `yaml:"security"`
Fence *RouteFence `yaml:"fence,omitempty"`
}
type RouteFence ¶ added in v0.7.0
type RouteSecurity ¶ added in v0.7.0
type RouteSecurity struct {
Auth string `yaml:"auth"`
Client RouteSecurityConfig `yaml:"client"`
Cluster RouteSecurityConfig `yaml:"cluster"`
}
type RouteSecurityAuthentication ¶ added in v0.7.0
type RouteSecurityAuthentication struct {
Type string `yaml:"type"`
}
type RouteSecurityConfig ¶ added in v0.7.0
type RouteSecurityConfig struct {
Authentication RouteSecurityAuthentication `yaml:"authentication"`
}
type RouteStreamingDomain ¶ added in v0.7.0
type SASLPlainConfig ¶ added in v0.7.2
type SASLScramConfig ¶ added in v0.2.7
type SchemaRegistriesState ¶ added in v0.7.2
type SchemaRegistriesState struct {
ConfluentSchemaRegistry []SchemaRegistryInformation `json:"confluent_schema_registry,omitempty"`
AWSGlue []GlueSchemaRegistryInformation `json:"aws_glue,omitempty"`
}
SchemaRegistriesState holds schema registries organized by type
func (*SchemaRegistriesState) UpsertConfluentSchemaRegistry ¶ added in v0.7.2
func (s *SchemaRegistriesState) UpsertConfluentSchemaRegistry(sr SchemaRegistryInformation)
UpsertConfluentSchemaRegistry inserts or updates a Confluent SR entry, matched by URL
func (*SchemaRegistriesState) UpsertGlueSchemaRegistry ¶ added in v0.7.2
func (s *SchemaRegistriesState) UpsertGlueSchemaRegistry(gr GlueSchemaRegistryInformation)
UpsertGlueSchemaRegistry inserts or updates a Glue SR entry, matched by RegistryName+Region
type SchemaRegistryAuthType ¶ added in v0.4.2
type SchemaRegistryAuthType string
SchemaRegistryAuthType represents the different authentication types supported by Schema Registry
const ( SchemaRegistryAuthTypeUnauthenticated SchemaRegistryAuthType = "Unauthenticated" SchemaRegistryAuthTypeBasicAuth SchemaRegistryAuthType = "BasicAuth" )
type SchemaRegistryExporterConfig ¶ added in v0.5.0
type SchemaRegistryInformation ¶ added in v0.4.2
type SchemaRegistryInformation struct {
Type string `json:"type"`
URL string `json:"url"`
DefaultCompatibility schemaregistry.Compatibility `json:"default_compatibility"`
Contexts []string `json:"contexts"`
Subjects []Subject `json:"subjects"`
}
type SelfManagedConnector ¶ added in v0.4.2
type SelfManagedConnectors ¶ added in v0.4.2
type SelfManagedConnectors struct {
Connectors []SelfManagedConnector `json:"connectors"`
}
type ServiceCostAggregates ¶ added in v0.4.0
type ServiceCostAggregates struct {
UnblendedCost map[string]any `json:"unblended_cost"`
BlendedCost map[string]any `json:"blended_cost"`
AmortizedCost map[string]any `json:"amortized_cost"`
NetAmortizedCost map[string]any `json:"net_amortized_cost"`
NetUnblendedCost map[string]any `json:"net_unblended_cost"`
}
ServiceCostAggregates represents cost aggregates for a single service Uses explicit fields for each metric type instead of a map
type State ¶ added in v0.4.0
type State struct {
Regions []DiscoveredRegion `json:"regions"`
SchemaRegistries *SchemaRegistriesState `json:"schema_registries,omitempty"`
KcpBuildInfo KcpBuildInfo `json:"kcp_build_info"`
Timestamp time.Time `json:"timestamp"`
}
State represents the raw input data structure (kcp-state.json file) This is what gets fed INTO the frontend/API for processing
func NewStateFrom ¶ added in v0.4.0
func NewStateFromFile ¶ added in v0.4.0
func (*State) GetClusterByArn ¶ added in v0.5.2
func (s *State) GetClusterByArn(clusterArn string) (*DiscoveredCluster, error)
func (*State) PersistStateFile ¶ added in v0.4.0
func (*State) UnmarshalJSON ¶ added in v0.7.2
UnmarshalJSON implements custom JSON unmarshaling for State to handle backward compatibility with the old schema_registries array format.
func (*State) UpsertDiscoveredClients ¶ added in v0.5.2
func (s *State) UpsertDiscoveredClients(regionName string, clusterName string, discoveredClients []DiscoveredClient) error
func (*State) UpsertRegion ¶ added in v0.4.0
func (s *State) UpsertRegion(newRegion DiscoveredRegion)
func (*State) WriteReportCommands ¶ added in v0.4.5
func (*State) WriteToFile ¶ added in v0.4.0
type StreamingDomain ¶ added in v0.7.0
type StreamingDomain struct {
Name string `yaml:"name"`
}
type Subject ¶ added in v0.4.2
type Subject struct {
Name string `json:"name"`
SchemaType string `json:"schema_type"`
Compatibility string `json:"compatibility,omitempty"`
Versions []schemaregistry.SchemaMetadata `json:"versions"`
Latest schemaregistry.SchemaMetadata `json:"latest_schema"`
}
type SubnetInfo ¶ added in v0.2.2
type TargetClusterWizardRequest ¶ added in v0.5.0
type TargetClusterWizardRequest struct {
AwsRegion string `json:"aws_region"`
NeedsEnvironment bool `json:"needs_environment"`
EnvironmentName string `json:"environment_name"`
EnvironmentId string `json:"environment_id"`
NeedsCluster bool `json:"needs_cluster"`
ClusterName string `json:"cluster_name"`
ClusterType string `json:"cluster_type"`
ClusterAvailability string `json:"cluster_availability"` // "SINGLE_ZONE" or "MULTI_ZONE"
ClusterCku int `json:"cluster_cku"` // Number of CKUs (1+, MULTI_ZONE requires >= 2)
NeedsPrivateLink bool `json:"needs_private_link"`
UseExistingRoute53Zone bool `json:"use_existing_route53_zone"`
PreventDestroy bool `json:"prevent_destroy"`
VpcId string `json:"vpc_id"`
SubnetCidrRanges []string `json:"subnet_cidr_ranges"`
}
type TerraformFiles ¶ added in v0.5.0
type TerraformFiles struct {
MainTf string `json:"main.tf"`
ProvidersTf string `json:"providers.tf"`
VariablesTf string `json:"variables.tf"`
InputsAutoTfvars string `json:"inputs.auto.tfvars"`
OutputsTf string `json:"outputs.tf"`
PerPrincipalTf map[string]string `json:"per_principal_tf,omitempty"`
}
type TerraformOutput ¶
type TerraformOutputOld ¶ added in v0.5.0
type TerraformOutputOld struct {
ConfluentCloudClusterApiKey TerraformOutputValue `json:"confluent_cloud_cluster_api_key"`
ConfluentCloudClusterApiKeySecret TerraformOutputValue `json:"confluent_cloud_cluster_api_key_secret"`
ConfluentCloudClusterId TerraformOutputValue `json:"confluent_cloud_cluster_id"`
ConfluentCloudClusterRestEndpoint TerraformOutputValue `json:"confluent_cloud_cluster_rest_endpoint"`
ConfluentCloudClusterBootstrapEndpoint TerraformOutputValue `json:"confluent_cloud_cluster_bootstrap_endpoint"`
ConfluentPlatformControllerBootstrapServer TerraformOutputValue `json:"confluent_platform_controller_bootstrap_server"`
}
a type for the output.json file in the target_env folder NOTE: This will be deprecated once we are completely on the HCL-servrice based approach.
type TerraformOutputValue ¶
type TerraformState ¶
type TerraformState struct {
Outputs TerraformOutputOld `json:"outputs"`
}
type TerraformVariable ¶ added in v0.5.0
type TopicDetails ¶ added in v0.3.4
type TopicSummary ¶ added in v0.3.4
type TopicSummary struct {
Topics int `json:"topics"`
InternalTopics int `json:"internal_topics"`
TotalPartitions int `json:"total_partitions"`
TotalInternalPartitions int `json:"total_internal_partitions"`
CompactTopics int `json:"compact_topics"`
CompactInternalTopics int `json:"compact_internal_topics"`
CompactPartitions int `json:"compact_partitions"`
CompactInternalPartitions int `json:"compact_internal_partitions"`
RemoteStorageTopics int `json:"remote_storage_topics"`
}
func CalculateTopicSummaryFromDetails ¶ added in v0.3.4
func CalculateTopicSummaryFromDetails(topicDetails []TopicDetails) TopicSummary
type Topics ¶ added in v0.3.3
type Topics struct {
Summary TopicSummary `json:"summary"`
Details []TopicDetails `json:"details"`
}
type UnauthenticatedPlaintextConfig ¶ added in v0.4.0
type UnauthenticatedPlaintextConfig struct {
Use bool `yaml:"use"`
}
type UnauthenticatedTLSConfig ¶ added in v0.4.0
type UnauthenticatedTLSConfig struct {
Use bool `yaml:"use"`
}