Documentation
¶
Overview ¶
Package admin implements the functions to call pulsar admin
Index ¶
- Constants
- func IsAlreadyExist(err error) bool
- func IsInternalServerError(err error) bool
- func IsNoSuchHostError(err error) bool
- func IsNotFound(err error) bool
- func IsPermissionNotFound(err error) bool
- func MakeCompleteTopicName(topicName string, persistent *bool) string
- type ClusterParams
- type DummyPulsarAdmin
- func (d *DummyPulsarAdmin) ApplyNamespace(string, *NamespaceParams) error
- func (d *DummyPulsarAdmin) ApplyPulsarFunction(_, _, _, _ string, _ *v1alpha1.PulsarFunctionSpec, _ bool) error
- func (d *DummyPulsarAdmin) ApplyPulsarPackage(_, _, _, _ string, _ map[string]string, _ bool) error
- func (d *DummyPulsarAdmin) ApplyPulsarSink(_, _, _, _ string, _ *v1alpha1.PulsarSinkSpec, _ bool) error
- func (d *DummyPulsarAdmin) ApplyPulsarSource(_, _, _, _ string, _ *v1alpha1.PulsarSourceSpec, _ bool) error
- func (d *DummyPulsarAdmin) ApplyTenant(string, *TenantParams) error
- func (d *DummyPulsarAdmin) ApplyTopic(string, *TopicParams) (error, error)
- func (d *DummyPulsarAdmin) CheckClusterExist(string) (bool, error)
- func (d *DummyPulsarAdmin) CheckPulsarFunctionExist(_, _, _ string) (bool, error)
- func (d *DummyPulsarAdmin) CheckPulsarPackageExist(_ string) (bool, error)
- func (d *DummyPulsarAdmin) CheckPulsarSinkExist(_, _, _ string) (bool, error)
- func (d *DummyPulsarAdmin) CheckPulsarSourceExist(_, _, _ string) (bool, error)
- func (d *DummyPulsarAdmin) Close() error
- func (d *DummyPulsarAdmin) CreateCluster(string, *ClusterParams) error
- func (d *DummyPulsarAdmin) CreateNSIsolationPolicy(policyName, clusterName string, policyData utils.NamespaceIsolationData) error
- func (d *DummyPulsarAdmin) DeleteCluster(string) error
- func (d *DummyPulsarAdmin) DeleteNSIsolationPolicy(policyName, clusterName string) error
- func (d *DummyPulsarAdmin) DeleteNamespace(string) error
- func (d *DummyPulsarAdmin) DeletePulsarFunction(_, _, _ string) error
- func (d *DummyPulsarAdmin) DeletePulsarPackage(_ string) error
- func (d *DummyPulsarAdmin) DeletePulsarSink(_, _, _ string) error
- func (d *DummyPulsarAdmin) DeletePulsarSource(_, _, _ string) error
- func (d *DummyPulsarAdmin) DeleteSchema(string) error
- func (d *DummyPulsarAdmin) DeleteTenant(string) error
- func (d *DummyPulsarAdmin) DeleteTopic(string) error
- func (d *DummyPulsarAdmin) GetNSIsolationPolicy(policyName, clusterName string) (*utils.NamespaceIsolationData, error)
- func (d *DummyPulsarAdmin) GetNamespaceClusters(string) ([]string, error)
- func (d *DummyPulsarAdmin) GetNamespacePermissions(string) (map[string][]utils.AuthAction, error)
- func (d *DummyPulsarAdmin) GetPulsarPackageMetadata(packageURL string) (*utils.PackageMetadata, error)
- func (d *DummyPulsarAdmin) GetSchema(string) (*v1alpha1.SchemaInfo, error)
- func (d *DummyPulsarAdmin) GetTenantAllowedClusters(_ string) ([]string, error)
- func (d *DummyPulsarAdmin) GetTopicClusters(string, *bool) ([]string, error)
- func (d *DummyPulsarAdmin) GetTopicPermissions(string) (map[string][]utils.AuthAction, error)
- func (d *DummyPulsarAdmin) GrantPermissions(Permissioner) error
- func (d *DummyPulsarAdmin) RemoveTopicAutoSubscriptionCreation(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicBacklogQuota(string, *bool, string) error
- func (d *DummyPulsarAdmin) RemoveTopicCompactionThreshold(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicDeduplicationSnapshotInterval(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicDeduplicationStatus(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicDelayedDelivery(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicDispatchRate(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicInactiveTopicPolicies(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicMaxConsumers(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicMaxConsumersPerSubscription(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicMaxMessageSize(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicMaxProducers(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicMaxSubscriptionsPerTopic(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicMaxUnackedMessagesPerConsumer(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicMaxUnackedMessagesPerSubscription(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicMessageTTL(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicOffloadPolicies(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicPersistence(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicProperty(string, *bool, string) error
- func (d *DummyPulsarAdmin) RemoveTopicPublishRate(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicReplicatorDispatchRate(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicRetention(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicSchemaCompatibilityStrategy(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicSchemaValidationEnforced(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicSubscribeRate(string, *bool) error
- func (d *DummyPulsarAdmin) RemoveTopicSubscriptionDispatchRate(string, *bool) error
- func (d *DummyPulsarAdmin) RevokePermissions(Permissioner) error
- func (d *DummyPulsarAdmin) SetNamespaceClusters(string, []string) error
- func (d *DummyPulsarAdmin) SetTopicClusters(string, *bool, []string) error
- func (d *DummyPulsarAdmin) SetTopicCompactionThreshold(string, *bool, int64) error
- func (d *DummyPulsarAdmin) UpdateCluster(string, *ClusterParams) error
- func (d *DummyPulsarAdmin) UploadSchema(string, *SchemaParams) error
- type NamespaceParams
- type NamespacePermission
- type Permissioner
- type PulsarAdmin
- type PulsarAdminClient
- func (p *PulsarAdminClient) ApplyNamespace(name string, params *NamespaceParams) error
- func (p *PulsarAdminClient) ApplyPulsarFunction(tenant, namespace, name, packageURL string, param *v1alpha1.PulsarFunctionSpec, ...) error
- func (p *PulsarAdminClient) ApplyPulsarPackage(packageURL, filePath, description, contact string, ...) error
- func (p *PulsarAdminClient) ApplyPulsarSink(tenant, namespace, name, packageURL string, param *v1alpha1.PulsarSinkSpec, ...) error
- func (p *PulsarAdminClient) ApplyPulsarSource(tenant, namespace, name, packageURL string, param *v1alpha1.PulsarSourceSpec, ...) error
- func (p *PulsarAdminClient) ApplyTenant(name string, params *TenantParams) error
- func (p *PulsarAdminClient) ApplyTopic(name string, params *TopicParams) (creationErr error, policyErr error)
- func (p *PulsarAdminClient) CheckClusterExist(name string) (bool, error)
- func (p *PulsarAdminClient) CheckPulsarFunctionExist(tenant, namespace, name string) (bool, error)
- func (p *PulsarAdminClient) CheckPulsarPackageExist(packageURL string) (bool, error)
- func (p *PulsarAdminClient) CheckPulsarSinkExist(tenant, namespace, name string) (bool, error)
- func (p *PulsarAdminClient) CheckPulsarSourceExist(tenant, namespace, name string) (bool, error)
- func (p *PulsarAdminClient) Close() error
- func (p *PulsarAdminClient) CreateCluster(name string, param *ClusterParams) error
- func (p *PulsarAdminClient) CreateNSIsolationPolicy(policyName, clusterName string, policyData utils.NamespaceIsolationData) error
- func (p *PulsarAdminClient) DeleteCluster(name string) error
- func (p *PulsarAdminClient) DeleteNSIsolationPolicy(policyName, clusterName string) error
- func (p *PulsarAdminClient) DeleteNamespace(name string) error
- func (p *PulsarAdminClient) DeletePulsarFunction(tenant, namespace, name string) error
- func (p *PulsarAdminClient) DeletePulsarPackage(packageURL string) error
- func (p *PulsarAdminClient) DeletePulsarSink(tenant, namespace, name string) error
- func (p *PulsarAdminClient) DeletePulsarSource(tenant, namespace, name string) error
- func (p *PulsarAdminClient) DeleteSchema(topic string) error
- func (p *PulsarAdminClient) DeleteTenant(name string) error
- func (p *PulsarAdminClient) DeleteTopic(name string) error
- func (p *PulsarAdminClient) GetNSIsolationPolicy(policyName, clusterName string) (*utils.NamespaceIsolationData, error)
- func (p *PulsarAdminClient) GetNamespaceClusters(completeNSName string) ([]string, error)
- func (p *PulsarAdminClient) GetNamespacePermissions(namespaceName string) (map[string][]utils.AuthAction, error)
- func (p *PulsarAdminClient) GetPulsarPackageMetadata(packageURL string) (*utils.PackageMetadata, error)
- func (p *PulsarAdminClient) GetSchema(topic string) (*v1alpha1.SchemaInfo, error)
- func (p *PulsarAdminClient) GetTenantAllowedClusters(tenantName string) ([]string, error)
- func (p *PulsarAdminClient) GetTopicClusters(name string, persistent *bool) ([]string, error)
- func (p *PulsarAdminClient) GetTopicPermissions(topic string) (map[string][]utils.AuthAction, error)
- func (p *PulsarAdminClient) GrantPermissions(permission Permissioner) error
- func (p *PulsarAdminClient) RemoveTopicAutoSubscriptionCreation(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicBacklogQuota(name string, persistent *bool, quotaType string) error
- func (p *PulsarAdminClient) RemoveTopicCompactionThreshold(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicDeduplicationSnapshotInterval(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicDeduplicationStatus(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicDelayedDelivery(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicDispatchRate(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicInactiveTopicPolicies(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicMaxConsumers(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicMaxConsumersPerSubscription(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicMaxMessageSize(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicMaxProducers(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicMaxSubscriptionsPerTopic(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicMaxUnackedMessagesPerConsumer(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicMaxUnackedMessagesPerSubscription(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicMessageTTL(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicOffloadPolicies(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicPersistence(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicProperty(name string, persistent *bool, key string) error
- func (p *PulsarAdminClient) RemoveTopicPublishRate(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicReplicatorDispatchRate(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicRetention(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicSchemaCompatibilityStrategy(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicSchemaValidationEnforced(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicSubscribeRate(name string, persistent *bool) error
- func (p *PulsarAdminClient) RemoveTopicSubscriptionDispatchRate(name string, persistent *bool) error
- func (p *PulsarAdminClient) RevokePermissions(permission Permissioner) error
- func (p *PulsarAdminClient) SetNamespaceClusters(completeNSName string, clusters []string) error
- func (p *PulsarAdminClient) SetTopicClusters(name string, persistent *bool, clusters []string) error
- func (p *PulsarAdminClient) SetTopicCompactionThreshold(name string, persistent *bool, value int64) error
- func (p *PulsarAdminClient) UpdateCluster(name string, param *ClusterParams) error
- func (p *PulsarAdminClient) UploadSchema(topic string, params *SchemaParams) error
- type PulsarAdminConfig
- type PulsarAdminCreator
- type Reason
- type SchemaParams
- type TenantParams
- type TopicParams
- type TopicPermission
Constants ¶
const ( // TopicDomainSeparator is the separator to separate the topic name TopicDomainSeparator = "://" // TopicDomainPersistent is the prefix for persistent topic TopicDomainPersistent = "persistent" // TopicDomainNonPersistent is the prefix for non persistent topic TopicDomainNonPersistent = "non-persistent" )
Variables ¶
This section is empty.
Functions ¶
func IsAlreadyExist ¶
IsAlreadyExist returns true if the error indicates the resource already exist
func IsInternalServerError ¶
IsInternalServerError returns true if the error indicates the resource already exist
func IsNoSuchHostError ¶ added in v0.6.0
IsNoSuchHostError returns true if operator cannot connect the resource host
func IsNotFound ¶
IsNotFound returns true if the error indicates the resource is not found on server
func IsPermissionNotFound ¶
IsPermissionNotFound returns true if the permission is not set
func MakeCompleteTopicName ¶ added in v0.6.0
Types ¶
type ClusterParams ¶ added in v0.3.0
type ClusterParams struct {
ServiceURL string
ServiceSecureURL string
BrokerServiceURL string
BrokerServiceSecureURL string
AuthPlugin string
AuthParameters string
BrokerClientTrustCertsFilePath string
}
ClusterParams indicate the parameters for creating a cluster
type DummyPulsarAdmin ¶
type DummyPulsarAdmin struct {
}
DummyPulsarAdmin is a dummy struct of PulsarAdmin
func (*DummyPulsarAdmin) ApplyNamespace ¶
func (d *DummyPulsarAdmin) ApplyNamespace(string, *NamespaceParams) error
ApplyNamespace is a fake implements of ApplyNamespace
func (*DummyPulsarAdmin) ApplyPulsarFunction ¶ added in v0.5.0
func (d *DummyPulsarAdmin) ApplyPulsarFunction(_, _, _, _ string, _ *v1alpha1.PulsarFunctionSpec, _ bool) error
ApplyPulsarFunction is a fake implements of ApplyPulsarFunction
func (*DummyPulsarAdmin) ApplyPulsarPackage ¶ added in v0.5.0
ApplyPulsarPackage is a fake implements of ApplyPulsarPackage
func (*DummyPulsarAdmin) ApplyPulsarSink ¶ added in v0.5.0
func (d *DummyPulsarAdmin) ApplyPulsarSink(_, _, _, _ string, _ *v1alpha1.PulsarSinkSpec, _ bool) error
ApplyPulsarSink is a fake implements of ApplyPulsarSink
func (*DummyPulsarAdmin) ApplyPulsarSource ¶ added in v0.5.0
func (d *DummyPulsarAdmin) ApplyPulsarSource(_, _, _, _ string, _ *v1alpha1.PulsarSourceSpec, _ bool) error
ApplyPulsarSource is a fake implements of ApplyPulsarSource
func (*DummyPulsarAdmin) ApplyTenant ¶
func (d *DummyPulsarAdmin) ApplyTenant(string, *TenantParams) error
ApplyTenant is a fake implements of ApplyTenant
func (*DummyPulsarAdmin) ApplyTopic ¶
func (d *DummyPulsarAdmin) ApplyTopic(string, *TopicParams) (error, error)
ApplyTopic is a fake implements of ApplyTopic
func (*DummyPulsarAdmin) CheckClusterExist ¶ added in v0.3.0
func (d *DummyPulsarAdmin) CheckClusterExist(string) (bool, error)
CheckClusterExist checks whether the cluster exists
func (*DummyPulsarAdmin) CheckPulsarFunctionExist ¶ added in v0.5.1
func (d *DummyPulsarAdmin) CheckPulsarFunctionExist(_, _, _ string) (bool, error)
CheckPulsarFunctionExist is a fake implements of CheckPulsarFunctionExist
func (*DummyPulsarAdmin) CheckPulsarPackageExist ¶ added in v0.5.1
func (d *DummyPulsarAdmin) CheckPulsarPackageExist(_ string) (bool, error)
CheckPulsarPackageExist is a fake implements of CheckPulsarPackageExist
func (*DummyPulsarAdmin) CheckPulsarSinkExist ¶ added in v0.5.1
func (d *DummyPulsarAdmin) CheckPulsarSinkExist(_, _, _ string) (bool, error)
CheckPulsarSinkExist is a fake implements of CheckPulsarSinkExist
func (*DummyPulsarAdmin) CheckPulsarSourceExist ¶ added in v0.5.1
func (d *DummyPulsarAdmin) CheckPulsarSourceExist(_, _, _ string) (bool, error)
CheckPulsarSourceExist is a fake implements of CheckPulsarSourceExist
func (*DummyPulsarAdmin) Close ¶
func (d *DummyPulsarAdmin) Close() error
Close is a fake implements of Close
func (*DummyPulsarAdmin) CreateCluster ¶ added in v0.3.0
func (d *DummyPulsarAdmin) CreateCluster(string, *ClusterParams) error
CreateCluster is a fake implements of CreateCluster
func (*DummyPulsarAdmin) CreateNSIsolationPolicy ¶ added in v0.6.3
func (d *DummyPulsarAdmin) CreateNSIsolationPolicy(policyName, clusterName string, policyData utils.NamespaceIsolationData) error
func (*DummyPulsarAdmin) DeleteCluster ¶ added in v0.3.0
func (d *DummyPulsarAdmin) DeleteCluster(string) error
DeleteCluster is a fake implements of DeleteCluster
func (*DummyPulsarAdmin) DeleteNSIsolationPolicy ¶ added in v0.6.3
func (d *DummyPulsarAdmin) DeleteNSIsolationPolicy(policyName, clusterName string) error
func (*DummyPulsarAdmin) DeleteNamespace ¶
func (d *DummyPulsarAdmin) DeleteNamespace(string) error
DeleteNamespace is a fake implements of DeleteNamespace
func (*DummyPulsarAdmin) DeletePulsarFunction ¶ added in v0.5.0
func (d *DummyPulsarAdmin) DeletePulsarFunction(_, _, _ string) error
DeletePulsarFunction is a fake implements of DeletePulsarFunction
func (*DummyPulsarAdmin) DeletePulsarPackage ¶ added in v0.5.0
func (d *DummyPulsarAdmin) DeletePulsarPackage(_ string) error
DeletePulsarPackage is a fake implements of DeletePulsarPackage
func (*DummyPulsarAdmin) DeletePulsarSink ¶ added in v0.5.0
func (d *DummyPulsarAdmin) DeletePulsarSink(_, _, _ string) error
DeletePulsarSink is a fake implements of DeletePulsarSink
func (*DummyPulsarAdmin) DeletePulsarSource ¶ added in v0.5.0
func (d *DummyPulsarAdmin) DeletePulsarSource(_, _, _ string) error
DeletePulsarSource is a fake implements of DeletePulsarSource
func (*DummyPulsarAdmin) DeleteSchema ¶ added in v0.2.0
func (d *DummyPulsarAdmin) DeleteSchema(string) error
DeleteSchema is a fake implements of DeleteSchema
func (*DummyPulsarAdmin) DeleteTenant ¶
func (d *DummyPulsarAdmin) DeleteTenant(string) error
DeleteTenant is a fake implements of DeleteTenant
func (*DummyPulsarAdmin) DeleteTopic ¶
func (d *DummyPulsarAdmin) DeleteTopic(string) error
DeleteTopic is a fake implements of DeleteTopic
func (*DummyPulsarAdmin) GetNSIsolationPolicy ¶ added in v0.6.3
func (d *DummyPulsarAdmin) GetNSIsolationPolicy(policyName, clusterName string) (*utils.NamespaceIsolationData, error)
func (*DummyPulsarAdmin) GetNamespaceClusters ¶ added in v0.3.0
func (d *DummyPulsarAdmin) GetNamespaceClusters(string) ([]string, error)
GetNamespaceClusters is a fake implements of GetNamespaceClusters
func (*DummyPulsarAdmin) GetNamespacePermissions ¶ added in v0.10.0
func (d *DummyPulsarAdmin) GetNamespacePermissions(string) (map[string][]utils.AuthAction, error)
GetNamespacePermissions is a fake implements of GetNamespacePermissions
func (*DummyPulsarAdmin) GetPulsarPackageMetadata ¶ added in v0.9.1
func (d *DummyPulsarAdmin) GetPulsarPackageMetadata(packageURL string) (*utils.PackageMetadata, error)
func (*DummyPulsarAdmin) GetSchema ¶ added in v0.2.0
func (d *DummyPulsarAdmin) GetSchema(string) (*v1alpha1.SchemaInfo, error)
GetSchema is a fake implements of GetSchema
func (*DummyPulsarAdmin) GetTenantAllowedClusters ¶ added in v0.5.7
func (d *DummyPulsarAdmin) GetTenantAllowedClusters(_ string) ([]string, error)
GetTenantAllowedClusters is a fake implements of GetTenantAllowedClusters
func (*DummyPulsarAdmin) GetTopicClusters ¶ added in v0.3.0
func (d *DummyPulsarAdmin) GetTopicClusters(string, *bool) ([]string, error)
GetTopicClusters is a fake implements of GetTopicClusters
func (*DummyPulsarAdmin) GetTopicPermissions ¶ added in v0.10.0
func (d *DummyPulsarAdmin) GetTopicPermissions(string) (map[string][]utils.AuthAction, error)
GetTopicPermissions is a fake implements of GetTopicPermissions
func (*DummyPulsarAdmin) GrantPermissions ¶
func (d *DummyPulsarAdmin) GrantPermissions(Permissioner) error
GrantPermissions is a fake implements of GrantPermissions
func (*DummyPulsarAdmin) RemoveTopicAutoSubscriptionCreation ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicAutoSubscriptionCreation(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicBacklogQuota ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicBacklogQuota(string, *bool, string) error
func (*DummyPulsarAdmin) RemoveTopicCompactionThreshold ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicCompactionThreshold(string, *bool) error
RemoveTopicCompactionThreshold is a fake implementation of RemoveTopicCompactionThreshold
func (*DummyPulsarAdmin) RemoveTopicDeduplicationSnapshotInterval ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicDeduplicationSnapshotInterval(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicDeduplicationStatus ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicDeduplicationStatus(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicDelayedDelivery ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicDelayedDelivery(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicDispatchRate ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicDispatchRate(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicInactiveTopicPolicies ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicInactiveTopicPolicies(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicMaxConsumers ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicMaxConsumers(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicMaxConsumersPerSubscription ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicMaxConsumersPerSubscription(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicMaxMessageSize ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicMaxMessageSize(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicMaxProducers ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicMaxProducers(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicMaxSubscriptionsPerTopic ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicMaxSubscriptionsPerTopic(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicMaxUnackedMessagesPerConsumer ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicMaxUnackedMessagesPerConsumer(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicMaxUnackedMessagesPerSubscription ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicMaxUnackedMessagesPerSubscription(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicMessageTTL ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicMessageTTL(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicOffloadPolicies ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicOffloadPolicies(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicPersistence ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicPersistence(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicProperty ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicProperty(string, *bool, string) error
func (*DummyPulsarAdmin) RemoveTopicPublishRate ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicPublishRate(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicReplicatorDispatchRate ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicReplicatorDispatchRate(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicRetention ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicRetention(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicSchemaCompatibilityStrategy ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicSchemaCompatibilityStrategy(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicSchemaValidationEnforced ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicSchemaValidationEnforced(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicSubscribeRate ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicSubscribeRate(string, *bool) error
func (*DummyPulsarAdmin) RemoveTopicSubscriptionDispatchRate ¶ added in v0.15.0
func (d *DummyPulsarAdmin) RemoveTopicSubscriptionDispatchRate(string, *bool) error
func (*DummyPulsarAdmin) RevokePermissions ¶
func (d *DummyPulsarAdmin) RevokePermissions(Permissioner) error
RevokePermissions is a fake implements of RevokePermissions
func (*DummyPulsarAdmin) SetNamespaceClusters ¶ added in v0.3.0
func (d *DummyPulsarAdmin) SetNamespaceClusters(string, []string) error
SetNamespaceClusters is a fake implements of SetNamespaceClusters
func (*DummyPulsarAdmin) SetTopicClusters ¶ added in v0.3.0
func (d *DummyPulsarAdmin) SetTopicClusters(string, *bool, []string) error
SetTopicClusters is a fake implements of SetTopicClusters
func (*DummyPulsarAdmin) SetTopicCompactionThreshold ¶ added in v0.15.0
func (d *DummyPulsarAdmin) SetTopicCompactionThreshold(string, *bool, int64) error
SetTopicCompactionThreshold is a fake implementation of SetTopicCompactionThreshold
func (*DummyPulsarAdmin) UpdateCluster ¶ added in v0.3.0
func (d *DummyPulsarAdmin) UpdateCluster(string, *ClusterParams) error
UpdateCluster is a fake implements of UpdateCluster
func (*DummyPulsarAdmin) UploadSchema ¶ added in v0.2.0
func (d *DummyPulsarAdmin) UploadSchema(string, *SchemaParams) error
UploadSchema is a fake implements of UploadSchema
type NamespaceParams ¶
type NamespaceParams struct {
Bundles *int32
MaxProducersPerTopic *int32
MaxConsumersPerTopic *int32
MaxConsumersPerSubscription *int32
MessageTTL *utils.Duration
RetentionTime *utils.Duration
RetentionSize *resource.Quantity
BacklogQuotaLimitTime *utils.Duration
BacklogQuotaLimitSize *resource.Quantity
BacklogQuotaRetentionPolicy *string
BacklogQuotaType *string
OffloadThresholdTime *utils.Duration
OffloadThresholdSize *resource.Quantity
ReplicationClusters []string
Deduplication *bool
BookieAffinityGroup *v1alpha1.BookieAffinityGroupData
TopicAutoCreationConfig *v1alpha1.TopicAutoCreationConfig
SchemaCompatibilityStrategy *v1alpha1.SchemaCompatibilityStrategy
SchemaValidationEnforced *bool
DispatchRate *v1alpha1.DispatchRate
SubscriptionDispatchRate *v1alpha1.DispatchRate
ReplicatorDispatchRate *v1alpha1.DispatchRate
PublishRate *v1alpha1.PublishRate
SubscribeRate *v1alpha1.SubscribeRate
PersistencePolicies *v1alpha1.PersistencePolicies
CompactionThreshold *int64
InactiveTopicPolicies *v1alpha1.InactiveTopicPolicies
SubscriptionExpirationTime *utils.Duration
Properties map[string]string
IsAllowAutoUpdateSchema *bool
ValidateProducerName *bool
EncryptionRequired *bool
SubscriptionAuthMode *utils2.SubscriptionAuthMode
AntiAffinityGroup *string
SchemaAutoUpdateCompatibilityStrategy *utils2.SchemaAutoUpdateCompatibilityStrategy
}
NamespaceParams indicates the parameters for creating a namespace
type NamespacePermission ¶
NamespacePermission is the parameters to grant permission for a namespace
type Permissioner ¶
type Permissioner interface {
// Grant grants permission to role on a resource
Grant(client admin.Client) error
// Revoke revokes permission from role on a resource
Revoke(client admin.Client) error
}
Permissioner implements the functions to grant and revoke permission for namespace and topic
type PulsarAdmin ¶
type PulsarAdmin interface {
// ApplyTenant creates or updates a tenant with parameters
ApplyTenant(name string, params *TenantParams) error
// DeleteTenant delete a specific tenant
DeleteTenant(name string) error
// ApplyNamespace creates a namespace with parameters
ApplyNamespace(name string, params *NamespaceParams) error
// DeleteNamespace delete a specific namespace
DeleteNamespace(name string) error
// GetNamespaceClusters get the assigned clusters of the namespace to the local default cluster
GetNamespaceClusters(completeNSName string) ([]string, error)
// SetNamespaceClusters resets the assigned clusters of the namespace to the local default cluster
SetNamespaceClusters(name string, clusters []string) error
// ApplyTopic creates a topic with parameters
ApplyTopic(name string, params *TopicParams) (error, error)
// DeleteTopic delete a specific topic
DeleteTopic(name string) error
// GetTopicClusters get the assigned clusters of the topic to the local default cluster
GetTopicClusters(name string, persistent *bool) ([]string, error)
// SetTopicClusters resets the assigned clusters of the topic to the local default cluster
SetTopicClusters(name string, persistent *bool, clusters []string) error
// SetTopicCompactionThreshold sets the compaction threshold for a topic
SetTopicCompactionThreshold(name string, persistent *bool, value int64) error
// RemoveTopicCompactionThreshold removes the compaction threshold from a topic
RemoveTopicCompactionThreshold(name string, persistent *bool) error
// RemoveTopicMessageTTL removes the message TTL policy for a topic
RemoveTopicMessageTTL(name string, persistent *bool) error
// RemoveTopicMaxProducers removes the max producers limit for a topic
RemoveTopicMaxProducers(name string, persistent *bool) error
// RemoveTopicMaxConsumers removes the max consumers limit for a topic
RemoveTopicMaxConsumers(name string, persistent *bool) error
// RemoveTopicMaxUnackedMessagesPerConsumer removes the max unacked messages per consumer limit
RemoveTopicMaxUnackedMessagesPerConsumer(name string, persistent *bool) error
// RemoveTopicMaxUnackedMessagesPerSubscription removes the max unacked messages per subscription limit
RemoveTopicMaxUnackedMessagesPerSubscription(name string, persistent *bool) error
// RemoveTopicRetention removes the retention policy for a topic
RemoveTopicRetention(name string, persistent *bool) error
// RemoveTopicBacklogQuota removes a backlog quota policy from a topic
RemoveTopicBacklogQuota(name string, persistent *bool, quotaType string) error
// RemoveTopicDeduplicationStatus removes the deduplication status policy from a topic
RemoveTopicDeduplicationStatus(name string, persistent *bool) error
// RemoveTopicPersistence removes persistence policies from a topic
RemoveTopicPersistence(name string, persistent *bool) error
// RemoveTopicDelayedDelivery removes delayed delivery policy from a topic
RemoveTopicDelayedDelivery(name string, persistent *bool) error
// RemoveTopicDispatchRate removes dispatch rate policy from a topic
RemoveTopicDispatchRate(name string, persistent *bool) error
// RemoveTopicPublishRate removes publish rate policy from a topic
RemoveTopicPublishRate(name string, persistent *bool) error
// RemoveTopicInactiveTopicPolicies removes inactive topic policies from a topic
RemoveTopicInactiveTopicPolicies(name string, persistent *bool) error
// RemoveTopicSubscribeRate removes subscribe rate policy from a topic
RemoveTopicSubscribeRate(name string, persistent *bool) error
// RemoveTopicMaxMessageSize removes max message size policy from a topic
RemoveTopicMaxMessageSize(name string, persistent *bool) error
// RemoveTopicMaxConsumersPerSubscription removes max consumers per subscription policy from a topic
RemoveTopicMaxConsumersPerSubscription(name string, persistent *bool) error
// RemoveTopicMaxSubscriptionsPerTopic removes max subscriptions per topic policy
RemoveTopicMaxSubscriptionsPerTopic(name string, persistent *bool) error
// RemoveTopicSchemaValidationEnforced removes schema validation enforced override
RemoveTopicSchemaValidationEnforced(name string, persistent *bool) error
// RemoveTopicSubscriptionDispatchRate removes subscription dispatch rate policy from a topic
RemoveTopicSubscriptionDispatchRate(name string, persistent *bool) error
// RemoveTopicReplicatorDispatchRate removes replicator dispatch rate policy from a topic
RemoveTopicReplicatorDispatchRate(name string, persistent *bool) error
// RemoveTopicDeduplicationSnapshotInterval removes deduplication snapshot interval policy from a topic
RemoveTopicDeduplicationSnapshotInterval(name string, persistent *bool) error
// RemoveTopicOffloadPolicies removes offload policies from a topic
RemoveTopicOffloadPolicies(name string, persistent *bool) error
// RemoveTopicAutoSubscriptionCreation removes auto subscription creation override for a topic
RemoveTopicAutoSubscriptionCreation(name string, persistent *bool) error
// RemoveTopicSchemaCompatibilityStrategy removes schema compatibility override for a topic
RemoveTopicSchemaCompatibilityStrategy(name string, persistent *bool) error
// RemoveTopicProperty removes a topic property
RemoveTopicProperty(name string, persistent *bool, key string) error
// GrantPermissions grants permissions to multiple role with multiple actions
// on a namespace or topic, each role will be granted the same actions
GrantPermissions(p Permissioner) error
// RevokePermissions revoke permissions from roles on a namespace or topic.
// it will revoke all actions which granted to a role on a namespace or topic
RevokePermissions(p Permissioner) error
// GetNamespacePermissions get permissions by namespace
GetNamespacePermissions(namespace string) (map[string][]utils2.AuthAction, error)
// GetTopicPermissions get permissions by topic
GetTopicPermissions(topic string) (map[string][]utils2.AuthAction, error)
// Close releases the connection with pulsar admin
Close() error
// GetSchema retrieves the latest schema of a topic
GetSchema(topic string) (*v1alpha1.SchemaInfo, error)
// UploadSchema creates or updates a schema for a given topic
UploadSchema(topic string, params *SchemaParams) error
// DeleteSchema deletes the schema associated with a given topic
DeleteSchema(topic string) error
// CreateCluster creates cluster info
CreateCluster(name string, param *ClusterParams) error
// UpdateCluster updates cluster info
UpdateCluster(name string, param *ClusterParams) error
// DeleteCluster delete cluster info
DeleteCluster(name string) error
// CheckClusterExist check whether the cluster is created or not
CheckClusterExist(name string) (bool, error)
// DeletePulsarPackage delete pulsar package
DeletePulsarPackage(packageURL string) error
// CheckPulsarPackageExist check whether the package is created or not
CheckPulsarPackageExist(packageURL string) (bool, error)
// ApplyPulsarPackage apply pulsar package
ApplyPulsarPackage(packageURL, filePath, description, contact string, properties map[string]string, changed bool) error
// DeletePulsarFunction delete pulsar function
DeletePulsarFunction(tenant, namespace, name string) error
// CheckPulsarFunctionExist check whether the function is created or not
CheckPulsarFunctionExist(tenant, namespace, name string) (bool, error)
// ApplyPulsarFunction apply pulsar function
ApplyPulsarFunction(tenant, namespace, name, packageURL string, param *v1alpha1.PulsarFunctionSpec, changed bool) error
// DeletePulsarSink delete pulsar sink
DeletePulsarSink(tenant, namespace, name string) error
// CheckPulsarSinkExist check whether the sink is created or not
CheckPulsarSinkExist(tenant, namespace, name string) (bool, error)
// ApplyPulsarSink apply pulsar sink
ApplyPulsarSink(tenant, namespace, name, packageURL string, param *v1alpha1.PulsarSinkSpec, changed bool) error
// DeletePulsarSource delete pulsar source
DeletePulsarSource(tenant, namespace, name string) error
// CheckPulsarSourceExist check whether the source is created or not
CheckPulsarSourceExist(tenant, namespace, name string) (bool, error)
// ApplyPulsarSource apply pulsar source
ApplyPulsarSource(tenant, namespace, name, packageURL string, param *v1alpha1.PulsarSourceSpec, changed bool) error
// GetTenantAllowedClusters get the allowed clusters of the tenant
GetTenantAllowedClusters(name string) ([]string, error)
// GetNSIsolationPolicy get the ns-isolation-policy
GetNSIsolationPolicy(policyName, clusterName string) (*utils2.NamespaceIsolationData, error)
// CreateNSIsolationPolicy create a ns-isolation-policy
CreateNSIsolationPolicy(policyName, clusterName string, policyData utils2.NamespaceIsolationData) error
// DeleteNSIsolationPolicy delete the ns-isolation-policy
DeleteNSIsolationPolicy(policyName, clusterName string) error
// GetPulsarPackageMetadata retrieves package information
GetPulsarPackageMetadata(packageURL string) (*utils2.PackageMetadata, error)
}
PulsarAdmin is the interface that defines the functions to call pulsar admin
func NewDummyPulsarAdmin ¶
func NewDummyPulsarAdmin(PulsarAdminConfig) (PulsarAdmin, error)
NewDummyPulsarAdmin is a dummy initialization function
func NewPulsarAdmin ¶
func NewPulsarAdmin(conf PulsarAdminConfig) (PulsarAdmin, error)
NewPulsarAdmin initialize a pulsar admin client with configuration
type PulsarAdminClient ¶
type PulsarAdminClient struct {
// contains filtered or unexported fields
}
PulsarAdminClient define the client to call pulsar
func (*PulsarAdminClient) ApplyNamespace ¶
func (p *PulsarAdminClient) ApplyNamespace(name string, params *NamespaceParams) error
ApplyNamespace creates a namespace with policies
func (*PulsarAdminClient) ApplyPulsarFunction ¶ added in v0.5.0
func (p *PulsarAdminClient) ApplyPulsarFunction(tenant, namespace, name, packageURL string, param *v1alpha1.PulsarFunctionSpec, changed bool) error
ApplyPulsarFunction creates or updates a pulsar function
func (*PulsarAdminClient) ApplyPulsarPackage ¶ added in v0.5.0
func (p *PulsarAdminClient) ApplyPulsarPackage(packageURL, filePath, description, contact string, properties map[string]string, changed bool) error
ApplyPulsarPackage creates or updates a pulsar package
func (*PulsarAdminClient) ApplyPulsarSink ¶ added in v0.5.0
func (p *PulsarAdminClient) ApplyPulsarSink(tenant, namespace, name, packageURL string, param *v1alpha1.PulsarSinkSpec, changed bool) error
ApplyPulsarSink creates or updates a pulsar sink
func (*PulsarAdminClient) ApplyPulsarSource ¶ added in v0.5.0
func (p *PulsarAdminClient) ApplyPulsarSource(tenant, namespace, name, packageURL string, param *v1alpha1.PulsarSourceSpec, changed bool) error
ApplyPulsarSource creates or updates a pulsar source
func (*PulsarAdminClient) ApplyTenant ¶
func (p *PulsarAdminClient) ApplyTenant(name string, params *TenantParams) error
ApplyTenant creates or updates a tenant, if AllowdClusters is not provided, it will list all clusters in pular When updates a tenant, If AdminRoles is empty, the current set of roles won't be modified
func (*PulsarAdminClient) ApplyTopic ¶
func (p *PulsarAdminClient) ApplyTopic(name string, params *TopicParams) (creationErr error, policyErr error)
ApplyTopic creates a topic with policies
func (*PulsarAdminClient) CheckClusterExist ¶ added in v0.3.0
func (p *PulsarAdminClient) CheckClusterExist(name string) (bool, error)
CheckClusterExist checks whether the cluster exists
func (*PulsarAdminClient) CheckPulsarFunctionExist ¶ added in v0.5.1
func (p *PulsarAdminClient) CheckPulsarFunctionExist(tenant, namespace, name string) (bool, error)
CheckPulsarFunctionExist check whether the function is created or not
func (*PulsarAdminClient) CheckPulsarPackageExist ¶ added in v0.5.1
func (p *PulsarAdminClient) CheckPulsarPackageExist(packageURL string) (bool, error)
CheckPulsarPackageExist check whether the package is created or not
func (*PulsarAdminClient) CheckPulsarSinkExist ¶ added in v0.5.1
func (p *PulsarAdminClient) CheckPulsarSinkExist(tenant, namespace, name string) (bool, error)
CheckPulsarSinkExist check whether the sink is created or not
func (*PulsarAdminClient) CheckPulsarSourceExist ¶ added in v0.5.1
func (p *PulsarAdminClient) CheckPulsarSourceExist(tenant, namespace, name string) (bool, error)
CheckPulsarSourceExist check whether the source is created or not
func (*PulsarAdminClient) Close ¶
func (p *PulsarAdminClient) Close() error
Close do nothing for now
func (*PulsarAdminClient) CreateCluster ¶ added in v0.3.0
func (p *PulsarAdminClient) CreateCluster(name string, param *ClusterParams) error
CreateCluster creates pulsar cluster
func (*PulsarAdminClient) CreateNSIsolationPolicy ¶ added in v0.6.3
func (p *PulsarAdminClient) CreateNSIsolationPolicy(policyName, clusterName string, policyData utils.NamespaceIsolationData) error
CreateNSIsolationPolicy create a ns-isolation-policy
func (*PulsarAdminClient) DeleteCluster ¶ added in v0.3.0
func (p *PulsarAdminClient) DeleteCluster(name string) error
DeleteCluster deletes a pulsar cluster
func (*PulsarAdminClient) DeleteNSIsolationPolicy ¶ added in v0.6.3
func (p *PulsarAdminClient) DeleteNSIsolationPolicy(policyName, clusterName string) error
DeleteNSIsolationPolicy delete the ns-isolation-policy
func (*PulsarAdminClient) DeleteNamespace ¶
func (p *PulsarAdminClient) DeleteNamespace(name string) error
DeleteNamespace deletes a specific namespace
func (*PulsarAdminClient) DeletePulsarFunction ¶ added in v0.5.0
func (p *PulsarAdminClient) DeletePulsarFunction(tenant, namespace, name string) error
DeletePulsarFunction deletes a pulsar function
func (*PulsarAdminClient) DeletePulsarPackage ¶ added in v0.5.0
func (p *PulsarAdminClient) DeletePulsarPackage(packageURL string) error
DeletePulsarPackage deletes a pulsar package
func (*PulsarAdminClient) DeletePulsarSink ¶ added in v0.5.0
func (p *PulsarAdminClient) DeletePulsarSink(tenant, namespace, name string) error
DeletePulsarSink deletes a pulsar sink
func (*PulsarAdminClient) DeletePulsarSource ¶ added in v0.5.0
func (p *PulsarAdminClient) DeletePulsarSource(tenant, namespace, name string) error
DeletePulsarSource deletes a pulsar source
func (*PulsarAdminClient) DeleteSchema ¶ added in v0.2.0
func (p *PulsarAdminClient) DeleteSchema(topic string) error
DeleteSchema deletes the schema associated with a given topic
func (*PulsarAdminClient) DeleteTenant ¶
func (p *PulsarAdminClient) DeleteTenant(name string) error
DeleteTenant deletes a specific tenant
func (*PulsarAdminClient) DeleteTopic ¶
func (p *PulsarAdminClient) DeleteTopic(name string) error
DeleteTopic deletes a specific topic
func (*PulsarAdminClient) GetNSIsolationPolicy ¶ added in v0.6.3
func (p *PulsarAdminClient) GetNSIsolationPolicy(policyName, clusterName string) (*utils.NamespaceIsolationData, error)
GetNSIsolationPolicy get the ns-isolation-policy
func (*PulsarAdminClient) GetNamespaceClusters ¶ added in v0.3.0
func (p *PulsarAdminClient) GetNamespaceClusters(completeNSName string) ([]string, error)
GetNamespaceClusters get the assigned clusters of the namespace to the local default cluster
func (*PulsarAdminClient) GetNamespacePermissions ¶ added in v0.10.0
func (p *PulsarAdminClient) GetNamespacePermissions(namespaceName string) (map[string][]utils.AuthAction, error)
GetNamespacePermissions retrieve permission by name
func (*PulsarAdminClient) GetPulsarPackageMetadata ¶ added in v0.9.1
func (p *PulsarAdminClient) GetPulsarPackageMetadata(packageURL string) (*utils.PackageMetadata, error)
GetPulsarPackageMetadata retrieves package information
func (*PulsarAdminClient) GetSchema ¶ added in v0.2.0
func (p *PulsarAdminClient) GetSchema(topic string) (*v1alpha1.SchemaInfo, error)
GetSchema get schema info for a given topic
func (*PulsarAdminClient) GetTenantAllowedClusters ¶ added in v0.5.7
func (p *PulsarAdminClient) GetTenantAllowedClusters(tenantName string) ([]string, error)
GetTenantAllowedClusters get the allowed clusters of the tenant
func (*PulsarAdminClient) GetTopicClusters ¶ added in v0.3.0
func (p *PulsarAdminClient) GetTopicClusters(name string, persistent *bool) ([]string, error)
GetTopicClusters get the assigned clusters of the topic to the local default cluster
func (*PulsarAdminClient) GetTopicPermissions ¶ added in v0.10.0
func (p *PulsarAdminClient) GetTopicPermissions(topic string) (map[string][]utils.AuthAction, error)
GetTopicPermissions retrieve permission by name
func (*PulsarAdminClient) GrantPermissions ¶
func (p *PulsarAdminClient) GrantPermissions(permission Permissioner) error
GrantPermissions grants permissions to multiple role with multiple actions on a namespace or topic, each role will be granted the same actions
func (*PulsarAdminClient) RemoveTopicAutoSubscriptionCreation ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicAutoSubscriptionCreation(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicBacklogQuota ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicBacklogQuota(name string, persistent *bool, quotaType string) error
func (*PulsarAdminClient) RemoveTopicCompactionThreshold ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicCompactionThreshold(name string, persistent *bool) error
RemoveTopicCompactionThreshold removes the compaction threshold from a topic.
func (*PulsarAdminClient) RemoveTopicDeduplicationSnapshotInterval ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicDeduplicationSnapshotInterval(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicDeduplicationStatus ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicDeduplicationStatus(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicDelayedDelivery ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicDelayedDelivery(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicDispatchRate ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicDispatchRate(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicInactiveTopicPolicies ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicInactiveTopicPolicies(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicMaxConsumers ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicMaxConsumers(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicMaxConsumersPerSubscription ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicMaxConsumersPerSubscription(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicMaxMessageSize ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicMaxMessageSize(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicMaxProducers ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicMaxProducers(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicMaxSubscriptionsPerTopic ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicMaxSubscriptionsPerTopic(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicMaxUnackedMessagesPerConsumer ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicMaxUnackedMessagesPerConsumer(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicMaxUnackedMessagesPerSubscription ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicMaxUnackedMessagesPerSubscription(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicMessageTTL ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicMessageTTL(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicOffloadPolicies ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicOffloadPolicies(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicPersistence ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicPersistence(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicProperty ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicProperty(name string, persistent *bool, key string) error
func (*PulsarAdminClient) RemoveTopicPublishRate ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicPublishRate(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicReplicatorDispatchRate ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicReplicatorDispatchRate(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicRetention ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicRetention(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicSchemaCompatibilityStrategy ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicSchemaCompatibilityStrategy(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicSchemaValidationEnforced ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicSchemaValidationEnforced(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicSubscribeRate ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicSubscribeRate(name string, persistent *bool) error
func (*PulsarAdminClient) RemoveTopicSubscriptionDispatchRate ¶ added in v0.15.0
func (p *PulsarAdminClient) RemoveTopicSubscriptionDispatchRate(name string, persistent *bool) error
func (*PulsarAdminClient) RevokePermissions ¶
func (p *PulsarAdminClient) RevokePermissions(permission Permissioner) error
RevokePermissions revoke permissions from roles on a namespace or topic. it will revoke all actions which granted to a role on a namespace or topic
func (*PulsarAdminClient) SetNamespaceClusters ¶ added in v0.3.0
func (p *PulsarAdminClient) SetNamespaceClusters(completeNSName string, clusters []string) error
SetNamespaceClusters resets the assigned clusters of the namespace to the local default cluster
func (*PulsarAdminClient) SetTopicClusters ¶ added in v0.3.0
func (p *PulsarAdminClient) SetTopicClusters(name string, persistent *bool, clusters []string) error
SetTopicClusters resets the assigned clusters of the topic to the local default cluster
func (*PulsarAdminClient) SetTopicCompactionThreshold ¶ added in v0.15.0
func (p *PulsarAdminClient) SetTopicCompactionThreshold(name string, persistent *bool, value int64) error
SetTopicCompactionThreshold sets the compaction threshold for a topic.
func (*PulsarAdminClient) UpdateCluster ¶ added in v0.3.0
func (p *PulsarAdminClient) UpdateCluster(name string, param *ClusterParams) error
UpdateCluster update pulsar cluster info
func (*PulsarAdminClient) UploadSchema ¶ added in v0.2.0
func (p *PulsarAdminClient) UploadSchema(topic string, params *SchemaParams) error
UploadSchema creates or updates a schema for a given topic
type PulsarAdminConfig ¶
type PulsarAdminConfig struct {
// WebServiceURL to connect to Pulsar.
WebServiceURL string
// Set the path to the trusted TLS certificate file
TLSTrustCertsFilePath string
// Configure whether the Pulsar client accept untrusted TLS certificate from broker (default: false)
TLSAllowInsecureConnection bool
TLSEnableHostnameVerification bool
// Either Token or OAuth2 configuration must be provided
// The Token used for authentication.
Token string
// TokenFilePath points to a local file that contains the token.
TokenFilePath string
// OAuth2 related configuration used for authentication.
IssuerEndpoint string
ClientID string
Audience string
Key string
// KeyFilePath points to a local file that contains the OAuth2 credentials JSON.
KeyFilePath string
Scope string
// TLS Authentication related configuration
ClientCertificatePath string
ClientCertificateKeyPath string
PulsarAPIVersion *config.APIVersion
}
PulsarAdminConfig indicates the configurations which are needed to initialize the pulsar admin
type PulsarAdminCreator ¶
type PulsarAdminCreator func(config PulsarAdminConfig) (PulsarAdmin, error)
PulsarAdminCreator is the function type to create a PulsarAdmin with config
type Reason ¶
type Reason int
Reason indicates the status code
const ( ReasonUnauthorized Reason = 401 // ReasonForbidden means don't have admin permission for the operation ReasonForbidden Reason = 403 // ReasonNotFound means a resource is not found in Pulsar ReasonNotFound Reason = 404 // ReasonAlreadyExist means a resource already exist in Pulsar ReasonAlreadyExist Reason = 409 // ReasonInvalidParameter means a resource already exist in Pulsar // Status code 412 ReasonInvalidParameter Reason = 412 // ReasonInternalServerError means Pulsar server fail to handle the request // Status code 500 ReasonInternalServerError Reason = 500 // ReasonUnknown means error reason is not clear ReasonUnknown Reason = 0 )
func ErrorReason ¶
ErrorReason returns the HTTP status code for the error
type SchemaParams ¶ added in v0.2.0
type SchemaParams struct {
// Type determines how to interpret the schema data
Type string `json:"type,omitempty"`
// Schema is schema data
Schema string `json:"schema,omitempty"`
// Properties is a user defined properties as a string/string map
Properties map[string]string `json:"properties,omitempty"`
}
SchemaParams indicates the parameters for uploading a schema
type TenantParams ¶
TenantParams indicates the parameters for creating a tenant
type TopicParams ¶
type TopicParams struct {
Persistent *bool
Partitions *int32
MaxProducers *int32
MaxConsumers *int32
MessageTTL *utils.Duration
MaxUnAckedMessagesPerConsumer *int32
MaxUnAckedMessagesPerSubscription *int32
RetentionTime *utils.Duration
RetentionSize *resource.Quantity
BacklogQuotaLimitTime *utils.Duration
BacklogQuotaLimitSize *resource.Quantity
BacklogQuotaRetentionPolicy *string
BacklogQuotaType *string
ReplicationClusters []string
Deduplication *bool
CompactionThreshold *int64
PersistencePolicies *v1alpha1.PersistencePolicies
DelayedDelivery *v1alpha1.DelayedDeliveryData
DispatchRate *v1alpha1.DispatchRate
PublishRate *v1alpha1.PublishRate
InactiveTopicPolicies *v1alpha1.InactiveTopicPolicies
SubscribeRate *v1alpha1.SubscribeRate
MaxMessageSize *int32
MaxConsumersPerSubscription *int32
MaxSubscriptionsPerTopic *int32
SchemaValidationEnforced *bool
SubscriptionDispatchRate *v1alpha1.DispatchRate
ReplicatorDispatchRate *v1alpha1.DispatchRate
DeduplicationSnapshotInterval *int32
OffloadPolicies *v1alpha1.OffloadPolicies
AutoSubscriptionCreation *v1alpha1.AutoSubscriptionCreationOverride
SchemaCompatibilityStrategy *v1alpha1.SchemaCompatibilityStrategy
Properties map[string]string
}
TopicParams indicates the parameters for creating a topic
type TopicPermission ¶
TopicPermission is the parameters to grant permission for a topic