events

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package events is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	GetEvent(
		shardID int,
		domainID string,
		workflowID string,
		runID string,
		firstEventID int64,
		eventID int64,
		branchToken []byte,
	) (*shared.HistoryEvent, error)
	PutEvent(
		domainID string,
		workflowID string,
		runID string,
		eventID int64,
		event *shared.HistoryEvent,
	)
}

Cache caches workflow history event

func NewCache

func NewCache(
	shardID int,
	historyManager persistence.HistoryManager,
	config *config.Config,
	logger log.Logger,
	metricsClient metrics.Client,
) Cache

NewCache creates a new events cache

func NewGlobalCache

func NewGlobalCache(
	initialCount int,
	maxCount int,
	ttl time.Duration,
	historyManager persistence.HistoryManager,
	logger log.Logger,
	metricsClient metrics.Client,
	maxSize uint64,
) Cache

NewGlobalCache creates a new global events cache

type MockCache

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

MockCache is a mock of Cache interface

func NewMockCache

func NewMockCache(ctrl *gomock.Controller) *MockCache

NewMockCache creates a new mock instance

func (*MockCache) EXPECT

func (m *MockCache) EXPECT() *MockCacheMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockCache) GetEvent

func (m *MockCache) GetEvent(shardID int, domainID, workflowID, runID string, firstEventID, eventID int64, branchToken []byte) (*shared.HistoryEvent, error)

GetEvent mocks base method

func (*MockCache) PutEvent

func (m *MockCache) PutEvent(domainID, workflowID, runID string, eventID int64, event *shared.HistoryEvent)

PutEvent mocks base method

type MockCacheMockRecorder

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

MockCacheMockRecorder is the mock recorder for MockCache

func (*MockCacheMockRecorder) GetEvent

func (mr *MockCacheMockRecorder) GetEvent(shardID, domainID, workflowID, runID, firstEventID, eventID, branchToken interface{}) *gomock.Call

GetEvent indicates an expected call of GetEvent

func (*MockCacheMockRecorder) PutEvent

func (mr *MockCacheMockRecorder) PutEvent(domainID, workflowID, runID, eventID, event interface{}) *gomock.Call

PutEvent indicates an expected call of PutEvent

type Notification

type Notification struct {
	ID                     definition.WorkflowIdentifier
	LastFirstEventID       int64
	NextEventID            int64
	PreviousStartedEventID int64
	Timestamp              time.Time
	CurrentBranchToken     []byte
	WorkflowState          int
	WorkflowCloseState     int
}

Notification is the notification for new history events

func NewNotification

func NewNotification(
	domainID string,
	workflowExecution *gen.WorkflowExecution,
	lastFirstEventID int64,
	nextEventID int64,
	previousStartedEventID int64,
	currentBranchToken []byte,
	workflowState int,
	workflowCloseState int,
) *Notification

NewNotification creates a new history event notification

type Notifier

type Notifier interface {
	common.Daemon
	NotifyNewHistoryEvent(event *Notification)
	WatchHistoryEvent(identifier definition.WorkflowIdentifier) (string, chan *Notification, error)
	UnwatchHistoryEvent(identifier definition.WorkflowIdentifier, subscriberID string) error
}

Notifier is a pub-sub for sending and receiving notifications on new history events

func NewNotifier

func NewNotifier(
	timeSource clock.TimeSource,
	metrics metrics.Client,
	workflowIDToShardID func(string) int,
) Notifier

NewNotifier creates a new history event notifier

Jump to

Keyboard shortcuts

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