Documentation ¶
Index ¶
- func MaxArchivalIterationTimeout() time.Duration
- func NewReplayMetricsClient(client metrics.Client, ctx workflow.Context) metrics.Client
- func NewReplayMetricsScope(scope metrics.Scope, ctx workflow.Context) metrics.Scope
- type ArchivalTarget
- type ArchiveRequest
- type BootstrapContainer
- type Client
- type ClientMock
- type ClientRequest
- type ClientResponse
- type ClientWorker
- type Config
- type Handler
- type MockHandler
- type Pump
- type PumpMock
- type PumpResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MaxArchivalIterationTimeout ¶ added in v0.5.9
MaxArchivalIterationTimeout returns the max allowed timeout for a single iteration of archival workflow
func NewReplayMetricsClient ¶
NewReplayMetricsClient creates a metrics client which is aware of cadence's replay mode
Types ¶
type ArchivalTarget ¶ added in v0.11.0
type ArchivalTarget int
ArchivalTarget is either history or visibility
const ( // ArchiveTargetHistory is the archive target for workflow history ArchiveTargetHistory ArchivalTarget = iota // ArchiveTargetVisibility is the archive target for workflow visibility record ArchiveTargetVisibility )
type ArchiveRequest ¶
type ArchiveRequest struct { DomainID string DomainName string WorkflowID string RunID string // history archival ShardID int BranchToken []byte NextEventID int64 CloseFailoverVersion int64 URI string // should be historyURI, but keep the existing name for backward compatibility // visibility archival WorkflowTypeName string StartTimestamp int64 ExecutionTimestamp int64 CloseTimestamp int64 CloseStatus types.WorkflowExecutionCloseStatus HistoryLength int64 Memo *types.Memo SearchAttributes map[string][]byte VisibilityURI string // archival targets: history and/or visibility Targets []ArchivalTarget }
ArchiveRequest is the request signal sent to the archival workflow
type BootstrapContainer ¶
type BootstrapContainer struct { PublicClient workflowserviceclient.Interface MetricsClient metrics.Client Logger log.Logger HistoryV2Manager persistence.HistoryManager DomainCache cache.DomainCache Config *Config ArchiverProvider provider.ArchiverProvider }
BootstrapContainer contains everything need for bootstrapping
type Client ¶
type Client interface {
Archive(context.Context, *ClientRequest) (*ClientResponse, error)
}
Client is used to archive workflow histories
func NewClient ¶
func NewClient( metricsClient metrics.Client, logger log.Logger, publicClient workflowserviceclient.Interface, numWorkflows dynamicconfig.IntPropertyFn, requestRateLimiter quotas.Limiter, inlineHistoryRateLimiter quotas.Limiter, inlineVisibilityRateLimiter quotas.Limiter, archiverProvider provider.ArchiverProvider, archivingIncompleteHistory dynamicconfig.BoolPropertyFn, ) Client
NewClient creates a new Client
type ClientMock ¶
ClientMock is an autogenerated mock type for the Client type
func (*ClientMock) Archive ¶
func (_m *ClientMock) Archive(_a0 context.Context, _a1 *ClientRequest) (*ClientResponse, error)
Archive provides a mock function with given fields: _a0, _a1
type ClientRequest ¶ added in v0.7.0
type ClientRequest struct { ArchiveRequest *ArchiveRequest CallerService string AttemptArchiveInline bool }
ClientRequest is the archive request sent to the archiver client
type ClientResponse ¶ added in v0.8.0
type ClientResponse struct {
HistoryArchivedInline bool
}
ClientResponse is the archive response returned from the archiver client
type ClientWorker ¶
type ClientWorker interface { Start() error Stop() }
ClientWorker is a cadence client worker
func NewClientWorker ¶
func NewClientWorker(container *BootstrapContainer) ClientWorker
NewClientWorker returns a new ClientWorker
type Config ¶
type Config struct { ArchiverConcurrency dynamicconfig.IntPropertyFn ArchivalsPerIteration dynamicconfig.IntPropertyFn TimeLimitPerArchivalIteration dynamicconfig.DurationPropertyFn AllowArchivingIncompleteHistory dynamicconfig.BoolPropertyFn }
Config for ClientWorker
type Handler ¶ added in v0.7.0
type Handler interface { Start() Finished() []uint64 }
Handler is used to process archival requests
type MockHandler ¶ added in v0.7.0
MockHandler is an autogenerated mock type for the Archiver type
func (*MockHandler) Finished ¶ added in v0.7.0
func (_m *MockHandler) Finished() []uint64
Finished provides a mock function with given fields:
func (*MockHandler) Start ¶ added in v0.7.0
func (_m *MockHandler) Start()
Start provides a mock function with given fields:
type Pump ¶
type Pump interface {
Run() PumpResult
}
Pump pumps archival requests into request channel
type PumpMock ¶
PumpMock is an autogenerated mock type for the Pump type
func (*PumpMock) Run ¶
func (_m *PumpMock) Run() PumpResult
Run provides a mock function with given fields:
type PumpResult ¶
type PumpResult struct { PumpedHashes []uint64 UnhandledCarryover []ArchiveRequest TimeoutWithoutSignals bool }
PumpResult is the result of pumping requests into request channel