Documentation
¶
Index ¶
- Constants
- type Broker
- func (b *Broker) BrokerShardId() uint64
- func (b *Broker) JoinShard(partition *Partition)
- func (b *Broker) NodeHost() *dragonboat.NodeHost
- func (b *Broker) SetBrokerShardId(brokerShardId uint64)
- func (b *Broker) SetNodeHost(nh *dragonboat.NodeHost)
- func (b *Broker) ShardForPartition(partition string) (uint64, bool)
- func (b *Broker) ToProtoBuf() *pbTypes.Broker
- type Consumer
- type ConsumerGroup
- type Message
- type Partition
- type ShardInfo
- type ShardType
- type Topic
Constants ¶
View Source
const DefaultPartition = "default"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct {
ID uint64
RaftAddress string
ReachGrpcAddress string
ReachHttpAddress string
StartMsgFSM chan *Partition
// contains filtered or unexported fields
}
func FromProtoBufBroker ¶ added in v0.1.20
func (*Broker) BrokerShardId ¶
func (*Broker) NodeHost ¶
func (b *Broker) NodeHost() *dragonboat.NodeHost
func (*Broker) SetBrokerShardId ¶
func (*Broker) SetNodeHost ¶
func (b *Broker) SetNodeHost(nh *dragonboat.NodeHost)
func (*Broker) ShardForPartition ¶
func (*Broker) ToProtoBuf ¶ added in v0.1.20
type Consumer ¶
type Consumer struct {
ID string
Partitions []string
ConsumerGroup string
Topics []string
IsActive bool
LastHealthCheckAt int64
// contains filtered or unexported fields
}
func FromProtoBufConsumer ¶ added in v0.1.20
func (*Consumer) GetCurrentPartition ¶
func (*Consumer) IncPartitionIndex ¶
func (*Consumer) PartitionIndex ¶
func (*Consumer) SetPartitions ¶
func (*Consumer) ToProtoBuf ¶ added in v0.1.20
type ConsumerGroup ¶
type ConsumerGroup struct {
ID string
Topics map[string]bool
Consumers map[string]bool
// contains filtered or unexported fields
}
func FromProtoBufConsumerGroup ¶ added in v0.1.20
func FromProtoBufConsumerGroup(pb *pbTypes.ConsumerGroup) *ConsumerGroup
func (*ConsumerGroup) AddConsumer ¶
func (c *ConsumerGroup) AddConsumer(consumerID string)
func (*ConsumerGroup) RebalanceInProgress ¶
func (c *ConsumerGroup) RebalanceInProgress() bool
func (*ConsumerGroup) SetRebalanceInProgress ¶
func (c *ConsumerGroup) SetRebalanceInProgress(inProgress bool)
func (*ConsumerGroup) String ¶
func (c *ConsumerGroup) String() string
func (*ConsumerGroup) ToProtoBuf ¶ added in v0.1.20
func (c *ConsumerGroup) ToProtoBuf() *pbTypes.ConsumerGroup
type Message ¶
func FromProtoBufMessage ¶ added in v0.1.20
func (*Message) ToProtoBuf ¶ added in v0.1.20
type Partition ¶
func FromProtoBufPartition ¶ added in v0.1.20
func (*Partition) ToProtoBuf ¶ added in v0.1.20
type ShardInfo ¶ added in v0.1.3
type ShardInfo struct {
ShardType ShardType
ShardID uint64
Topic string
PartitionID string
Brokers []*Broker
}
func FromProtoBufShardInfo ¶ added in v0.1.20
func (*ShardInfo) ToProtoBuf ¶ added in v0.1.20
Click to show internal directories.
Click to hide internal directories.