Versions in this module Expand all Collapse all v0 v0.1.1 Mar 28, 2022 Changes in this version + var ErrorEmptyGroupName = fmt.Errorf("group cannot be empty") + var ErrorEmptyStreamName = fmt.Errorf("stream name cannot be empty") + var ErrorInvalidBatchSize = fmt.Errorf("batch size cannot less than 1") + var ErrorInvalidPartitionCount = fmt.Errorf("partition count cannot less than 1") + var ErrorInvalidPartitionSize = fmt.Errorf("partition size cannot less than 1") + var ErrorNonExistentStream = fmt.Errorf("stream do not exist") v0.1.0 Mar 28, 2022 Changes in this version + var ConsumerDeadError = errors.New("consumer shut down") + var EmptyGroupName = fmt.Errorf("group cannot be empty") + var EmptyStreamName = fmt.Errorf("stream name cannot be empty") + var InvalidBatchSize = fmt.Errorf("batch size cannot less than 1") + var InvalidPartitionCount = fmt.Errorf("partition count cannot less than 1") + var InvalidPartitionSize = fmt.Errorf("partition size cannot less than 1") + var NonExistentStream = fmt.Errorf("stream do not exist") + type Config struct + Debug bool + NameSpace string + RedisOptions *redis.Options + type Consumer struct + func (c *Consumer) Ack(ctx context.Context, cmessage *contracts.CMessage) error + func (c *Consumer) GetID() string + func (c *Consumer) GetNameSpace() string + func (c *Consumer) GetStreamName() string + func (c *Consumer) IsActive() bool + func (c *Consumer) Read(ctx context.Context, maxWaitDuration time.Duration) ([]*contracts.CMessage, error) + func (c *Consumer) ShutDown() error + type Segmenter struct + func NewSegmenter(c *Config) (*Segmenter, error) + func (s *Segmenter) RegisterConsumer(ctx context.Context, name string, group string, batchSize int64, ...) (*Consumer, error) + func (s *Segmenter) RegisterStream(ctx context.Context, name string, pcount int, psize int64) (*Stream, error) + type Stream struct + func (s *Stream) GetName() string + func (s *Stream) GetPartitionCount() int + func (s *Stream) GetPartitionSize() int64 + func (s *Stream) Send(ctx context.Context, m *contracts.PMessage) (string, error)