producers

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyChange

type KeyChange struct {
	Topic    string
	Producer sarama.SyncProducer
	DB       storage.Database
}

KeyChange produces key change events for the sync API and federation sender to consume

func (*KeyChange) DefaultPartition

func (p *KeyChange) DefaultPartition() int32

DefaultPartition returns the default partition this process is sending key changes to. NB: A keyserver MUST send key changes to only 1 partition or else query operations will become inconsistent. Partitions can be sharded (e.g by hash of user ID of key change) but then all keyservers must be queried to calculate the entire set of key changes between two sync tokens.

func (*KeyChange) ProduceKeyChanges

func (p *KeyChange) ProduceKeyChanges(keys []api.DeviceMessage) error

ProduceKeyChanges creates new change events for each key

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL