Documentation ¶
Index ¶
- Constants
- type AclOperationType
- type AclPatternType
- type AclPermissionType
- type AclResourceType
- type ConfigOp
- type ConfluentClusterClient
- func (c *ConfluentClusterClient) CreateAcl(acl *KafkaAclCreateReq) error
- func (c *ConfluentClusterClient) CreateTopic(req *TopicCreateReq) (*Topic, error)
- func (c *ConfluentClusterClient) DeleteAcl(acl *KafkaAcl) error
- func (c *ConfluentClusterClient) DeleteTopic(topicId string) error
- func (c *ConfluentClusterClient) GetConsumer(consumerGroupId, consumerId string) (*KafkaConsumer, error)
- func (c *ConfluentClusterClient) GetConsumerGroup(consumerGroupId string) (*KafkaConsumerGroup, error)
- func (c *ConfluentClusterClient) GetConsumerGroupLag(consumerGroupId string) (*KafkaConsumerGroupLag, error)
- func (c *ConfluentClusterClient) GetConsumerLag(consumerGroupId, topicName string, partitionId int) (*KafkaPartitionConsumerLag, error)
- func (c *ConfluentClusterClient) GetKafkaConfig(configName string) (*KafkaConfig, error)
- func (c *ConfluentClusterClient) GetPartition(topicName string, partitionId int) (*KafkaPartition, error)
- func (c *ConfluentClusterClient) GetTopic(topicId string) (*Topic, error)
- func (c *ConfluentClusterClient) GetTopicConfig(topicName, configName string) (*KafkaConfig, error)
- func (c *ConfluentClusterClient) ListConsumer(consumerGroupId string) (*KafkaConsumerList, error)
- func (c *ConfluentClusterClient) ListConsumerGroups(opt *common.PaginationOptions) (*KafkaConsumerGroupList, error)
- func (c *ConfluentClusterClient) ListConsumerLag(consumerGroupId string, opt *common.PaginationOptions) (*KafkaConsumerLagList, error)
- func (c *ConfluentClusterClient) ListKafkaConfigs(opt *common.PaginationOptions) (*KafkaConfigList, error)
- func (c *ConfluentClusterClient) ListPartitions(topicName string) (*KafkaPartitionList, error)
- func (c *ConfluentClusterClient) ListTopicConfigs(topicName string, opt *common.PaginationOptions) (*KafkaConfigList, error)
- func (c *ConfluentClusterClient) ListTopics(opts *common.PaginationOptions) (*TopicList, error)
- func (c *ConfluentClusterClient) ResetKafkaConfig(configName string) error
- func (c *ConfluentClusterClient) ResetTopicConfig(topicName, configName string) error
- func (c *ConfluentClusterClient) SearchAcls(qry *KafkaAclSearchQry) (*KafkaAclList, error)
- func (c *ConfluentClusterClient) UpdateKafkaConfig(configName string, req *KafkaConfigUpdateReq) error
- func (c *ConfluentClusterClient) UpdateKafkaConfigBatch(req *KafkaConfigUpdateBatch) error
- func (c *ConfluentClusterClient) UpdateTopicConfig(topicName, configName string, req *KafkaConfigUpdateReq) error
- func (c *ConfluentClusterClient) UpdateTopicConfigBatch(topicName string, req *KafkaConfigUpdateBatch) error
- type KafkaAcl
- type KafkaAclCreateReq
- type KafkaAclList
- type KafkaAclSearchQry
- type KafkaCluster
- type KafkaConfig
- type KafkaConfigList
- type KafkaConfigUpdateBatch
- type KafkaConfigUpdateItem
- type KafkaConfigUpdateReq
- type KafkaConsumer
- type KafkaConsumerGroup
- type KafkaConsumerGroupLag
- type KafkaConsumerGroupList
- type KafkaConsumerLag
- type KafkaConsumerLagList
- type KafkaConsumerList
- type KafkaPartition
- type KafkaPartitionConsumerLag
- type KafkaPartitionList
- type Resource
- type Topic
- type TopicCreateReq
- type TopicList
Constants ¶
View Source
const ( AclResourceTypeUnknown AclResourceType = "UNKNOWN" AclResourceTypeAny AclResourceType = "ANY" AclResourceTypeTopic AclResourceType = "TOPIC" AclResourceTypeGroup AclResourceType = "GROUP" AclResourceTypeCluster AclResourceType = "CLUSTER" AclResourceTypeTransactionalId AclResourceType = "TRANSACTIONAL_ID" AclResourceTypeDelegationToken AclResourceType = "DELEGATION_TOKEN" AclOperationTypeUnknown AclOperationType = "UNKNOWN" AclOperationTypeAny AclOperationType = "ANY" AclOperationTypeAll AclOperationType = "ALL" AclOperationTypeRead AclOperationType = "READ" AclOperationTypeWrite AclOperationType = "WRITE" AclOperationTypeCreate AclOperationType = "CREATE" AclOperationTypeDelete AclOperationType = "DELETE" AclOperationTypeAlter AclOperationType = "ALTER" AclOperationTypeDescribe AclOperationType = "DESCRIBE" AclOperationTypeClusterAction AclOperationType = "CLUSTER_ACTION" AclOperationTypeDescribeConfigs AclOperationType = "DESCRIBE_CONFIGS" AclOperationTypeAlterConfigs AclOperationType = "ALTER_CONFIGS" AclOperationTypeIdempotentWrite AclOperationType = "IDEMPOTENT_WRITE" AclPermissionTypeUnknown AclPermissionType = "UNKNOWN" AclPermissionTypeAllow AclPermissionType = "ALLOW" AclPermissionTypeDeny AclPermissionType = "DENY" AclPermissionTypeAny AclPermissionType = "ANY" AclPatternTypeUnknown AclPatternType = "UNKNOWN" AclPatternTypeLiteral AclPatternType = "LITERAL" AclPatternTypePrefixed AclPatternType = "PREFIXED" AclPatternTypeMatch AclPatternType = "MATCH" AclPatternTypeAny AclPatternType = "ANY" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AclOperationType ¶
type AclOperationType string
type AclPatternType ¶
type AclPatternType string
type AclPermissionType ¶
type AclPermissionType string
type AclResourceType ¶
type AclResourceType string
type ConfluentClusterClient ¶
type ConfluentClusterClient struct { BaseUrl string ClusterId string // contains filtered or unexported fields }
func NewClusterClient ¶
func NewClusterClient(user, password, clusterId, clusterUrl string) (*ConfluentClusterClient, error)
func (*ConfluentClusterClient) CreateAcl ¶
func (c *ConfluentClusterClient) CreateAcl(acl *KafkaAclCreateReq) error
func (*ConfluentClusterClient) CreateTopic ¶
func (c *ConfluentClusterClient) CreateTopic(req *TopicCreateReq) (*Topic, error)
func (*ConfluentClusterClient) DeleteAcl ¶
func (c *ConfluentClusterClient) DeleteAcl(acl *KafkaAcl) error
func (*ConfluentClusterClient) DeleteTopic ¶
func (c *ConfluentClusterClient) DeleteTopic(topicId string) error
func (*ConfluentClusterClient) GetConsumer ¶
func (c *ConfluentClusterClient) GetConsumer(consumerGroupId, consumerId string) (*KafkaConsumer, error)
func (*ConfluentClusterClient) GetConsumerGroup ¶
func (c *ConfluentClusterClient) GetConsumerGroup(consumerGroupId string) (*KafkaConsumerGroup, error)
func (*ConfluentClusterClient) GetConsumerGroupLag ¶
func (c *ConfluentClusterClient) GetConsumerGroupLag(consumerGroupId string) (*KafkaConsumerGroupLag, error)
func (*ConfluentClusterClient) GetConsumerLag ¶
func (c *ConfluentClusterClient) GetConsumerLag(consumerGroupId, topicName string, partitionId int) (*KafkaPartitionConsumerLag, error)
func (*ConfluentClusterClient) GetKafkaConfig ¶
func (c *ConfluentClusterClient) GetKafkaConfig(configName string) (*KafkaConfig, error)
func (*ConfluentClusterClient) GetPartition ¶
func (c *ConfluentClusterClient) GetPartition(topicName string, partitionId int) (*KafkaPartition, error)
func (*ConfluentClusterClient) GetTopic ¶
func (c *ConfluentClusterClient) GetTopic(topicId string) (*Topic, error)
func (*ConfluentClusterClient) GetTopicConfig ¶
func (c *ConfluentClusterClient) GetTopicConfig(topicName, configName string) (*KafkaConfig, error)
func (*ConfluentClusterClient) ListConsumer ¶
func (c *ConfluentClusterClient) ListConsumer(consumerGroupId string) (*KafkaConsumerList, error)
func (*ConfluentClusterClient) ListConsumerGroups ¶
func (c *ConfluentClusterClient) ListConsumerGroups(opt *common.PaginationOptions) (*KafkaConsumerGroupList, error)
func (*ConfluentClusterClient) ListConsumerLag ¶
func (c *ConfluentClusterClient) ListConsumerLag(consumerGroupId string, opt *common.PaginationOptions) (*KafkaConsumerLagList, error)
func (*ConfluentClusterClient) ListKafkaConfigs ¶
func (c *ConfluentClusterClient) ListKafkaConfigs(opt *common.PaginationOptions) (*KafkaConfigList, error)
func (*ConfluentClusterClient) ListPartitions ¶
func (c *ConfluentClusterClient) ListPartitions(topicName string) (*KafkaPartitionList, error)
func (*ConfluentClusterClient) ListTopicConfigs ¶
func (c *ConfluentClusterClient) ListTopicConfigs(topicName string, opt *common.PaginationOptions) (*KafkaConfigList, error)
func (*ConfluentClusterClient) ListTopics ¶
func (c *ConfluentClusterClient) ListTopics(opts *common.PaginationOptions) (*TopicList, error)
func (*ConfluentClusterClient) ResetKafkaConfig ¶
func (c *ConfluentClusterClient) ResetKafkaConfig(configName string) error
func (*ConfluentClusterClient) ResetTopicConfig ¶
func (c *ConfluentClusterClient) ResetTopicConfig(topicName, configName string) error
func (*ConfluentClusterClient) SearchAcls ¶
func (c *ConfluentClusterClient) SearchAcls(qry *KafkaAclSearchQry) (*KafkaAclList, error)
func (*ConfluentClusterClient) UpdateKafkaConfig ¶
func (c *ConfluentClusterClient) UpdateKafkaConfig(configName string, req *KafkaConfigUpdateReq) error
func (*ConfluentClusterClient) UpdateKafkaConfigBatch ¶
func (c *ConfluentClusterClient) UpdateKafkaConfigBatch(req *KafkaConfigUpdateBatch) error
func (*ConfluentClusterClient) UpdateTopicConfig ¶
func (c *ConfluentClusterClient) UpdateTopicConfig(topicName, configName string, req *KafkaConfigUpdateReq) error
func (*ConfluentClusterClient) UpdateTopicConfigBatch ¶
func (c *ConfluentClusterClient) UpdateTopicConfigBatch(topicName string, req *KafkaConfigUpdateBatch) error
type KafkaAcl ¶
type KafkaAcl struct { common.BaseModel ClusterId string `json:"cluster_id,omitempty" url:"-"` ResourceType AclResourceType `json:"resource_type,omitempty" url:"resource_type,omitempty"` ResourceName string `json:"resource_name,omitempty" url:"resource_name,omitempty"` PatternType AclPatternType `json:"pattern_type,omitempty" url:"pattern_type,omitempty"` Principal string `json:"principal,omitempty" url:"principal,omitempty"` Host string `json:"host,omitempty" url:"host,omitempty"` Operation AclOperationType `json:"operation,omitempty" url:"operation,omitempty"` Permission AclPermissionType `json:"permission,omitempty" url:"permission,omitempty"` }
type KafkaAclCreateReq ¶ added in v0.1.4
type KafkaAclCreateReq struct { ResourceType AclResourceType `json:"resource_type,omitempty"` ResourceName string `json:"resource_name,omitempty"` PatternType AclPatternType `json:"pattern_type,omitempty"` Principal string `json:"principal,omitempty"` Host string `json:"host,omitempty"` Operation AclOperationType `json:"operation,omitempty"` Permission AclPermissionType `json:"permission,omitempty"` }
type KafkaAclList ¶
type KafkaAclSearchQry ¶
type KafkaAclSearchQry struct { common.PaginationOptions ResourceType AclResourceType `url:"resource_type,omitempty"` ResourceName string `url:"resource_name,omitempty"` Principal string `url:"principal,omitempty"` Host string `url:"host,omitempty"` Operation AclOperationType `url:"operation,omitempty"` Permission AclPermissionType `url:"permission,omitempty"` PatternType AclPatternType `url:"pattern_type,omitempty"` }
type KafkaCluster ¶
type KafkaCluster struct { common.BaseModel ClusterId string `json:"cluster_id"` Controller *Resource `json:"controller"` Acls *Resource `json:"acls"` Brokers *Resource `json:"brokers"` BrokerConfigs *Resource `json:"broker_configs"` ConsumerGroups *Resource `json:"consumer_groups"` Topics *Resource `json:"topics"` PartitionReassignments *Resource `json:"partition_reassignments"` }
type KafkaConfig ¶
type KafkaConfig struct { common.BaseModel ClusterId string `json:"cluster_id"` ToipcName string `json:"topic_name"` Name string `json:"name"` Value string `json:"value"` IsDefault bool `json:"is_default"` IsReadOnly bool `json:"is_read_only"` IsSensitive bool `json:"is_sensitive"` Source string `json:"source"` Synonyms []struct { Name string `json:"name"` Value string `json:"value"` Source string `json:"source"` } `json:"synonyms"` }
type KafkaConfigList ¶
type KafkaConfigList struct { common.BaseModel Data []KafkaConfig `json:"data"` }
type KafkaConfigUpdateBatch ¶
type KafkaConfigUpdateBatch struct {
Data []*KafkaConfigUpdateItem `json:"data"`
}
type KafkaConfigUpdateItem ¶ added in v0.1.3
type KafkaConfigUpdateReq ¶
type KafkaConfigUpdateReq struct {
Value string `json:"value"`
}
type KafkaConsumer ¶
type KafkaConsumerGroup ¶
type KafkaConsumerGroup struct { common.BaseModel ClusterId string `json:"cluster_id"` ConsumerGroupId string `json:"consumer_group_id"` IsSimple bool `json:"is_simple"` PartitionAssignor string `json:"partition_assignor"` State string `json:"state"` Coordinator Resource `json:"coordinator"` Consumers Resource `json:"consumers"` LagSummary Resource `json:"lag_summary"` }
type KafkaConsumerGroupLag ¶
type KafkaConsumerGroupLag struct { common.BaseModel ClusterId string `json:"cluster_id"` ConsumerGroupId string `json:"consumer_group_id"` MaxLagConsumerId string `json:"max_lag_consumer_id"` MaxLagInstanceId string `json:"max_lag_instance_id"` MaxLagClientId string `json:"max_lag_client_id"` MaxLagTopicName string `json:"max_lag_topic_name"` MaxLagPartitionId int `json:"max_lag_partition_id"` MaxLag int64 `json:"max_lag"` TotalLag int64 `json:"total_lag"` MaxLagConsumer Resource `json:"max_lag_consumer"` MaxLagPartition Resource `json:"max_lag_partition"` }
type KafkaConsumerGroupList ¶
type KafkaConsumerGroupList struct { common.BaseModel Data []KafkaConsumerGroup `json:"data"` }
type KafkaConsumerLag ¶
type KafkaConsumerLag struct { common.BaseModel ClusterId string `json:"cluster_id"` ConsumerGroupId string `json:"consumer_group_id"` TopicName string `json:"topic_name"` PartitionId int `json:"partition_id"` ConsumerId string `json:"consumer_id"` InstanceId string `json:"instance_id"` ClientId string `json:"client_id"` CurrentOffset int64 `json:"current_offset"` LogEndOffset int64 `json:"log_end_offset"` Lag int64 `json:"lag"` }
type KafkaConsumerLagList ¶
type KafkaConsumerLagList struct { common.BaseModel Data []KafkaConsumerLag `json:"data"` }
type KafkaConsumerList ¶
type KafkaConsumerList struct { common.BaseModel Data []KafkaConsumerGroup `json:"data"` }
type KafkaPartition ¶
type KafkaPartitionConsumerLag ¶
type KafkaPartitionConsumerLag struct { common.BaseModel ClusterId string `json:"cluster_id"` ConsumerGroupId string `json:"consumer_group_id"` TopicName string `json:"topic_name"` PartitionId int `json:"partition_id"` ConsumerId string `json:"consumer_id"` InstanceId string `json:"instance_id"` ClientId string `json:"client_id"` CurrentOffset int `json:"current_offset"` LogEndOffset int `json:"log_end_offset"` Lag int `json:"lag"` }
type KafkaPartitionList ¶
type KafkaPartitionList struct { common.BaseModel Data []KafkaPartition `json:"data"` }
type Topic ¶
type Topic struct { common.BaseModel ClusterId string `json:"cluster_id"` TopicName string `json:"topic_name"` IsInternal bool `json:"is_internal"` ReplicationFactor int `json:"replication_factor"` PartitionCount int `json:"partition_count"` Partitions Resource `json:"partitions"` Configs Resource `json:"configs"` PartitionReassignments Resource `json:"partition_reassignments"` }
type TopicCreateReq ¶
type TopicCreateReq struct { TopicName string `json:"topic_name,omitempty"` PartitionCount int `json:"partitions_count,omitempty"` ReplicationFactor int `json:"replication_factor,omitempty"` // ReplicasAssignment map[string][]int `json:"replicas_assignment"` TODO: implement this Configs []KafkaConfigUpdateItem `json:"configs,omitempty"` }
Click to show internal directories.
Click to hide internal directories.