writer

package
v0.2.0 Latest Latest
Warning

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

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

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
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics() *Metrics

func (*Metrics) Close added in v0.2.0

func (m *Metrics) Close()

this is to support instantiating Writer process more than one time per process. otherwise we'd get "duplicate metrics collector registration attempted" due to Prom's global state, blerch..

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