subscriptions

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnectToPersistentSubscription

func NewConnectToPersistentSubscription(
	source *tasks.CompletionSource,
	groupName string,
	bufferSize int,
	streamId string,
	userCredentials *client.UserCredentials,
	eventAppeared client.EventAppearedHandler,
	subscriptionDropped client.SubscriptionDroppedHandler,
	verboseLogging bool,
	getConnection GetConnectionHandler,
) *connectToPersistentSubscription

Types

type ActionHandler

type ActionHandler func() error

type AllCatchUpSubscription

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

func NewAllCatchUpSubscription

func NewAllCatchUpSubscription(
	connection client.Connection,
	fromPositionExclusive *client.Position,
	userCredentials *client.UserCredentials,
	eventAppeared client.CatchUpEventAppearedHandler,
	liveProcessingStarted client.LiveProcessingStartedHandler,
	subscriptionDropped client.CatchUpSubscriptionDroppedHandler,
	settings *client.CatchUpSubscriptionSettings,
) *AllCatchUpSubscription

func (AllCatchUpSubscription) IsSubscribedToAll

func (s AllCatchUpSubscription) IsSubscribedToAll() bool

func (AllCatchUpSubscription) Start

func (s AllCatchUpSubscription) Start() *tasks.Task

func (AllCatchUpSubscription) Stop

func (s AllCatchUpSubscription) Stop(timeout ...time.Duration) (err error)

func (AllCatchUpSubscription) StreamId

func (s AllCatchUpSubscription) StreamId() string

type CreateSubscriptionObjectHandler

type CreateSubscriptionObjectHandler func(lastCommitPosition int64, lastEventNumber *int) (
	interface{}, client.EventStoreSubscription, error)

type CreateSubscriptionPackageHandler

type CreateSubscriptionPackageHandler func() (*client.Package, error)

type GetConnectionHandler

type GetConnectionHandler func() (*client.PackageConnection, error)

type InspectPackageHandler

type InspectPackageHandler func(p *client.Package) (bool, *client.InspectionResult, error)

type ReadEventsTillAsyncHandler

type ReadEventsTillAsyncHandler func(connection client.Connection, resolveLinkTos bool,
	userCredentials *client.UserCredentials, lastCommitPosition *int64, lastEventNumber *int32) *tasks.Task

type StreamCatchUpSubscription

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

func NewStreamCatchUpSubscription

func NewStreamCatchUpSubscription(
	connection client.Connection,
	streamId string,
	fromEventNumberExclusive *int,
	userCredentials *client.UserCredentials,
	eventAppeared client.CatchUpEventAppearedHandler,
	liveProcessingStarted client.LiveProcessingStartedHandler,
	subscriptionDropped client.CatchUpSubscriptionDroppedHandler,
	settings *client.CatchUpSubscriptionSettings,
) *StreamCatchUpSubscription

func (StreamCatchUpSubscription) IsSubscribedToAll

func (s StreamCatchUpSubscription) IsSubscribedToAll() bool

func (StreamCatchUpSubscription) Start

func (s StreamCatchUpSubscription) Start() *tasks.Task

func (StreamCatchUpSubscription) Stop

func (s StreamCatchUpSubscription) Stop(timeout ...time.Duration) (err error)

func (StreamCatchUpSubscription) StreamId

func (s StreamCatchUpSubscription) StreamId() string

type Subscription

type Subscription interface {
	DropSubscription(reason client.SubscriptionDropReason, err error, connection *client.PackageConnection) error
	ConnectionClosed() error
	InspectPackage(p *client.Package) (*client.InspectionResult, error)
	Subscribe(correlationId uuid.UUID, connection *client.PackageConnection) (bool, error)
}

type TryProcessHandler

type TryProcessHandler func(evt *client.ResolvedEvent) error

type VolatileEventStoreSubscription

type VolatileEventStoreSubscription struct {
	client.EventStoreSubscription
	// contains filtered or unexported fields
}

func NewVolatileEventStoreSubscription

func NewVolatileEventStoreSubscription(
	subscriptionOperation *VolatileSubscription,
	streamId string,
	lastCommitPosition int64,
	lastEventNumber *int,
) *VolatileEventStoreSubscription

type VolatileSubscription

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

func NewVolatileSubscription

func NewVolatileSubscription(
	source *tasks.CompletionSource,
	streamId string,
	resolveLinkTos bool,
	userCredentials *client.UserCredentials,
	eventAppeared client.EventAppearedHandler,
	subscriptionDropped client.SubscriptionDroppedHandler,
	verboseLogging bool,
	getConnection GetConnectionHandler,
) *VolatileSubscription

func (VolatileSubscription) ConnectionClosed

func (s VolatileSubscription) ConnectionClosed() error

func (VolatileSubscription) DropSubscription

func (s VolatileSubscription) DropSubscription(
	reason client.SubscriptionDropReason,
	err error,
	connection *client.PackageConnection,
) error

func (VolatileSubscription) InspectPackage

func (s VolatileSubscription) InspectPackage(p *client.Package) (*client.InspectionResult, error)

func (VolatileSubscription) String

func (s VolatileSubscription) String() string

func (VolatileSubscription) Subscribe

func (s VolatileSubscription) Subscribe(correlationId uuid.UUID, connection *client.PackageConnection) (bool, error)

func (VolatileSubscription) Unsubscribe

func (s VolatileSubscription) Unsubscribe() error

Jump to

Keyboard shortcuts

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