Documentation ¶
Overview ¶
Package topics is only used by terraform-provider-flexibleengine with DmsV1Client to manage flexibleengine_dms_kafka_topic resource.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOps ¶
type CreateOps struct { // the name/ID of a topic Name string `json:"id" required:"true"` // topic partitions, value range: 1-50, Default value:3 Partition int `json:"partition,omitempty"` // topic replications, value range: 1-3, Default value:3 Replication int `json:"replication,omitempty"` // aging time in hours, value range: 1-168, , Default value:72 RetentionTime int `json:"retention_time,omitempty"` SyncMessageFlush bool `json:"sync_message_flush,omitempty"` SyncReplication bool `json:"sync_replication,omitempty"` }
CreateOps is a struct that contains all the parameters of create function
func (CreateOps) ToTopicCreateMap ¶
ToTopicCreateMap is used for type convert
type CreateOpsBuilder ¶
CreateOpsBuilder is an interface which is used for creating a kafka topic
type CreateResponse ¶
type CreateResponse struct {
Name string `json:"id"`
}
CreateResponse is a struct that contains the create response
type CreateResult ¶
CreateResult is a struct that contains all the return parameters of creation
func Create ¶
func Create(client *golangsdk.ServiceClient, instanceID string, ops CreateOpsBuilder) (r CreateResult)
Create a kafka topic with given parameters
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*CreateResponse, error)
Extract from CreateResult
type DeleteResponse ¶
DeleteResponse is a struct that contains the deletion response
type DeleteResult ¶
DeleteResult is a struct which contains the result of deletion
func Delete ¶
func Delete(client *golangsdk.ServiceClient, instanceID string, topics []string) (r DeleteResult)
Delete given topics belong to the instance id
func (DeleteResult) Extract ¶
func (r DeleteResult) Extract() ([]DeleteResponse, error)
Extract from DeleteResult
type ListResponse ¶
type ListResponse struct { Total int `json:"total"` Size int `json:"size"` RemainPartitions int `json:"remain_partitions"` MaxPartitions int `json:"max_partitions"` Topics []Topic `json:"topics"` }
ListResponse is a struct that contains the list response
type ListResult ¶
ListResult contains the body of getting detailed
func List ¶
func List(client *golangsdk.ServiceClient, instanceID string) (r ListResult)
List all topics belong to the instance id
type Topic ¶
type Topic struct { Name string `json:"id"` Partition int `json:"partition"` Replication int `json:"replication"` RetentionTime int `json:"retention_time"` TopicType int `json:"topic_type"` PoliciesOnly bool `json:"policiesOnly"` SyncReplication bool `json:"-"` SyncMessageFlush bool `json:"-"` }
Topic includes the parameters of an topic
func (*Topic) UnmarshalJSON ¶
UnmarshalJSON to override default