writer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2017 License: Apache-2.0 Imports: 23 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventstoreWriter

type EventstoreWriter struct {
	LiveReader *LiveReader
	// contains filtered or unexported fields
}

func New

func New(confCtx *config.Context) *EventstoreWriter

func (*EventstoreWriter) AppendToStream

func (e *EventstoreWriter) AppendToStream(streamName string, contentArr []string) (*types.AppendToStreamOutput, error)

func (*EventstoreWriter) Close

func (e *EventstoreWriter) Close()

func (*EventstoreWriter) CreateStream

func (e *EventstoreWriter) CreateStream(streamName string) (*types.CreateStreamOutput, error)

func (*EventstoreWriter) GetConfigurationContext

func (e *EventstoreWriter) GetConfigurationContext() *config.Context

func (*EventstoreWriter) SubscribeToStream

func (e *EventstoreWriter) SubscribeToStream(streamName string, subscriptionId string) error

func (*EventstoreWriter) UnsubscribeFromStream

func (e *EventstoreWriter) UnsubscribeFromStream(streamName string, subscriptionId string) error

type LiveReader

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

func NewLiveReader

func NewLiveReader(writer *EventstoreWriter) *LiveReader

func (*LiveReader) ReadIntoWriter

func (l *LiveReader) ReadIntoWriter(opts *rtypes.ReadOptions, writer io.Writer) error

Intentionally dumps raw lines (without parsing it into ReadResult), because it would be stupid to implement parsing both at Writer and Reader - those are usually separate nodes so code and data structures would have to be 100 % in sync.

type Metrics

type Metrics struct {
	CreateStreamOps                  prometheus.Counter
	SubscribeToStreamOps             prometheus.Counter
	UnsubscribeFromStreamOps         prometheus.Counter
	AppendToStreamOps                prometheus.Counter
	AppendedLinesExclMeta            prometheus.Counter
	ChunkShippedToLongTermStorage    prometheus.Counter
	LiveReaderReadOps                prometheus.Counter
	SubscriptionActivityEventsRaised prometheus.Counter
}

func NewMetrics

func NewMetrics() *Metrics

type SubscriptionActivityTask

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

func NewSubscriptionActivityTask

func NewSubscriptionActivityTask(writer *EventstoreWriter) *SubscriptionActivityTask

func (*SubscriptionActivityTask) Close

func (t *SubscriptionActivityTask) Close()

func (*SubscriptionActivityTask) MarkOneDirty

func (t *SubscriptionActivityTask) MarkOneDirty(cursorAfter *cursor.Cursor, tx *transaction.EventstoreTransaction) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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