Documentation ¶
Index ¶
- func ConvertHeaderToTags(header *HistoryBlobHeader) (map[string]string, error)
- func IsLast(tags map[string]string) bool
- func NewHistoryBlobKey(domainID, workflowID, runID string, pageToken int) (blob.Key, error)
- func NewReplayMetricsClient(client metrics.Client, ctx workflow.Context) metrics.Client
- func StringPageToken(pageToken int) string
- type ArchiveRequest
- type Archiver
- type BootstrapContainer
- type Client
- type ClientMock
- type ClientWorker
- type Config
- type HistoryBlob
- type HistoryBlobHeader
- type HistoryBlobIterator
- type HistoryBlobIteratorMock
- type HistoryBlobReader
- type HistoryBlobReaderMock
- type MockArchiver
- type Pump
- type PumpMock
- type PumpResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertHeaderToTags ¶
func ConvertHeaderToTags(header *HistoryBlobHeader) (map[string]string, error)
ConvertHeaderToTags converts header into metadata tags for blob
func IsLast ¶
IsLast returns true if tags indicate blob is the last blob in archived history, false otherwise
func NewHistoryBlobKey ¶
NewHistoryBlobKey returns a key for history blob
func NewReplayMetricsClient ¶
NewReplayMetricsClient creates a metrics client which is aware of cadence's replay mode
func StringPageToken ¶
StringPageToken converts input blob page token to string form
Types ¶
type ArchiveRequest ¶
type ArchiveRequest struct { ShardID int DomainID string WorkflowID string RunID string EventStoreVersion int32 BranchToken []byte NextEventID int64 CloseFailoverVersion int64 }
ArchiveRequest is request to Archive
type Archiver ¶
type Archiver interface { Start() Finished() []uint64 }
Archiver is used to process archival requests
type BootstrapContainer ¶
type BootstrapContainer struct { PublicClient workflowserviceclient.Interface MetricsClient metrics.Client Logger log.Logger ClusterMetadata cluster.Metadata HistoryManager persistence.HistoryManager HistoryV2Manager persistence.HistoryV2Manager Blobstore blobstore.Client DomainCache cache.DomainCache Config *Config HistoryBlobReader HistoryBlobReader // this is only set in testing code }
BootstrapContainer contains everything need for bootstrapping
type Client ¶
type Client interface {
Archive(*ArchiveRequest) error
}
Client is used to archive workflow histories
func NewClient ¶
func NewClient( metricsClient metrics.Client, logger log.Logger, publicClient workflowserviceclient.Interface, numWorkflows dynamicconfig.IntPropertyFn, ) 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 *ArchiveRequest) error
Archive provides a mock function with given fields: _a0
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 { EnableArchivalCompression dynamicconfig.BoolPropertyFnWithDomainFilter HistoryPageSize dynamicconfig.IntPropertyFnWithDomainFilter TargetArchivalBlobSize dynamicconfig.IntPropertyFnWithDomainFilter ArchiverConcurrency dynamicconfig.IntPropertyFn ArchivalsPerIteration dynamicconfig.IntPropertyFn DeterministicConstructionCheckProbability dynamicconfig.FloatPropertyFn }
Config for ClientWorker
type HistoryBlob ¶
type HistoryBlob struct { Header *HistoryBlobHeader `json:"header"` Body *shared.History `json:"body"` }
HistoryBlob is the serializable data that forms the body of a blob
type HistoryBlobHeader ¶
type HistoryBlobHeader struct { DomainName *string `json:"domain_name,omitempty"` DomainID *string `json:"domain_id,omitempty"` WorkflowID *string `json:"workflow_id,omitempty"` RunID *string `json:"run_id,omitempty"` CurrentPageToken *int `json:"current_page_token,omitempty"` NextPageToken *int `json:"next_page_token,omitempty"` IsLast *bool `json:"is_last,omitempty"` FirstFailoverVersion *int64 `json:"first_failover_version,omitempty"` LastFailoverVersion *int64 `json:"last_failover_version,omitempty"` FirstEventID *int64 `json:"first_event_id,omitempty"` LastEventID *int64 `json:"last_event_id,omitempty"` UploadDateTime *string `json:"upload_date_time,omitempty"` UploadCluster *string `json:"upload_cluster,omitempty"` EventCount *int64 `json:"event_count,omitempty"` CloseFailoverVersion *int64 `json:"close_failover_version,omitempty"` }
HistoryBlobHeader is the header attached to all history blobs
type HistoryBlobIterator ¶
type HistoryBlobIterator interface { Next() (*HistoryBlob, error) HasNext() bool }
HistoryBlobIterator is used to get history blobs
func NewHistoryBlobIterator ¶
func NewHistoryBlobIterator( request ArchiveRequest, container *BootstrapContainer, domainName string, clusterName string, ) HistoryBlobIterator
NewHistoryBlobIterator returns a new HistoryBlobIterator
type HistoryBlobIteratorMock ¶
HistoryBlobIteratorMock is an autogenerated mock type for the HistoryBlobIterator type
func (*HistoryBlobIteratorMock) HasNext ¶
func (_m *HistoryBlobIteratorMock) HasNext() bool
HasNext provides a mock function with given fields:
func (*HistoryBlobIteratorMock) Next ¶
func (_m *HistoryBlobIteratorMock) Next() (*HistoryBlob, error)
Next provides a mock function with given fields:
type HistoryBlobReader ¶
type HistoryBlobReader interface {
GetBlob(pageToken int) (*HistoryBlob, error)
}
HistoryBlobReader is used to read history blobs
func NewHistoryBlobReader ¶
func NewHistoryBlobReader(itr HistoryBlobIterator) HistoryBlobReader
NewHistoryBlobReader returns a new HistoryBlobReader
type HistoryBlobReaderMock ¶
HistoryBlobReaderMock is an autogenerated mock type for the HistoryBlobReader type
func (*HistoryBlobReaderMock) GetBlob ¶
func (_m *HistoryBlobReaderMock) GetBlob(pageToken int) (*HistoryBlob, error)
GetBlob provides a mock function with given fields: pageToken
type MockArchiver ¶
MockArchiver is an autogenerated mock type for the Archiver type
func (*MockArchiver) Finished ¶
func (_m *MockArchiver) Finished() []uint64
Finished provides a mock function with given fields:
func (*MockArchiver) Start ¶
func (_m *MockArchiver) 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