internal

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: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(
	settings *client.ConnectionSettings,
	clusterSettings *client.ClusterSettings,
	endpointDiscoverer EndpointDiscoverer,
	name string,
) client.Connection

func NewConnectionLogicHandler

func NewConnectionLogicHandler(
	connection client.Connection,
	settings *client.ConnectionSettings,
) *connectionLogicHandler

func NewPersistentSubscription

func NewPersistentSubscription(
	subscriptionId string,
	streamId string,
	eventAppeared client.PersistentEventAppearedHandler,
	subscriptionDropped client.PersistentSubscriptionDroppedHandler,
	userCredentials *client.UserCredentials,
	settings *client.ConnectionSettings,
	handler ConnectionLogicHandler,
	bufferSize int,
	autoAck bool,
) *persistentSubscription

func NewStartPersistentSubscriptionMessage

func NewStartPersistentSubscriptionMessage(
	source *tasks.CompletionSource,
	subscriptionId string,
	streamId string,
	bufferSize int,
	userCredentials *client.UserCredentials,
	eventAppeared client.EventAppearedHandler,
	subscriptionDropped client.SubscriptionDroppedHandler,
	maxRetries int,
	timeout time.Duration,
) *startPersistentSubscriptionMessage

func NewStaticEndpointDiscoverer

func NewStaticEndpointDiscoverer(ipEndpoint net.Addr, isSsl bool) *staticEndpointDiscoverer

Types

type BySeqNo

type BySeqNo []*operationItem

func (BySeqNo) Len

func (a BySeqNo) Len() int

func (BySeqNo) Less

func (a BySeqNo) Less(i, j int) bool

func (BySeqNo) Swap

func (a BySeqNo) Swap(i, j int)

type ClusterDnsEndpointDiscoverer

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

func NewClusterDnsEndPointDiscoverer

func NewClusterDnsEndPointDiscoverer(
	clusterDns string,
	maxDiscoverAttemps int,
	managerExternalHttpPort int,
	gossipSeeds []*client.GossipSeed,
	gossipTimeout time.Duration,
) *ClusterDnsEndpointDiscoverer

func (*ClusterDnsEndpointDiscoverer) DiscoverAsync

func (d *ClusterDnsEndpointDiscoverer) DiscoverAsync(failedTcpEndpoint net.Addr) *tasks.Task

type ConnectionLogicHandler

type ConnectionLogicHandler interface {
	TotalOperationCount() int
	EnqueueMessage(msg message) error
	Connected() client.EventHandlers
	Disconnected() client.EventHandlers
	Reconnecting() client.EventHandlers
	Closed() client.EventHandlers
	ErrorOccurred() client.EventHandlers
	AuthenticationFailed() client.EventHandlers
}

type EndpointDiscoverer

type EndpointDiscoverer interface {
	DiscoverAsync(ipEndpoint net.Addr) *tasks.Task
}

type NodeEndpoints

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

func NewNodeEndpoints

func NewNodeEndpoints(
	tcpEndpoint net.Addr,
	secureTcpEndpoint net.Addr,
) *NodeEndpoints

func (*NodeEndpoints) SecureTcpEndpoint

func (e *NodeEndpoints) SecureTcpEndpoint() net.Addr

func (*NodeEndpoints) String

func (e *NodeEndpoints) String() string

func (*NodeEndpoints) TcpEndpoint

func (e *NodeEndpoints) TcpEndpoint() net.Addr

type OperationsManager

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

func NewOperationsManager

func NewOperationsManager(
	connectionName string,
	settings *client.ConnectionSettings,
) *OperationsManager

func (*OperationsManager) CheckTimeoutsAndRetry

func (m *OperationsManager) CheckTimeoutsAndRetry(c *client.PackageConnection) error

func (*OperationsManager) CleanUp

func (m *OperationsManager) CleanUp() error

func (*OperationsManager) EnqueueOperation

func (m *OperationsManager) EnqueueOperation(operation *operationItem) error

func (*OperationsManager) ExecuteOperation

func (m *OperationsManager) ExecuteOperation(o *operationItem, c *client.PackageConnection) error

func (*OperationsManager) RemoveOperation

func (m *OperationsManager) RemoveOperation(o *operationItem) bool

func (*OperationsManager) ScheduleOperation

func (m *OperationsManager) ScheduleOperation(operation *operationItem, conn *client.PackageConnection) error

func (*OperationsManager) ScheduleOperationRetry

func (m *OperationsManager) ScheduleOperationRetry(o *operationItem) error

func (*OperationsManager) TotalOperationCount

func (m *OperationsManager) TotalOperationCount() int

func (*OperationsManager) TryGetActiveOperation

func (m *OperationsManager) TryGetActiveOperation(correlationId uuid.UUID) (bool, *operationItem)

func (*OperationsManager) TryScheduleWaitingOperations

func (m *OperationsManager) TryScheduleWaitingOperations(c *client.PackageConnection) error

type SubscriptionItem

type SubscriptionItem struct {
	ConnectionId  uuid.UUID
	CorrelationId uuid.UUID
	IsSubscribed  bool
	RetryCount    int
	LastUpdated   time.Time
	// contains filtered or unexported fields
}

func NewSubscriptionItem

func NewSubscriptionItem(
	operation subscriptions.Subscription,
	maxRetries int,
	timeout time.Duration,
) *SubscriptionItem

func (*SubscriptionItem) CreatedTime

func (i *SubscriptionItem) CreatedTime() time.Time

func (*SubscriptionItem) MaxRetries

func (i *SubscriptionItem) MaxRetries() int

func (*SubscriptionItem) Operation

func (*SubscriptionItem) String

func (i *SubscriptionItem) String() string

func (*SubscriptionItem) Timeout

func (i *SubscriptionItem) Timeout() time.Duration

type SubscriptionsManager

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

func NewSubscriptionManager

func NewSubscriptionManager(connectionName string, settings *client.ConnectionSettings) *SubscriptionsManager

func (*SubscriptionsManager) CheckTimeoutsAndRetry

func (m *SubscriptionsManager) CheckTimeoutsAndRetry(c *client.PackageConnection) error

func (*SubscriptionsManager) CleanUp

func (m *SubscriptionsManager) CleanUp() error

func (*SubscriptionsManager) EnqueueSubscription

func (m *SubscriptionsManager) EnqueueSubscription(s *SubscriptionItem)

func (*SubscriptionsManager) PurgeSubscribedAndDroppedSubscriptions

func (m *SubscriptionsManager) PurgeSubscribedAndDroppedSubscriptions(connectionId uuid.UUID)

func (*SubscriptionsManager) RemoveSubscription

func (m *SubscriptionsManager) RemoveSubscription(s *SubscriptionItem) bool

func (*SubscriptionsManager) ScheduleSubscriptionRetry

func (m *SubscriptionsManager) ScheduleSubscriptionRetry(s *SubscriptionItem) error

func (*SubscriptionsManager) StartSubscription

func (*SubscriptionsManager) TryGetActiveSubscription

func (m *SubscriptionsManager) TryGetActiveSubscription(correlationId uuid.UUID) (bool, *SubscriptionItem)

Jump to

Keyboard shortcuts

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