commitlog

package
v0.0.0-...-31bb6df Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

* Copyright 2019, Ulf Lilleengen * License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitListener

type CommitListener func(bool)

type CommitLog

type CommitLog struct {
	// contains filtered or unexported fields
}

func NewCommitLog

func NewCommitLog(ds datastore.Datastore) (*CommitLog, error)

func (*CommitLog) GetOrNewTopic

func (cl *CommitLog) GetOrNewTopic(topicName string) (*Topic, error)

type Entry

type Entry struct {
	// contains filtered or unexported fields
}

func NewEntry

func NewEntry(message *api.Message, listener CommitListener) *Entry

type StreamFn

type StreamFn = func(message *api.Message) error

type Subscriber

type Subscriber struct {
	// contains filtered or unexported fields
}

func (*Subscriber) Close

func (s *Subscriber) Close()

func (*Subscriber) Commit

func (s *Subscriber) Commit(offset int64)

func (*Subscriber) Stream

func (s *Subscriber) Stream(callback StreamFn) error

type Topic

type Topic struct {
	// contains filtered or unexported fields
}

func (*Topic) AddEntry

func (topic *Topic) AddEntry(entry *Entry)

func (*Topic) NewSubscriber

func (topic *Topic) NewSubscriber(id string, offset int64, since int64) *Subscriber

Jump to

Keyboard shortcuts

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