gnes.router.map.simple module

class gnes.router.map.simple.DocBatchRouter(*args, **kwargs)[source]

Bases: gnes.router.base.BaseMapRouter

apply(msg: gnes_pb2.Message, *args, **kwargs) → Generator[source]

Modify the incoming message

Parameters:msg – incoming message
train(*args, **kwargs)

Train the model, need to be overrided

class gnes.router.map.simple.PublishRouter(num_part: int, *args, **kwargs)[source]

Bases: gnes.router.base.BaseMapRouter

apply(msg: gnes_pb2.Message, *args, **kwargs) → Generator[source]

Modify the incoming message

Parameters:msg – incoming message
train(*args, **kwargs)

Train the model, need to be overrided