Documentation
¶
Index ¶
- type AclDefinition
- type AclEntryGroup
- type AclEntryGroups
- type AclSpecDefinition
- type BrokerDefinition
- type BrokerSpecDefinition
- type BrokersDefinition
- type BrokersSpecDefinition
- type ConfigKey
- type ConfigSource
- type Configs
- type ConfigsMap
- type PartitionAssignments
- type PartitionRackAssignments
- type ResourceDefinition
- type ResourceMetadataDefinition
- type ResourceMetadataLabels
- type TopicDefinition
- type TopicSpecDefinition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AclDefinition ¶
type AclDefinition struct {
ResourceDefinition
Spec AclSpecDefinition `json:"spec"`
}
Top-level acl definition
func NewAclDefinition ¶
func NewAclDefinition( name string, resourceType string, acls AclEntryGroups, ) AclDefinition
Create a acl definition from metadata and config
func (AclDefinition) Copy ¶
func (a AclDefinition) Copy() AclDefinition
Create a copy of this AclDefinition
type AclEntryGroup ¶
type AclEntryGroup struct {
Principals []string `json:"principals"`
Hosts []string `json:"hosts"`
Operations []string `json:"operations"`
PermissionType string `json:"permissionType"`
}
Acl entry group
type AclEntryGroups ¶
type AclEntryGroups []AclEntryGroup
An array of acl entry groups
type AclSpecDefinition ¶
type AclSpecDefinition struct {
Acls AclEntryGroups `json:"acls,omitempty"`
DeleteUndefinedAcls bool `json:"deleteUndefinedAcls"`
}
Acl spec definition
type BrokerDefinition ¶
type BrokerDefinition struct {
ResourceDefinition
Spec BrokerSpecDefinition `json:"spec"`
}
Top-level broker definition
func NewBrokerDefinition ¶
func NewBrokerDefinition( name string, configsMap ConfigsMap, ) BrokerDefinition
Create a broker definition from metadata and config
func (BrokerDefinition) Copy ¶
func (b BrokerDefinition) Copy() BrokerDefinition
Create a copy of this BrokerDefinition
func (BrokerDefinition) ValidateWithMetadata ¶
func (b BrokerDefinition) ValidateWithMetadata(brokers meta.Brokers) error
Further validate definition using metadata
type BrokerSpecDefinition ¶
type BrokerSpecDefinition struct {
Configs ConfigsMap `json:"configs,omitempty"`
DeleteUndefinedConfigs bool `json:"deleteUndefinedConfigs"`
}
Broker spec definition
type BrokersDefinition ¶
type BrokersDefinition struct {
ResourceDefinition
Spec BrokersSpecDefinition `json:"spec"`
}
Top-level brokers definition
func NewBrokersDefinition ¶
func NewBrokersDefinition(configsMap ConfigsMap) BrokersDefinition
Create a brokers definition from metadata and config
func (BrokersDefinition) Copy ¶
func (b BrokersDefinition) Copy() BrokersDefinition
Create a copy of this BrokersDefinition
type BrokersSpecDefinition ¶
type BrokersSpecDefinition struct {
Configs ConfigsMap `json:"configs,omitempty"`
DeleteUndefinedConfigs bool `json:"deleteUndefinedConfigs"`
}
Brokers spec definition
type ConfigKey ¶
type ConfigKey struct {
Name string
Value *string
IsSensitive bool
ReadOnly bool
Source ConfigSource
}
A config key
type ConfigSource ¶
type ConfigSource int8
The source of a config key
const ( ConfigSourceUnknown ConfigSource = 0 ConfigSourceDynamicTopicConfig ConfigSource = 1 ConfigSourceDynamicBrokerConfig ConfigSource = 2 ConfigSourceDynamicDefaultBrokerConfig ConfigSource = 3 ConfigSourceStaticBrokerConfig ConfigSource = 4 ConfigSourceDefaultConfig ConfigSource = 5 ConfigSourceDynamicBrokerLoggerConfig ConfigSource = 6 )
Config sources
type Configs ¶
type Configs []ConfigKey
An array of ConfigKey
func (Configs) ToExportableMap ¶
func (c Configs) ToExportableMap() ConfigsMap
An exportable map of the configs (sensitive keys filtered out)
type ResourceDefinition ¶
type ResourceDefinition struct {
ApiVersion string `json:"apiVersion"`
Kind string `json:"kind"`
Metadata ResourceMetadataDefinition `json:"metadata"`
}
Top-level definition of a resource
func (ResourceDefinition) ValidateResource ¶
func (r ResourceDefinition) ValidateResource() error
Validate resource definition
type ResourceMetadataDefinition ¶
type ResourceMetadataDefinition struct {
Labels ResourceMetadataLabels `json:"labels,omitempty"`
Name string `json:"name"`
Type string `json:"type,omitempty"`
}
Resource metadata definition
type ResourceMetadataLabels ¶
Resource metadata labels
type TopicDefinition ¶
type TopicDefinition struct {
ResourceDefinition
Spec TopicSpecDefinition `json:"spec"`
}
Top-level topic definition
func NewTopicDefinition ¶
func NewTopicDefinition( name string, partitionAssignments PartitionAssignments, partitionRackAssignments PartitionRackAssignments, configsMap ConfigsMap, brokers meta.Brokers, includeAssignments bool, includeRackAssignments bool, ) TopicDefinition
Create a topic definition from metadata and config
func (TopicDefinition) Copy ¶
func (t TopicDefinition) Copy() TopicDefinition
Create a copy of this TopicDefinition
func (TopicDefinition) ValidateWithMetadata ¶
func (t TopicDefinition) ValidateWithMetadata(brokers meta.Brokers) error
Further validate definition using metadata
type TopicSpecDefinition ¶
type TopicSpecDefinition struct {
Configs ConfigsMap `json:"configs,omitempty"`
DeleteUndefinedConfigs bool `json:"deleteUndefinedConfigs"`
Partitions int `json:"partitions"`
ReplicationFactor int `json:"replicationFactor"`
Assignments PartitionAssignments `json:"assignments,omitempty"`
RackAssignments PartitionRackAssignments `json:"rackAssignments,omitempty"`
}
Topic spec definition
func (TopicSpecDefinition) HasAssignments ¶
func (s TopicSpecDefinition) HasAssignments() bool
Determine if a spec has assignments
func (TopicSpecDefinition) HasRackAssignments ¶
func (s TopicSpecDefinition) HasRackAssignments() bool
Determine if a spec has rack assignments