forked from arbor/go-kafkaesque
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstruct.go
More file actions
30 lines (26 loc) · 925 Bytes
/
struct.go
File metadata and controls
30 lines (26 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package gokafkaesque
// Topic includes Kafka topic config, partitions, replication
// factor and name.
type Topic struct {
*Config `json:"config"`
Partitions string `json:"partitions"`
ReplicationFactor string `json:"replicationFactor"`
Name *string `json:"topic"`
}
// Config contains a Kafka topic retention config in ms.
type Config struct {
RetentionMs string `json:"retention.ms"`
SegmentBytes string `json:"segment.bytes"`
CleanupPolicy string `json:"cleanup.policy"` // Accepted values are: "deleted", "compact"
MinInsyncReplicas string `json:"min.insync.replicas"`
RetentionBytes string `json:"retention.bytes"`
SegmentMs string `json:"segment.ms"`
}
// AllTopics is a list of topic names.
type AllTopics struct {
Topics []string `json:"topics"`
}
// Response returns a response of OK.
type Response struct {
Message string `json:"message"`
}