Documentation
¶
Index ¶
- Constants
- func ClassifyMirrorTopics(mirrors []MirrorTopic) (topicNames []string, inactiveTopics []string)
- func CountActiveMirrorTopics(mirrors []MirrorTopic) int
- func GetActiveTopicsWithZeroLag(mirrors []MirrorTopic) []string
- func HasActiveTopicsWithNonZeroLag(mirrors []MirrorTopic) bool
- type Config
- type ConfluentCloudService
- func (s *ConfluentCloudService) ListConfigs(ctx context.Context, config Config) (map[string]string, error)
- func (s *ConfluentCloudService) ListMirrorTopics(ctx context.Context, config Config) ([]MirrorTopic, error)
- func (s *ConfluentCloudService) PromoteMirrorTopics(ctx context.Context, config Config, topicNames []string) (*PromoteMirrorTopicsResponse, error)
- func (s *ConfluentCloudService) ValidateTopics(topics []string, clusterLinkTopics []string) error
- type HTTPClient
- type MirrorLag
- type MirrorTopic
- type PromoteMirrorTopicsResponse
- type Service
Constants ¶
const (
// Mirror topic status constants
MirrorStatusActive = "ACTIVE"
)
Variables ¶
This section is empty.
Functions ¶
func ClassifyMirrorTopics ¶
func ClassifyMirrorTopics(mirrors []MirrorTopic) (topicNames []string, inactiveTopics []string)
func CountActiveMirrorTopics ¶
func CountActiveMirrorTopics(mirrors []MirrorTopic) int
CountActiveMirrorTopics returns the count of active mirror topics
func GetActiveTopicsWithZeroLag ¶
func GetActiveTopicsWithZeroLag(mirrors []MirrorTopic) []string
GetActiveTopicsWithZeroLag returns topic names that are active and have zero lag across all partitions
func HasActiveTopicsWithNonZeroLag ¶
func HasActiveTopicsWithNonZeroLag(mirrors []MirrorTopic) bool
HasActiveTopicsWithNonZeroLag checks if there are any active topics with non-zero lag
Types ¶
type Config ¶
type Config struct {
RestEndpoint string
ClusterID string
LinkName string
APIKey string
APISecret string
Topics []string
}
Config holds cluster link configuration
type ConfluentCloudService ¶
type ConfluentCloudService struct {
// contains filtered or unexported fields
}
ConfluentCloudService implements cluster link operations using Confluent Cloud REST API
func NewConfluentCloudService ¶
func NewConfluentCloudService(httpClient HTTPClient) *ConfluentCloudService
NewConfluentCloudService creates a new cluster link service
func (*ConfluentCloudService) ListConfigs ¶
func (s *ConfluentCloudService) ListConfigs(ctx context.Context, config Config) (map[string]string, error)
ListConfigs retrieves cluster link configurations
func (*ConfluentCloudService) ListMirrorTopics ¶
func (s *ConfluentCloudService) ListMirrorTopics(ctx context.Context, config Config) ([]MirrorTopic, error)
func (*ConfluentCloudService) PromoteMirrorTopics ¶
func (s *ConfluentCloudService) PromoteMirrorTopics(ctx context.Context, config Config, topicNames []string) (*PromoteMirrorTopicsResponse, error)
PromoteMirrorTopics promotes the specified mirror topics
func (*ConfluentCloudService) ValidateTopics ¶
func (s *ConfluentCloudService) ValidateTopics(topics []string, clusterLinkTopics []string) error
ValidateTopics validates that all specified topics exist in cluster link
type HTTPClient ¶
HTTPClient interface for HTTP operations
type MirrorTopic ¶
type PromoteMirrorTopicsResponse ¶
type PromoteMirrorTopicsResponse struct {
Data []struct {
MirrorTopicName string `json:"mirror_topic_name"`
ErrorMessage string `json:"error_message,omitempty"`
ErrorCode int `json:"error_code,omitempty"`
} `json:"data"`
}
PromoteMirrorTopicsResponse represents the response from promoting mirror topics
type Service ¶
type Service interface {
ListMirrorTopics(ctx context.Context, config Config) ([]MirrorTopic, error)
ListConfigs(ctx context.Context, config Config) (map[string]string, error)
ValidateTopics(topics []string, clusterLinkTopics []string) error
PromoteMirrorTopics(ctx context.Context, config Config, topicNames []string) (*PromoteMirrorTopicsResponse, error)
}
Service defines cluster link operations