ksgo

package module
v0.0.0-...-1402379 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: MIT Imports: 1 Imported by: 0

README

ksgo

Kafka Stream implemented in Golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBadgerKVStore

func NewBadgerKVStore(opt badger.Options) *badgerKVStore

Types

type Iterator

type Iterator interface {
	Err() error
	Key() []byte
	Next() bool
	Close()
	Seek(key []byte) bool
	Value() ([]byte, error)
}

type KVStore

type KVStore interface {
	ReadOnlyKVStore
	Set(string, []byte) error
	Delete(string) error
}

type Processor

type Processor func(ctx ProcessorContext, val interface{})

type ProcessorContext

type ProcessorContext interface {
	Topic() string
	Partition() int32
	Key() interface{}
	Offset() int64
	Forward(key string, val interface{})
	GetStateStore(name string) StateStore
}

type ReadOnlyKVStore

type ReadOnlyKVStore interface {
	StateStore
	Has(string) (bool, error)
	Get(string) ([]byte, error)
	GetOffset(defValue int64) (int64, error)
	Iterator() (Iterator, error)
	IteratorWithRange(start, limit []byte) (Iterator, error)
}

type StateStore

type StateStore interface {
	// Name() string
	// Open() error
	Close() error
}

type Topology

type Topology struct {
}

func (*Topology) AddGlobalStore

func (t *Topology) AddGlobalStore(name string) *Topology

func (*Topology) AddProcessor

func (t *Topology) AddProcessor(name string) *Topology

func (*Topology) AddSink

func (t *Topology) AddSink(name string) *Topology

func (*Topology) AddSource

func (t *Topology) AddSource(name string) *Topology

func (*Topology) AddStateStore

func (t *Topology) AddStateStore(name string) *Topology

Jump to

Keyboard shortcuts

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