archival

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package archival is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(
	fx.Provide(NewArchiver),
	fx.Provide(func(config *configs.Config) quotas.RateLimiter {
		return quotas.NewDefaultOutgoingRateLimiter(quotas.RateFn(config.ArchivalBackendMaxRPS))
	}),
)

Functions

This section is empty.

Types

type Archiver

type Archiver interface {
	Archive(context.Context, *Request) (*Response, error)
}

Archiver is used to archive workflow history and visibility data. If a target fails, it returns an error, unlike archiver.Client, which will try to signal an archival workflow whenever an error occurs.

func NewArchiver

func NewArchiver(
	archiverProvider provider.ArchiverProvider,
	logger log.Logger,
	metricsHandler metrics.Handler,
	rateLimiter quotas.RateLimiter,
	searchAttributeProvider searchattribute.Provider,
	visibilityManger manager.VisibilityManager,
) Archiver

NewArchiver creates a new Archiver

type MockArchiver

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

MockArchiver is a mock of Archiver interface.

func NewMockArchiver

func NewMockArchiver(ctrl *gomock.Controller) *MockArchiver

NewMockArchiver creates a new mock instance.

func (*MockArchiver) Archive

func (m *MockArchiver) Archive(arg0 context.Context, arg1 *Request) (*Response, error)

Archive mocks base method.

func (*MockArchiver) EXPECT

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

type MockArchiverMockRecorder

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

MockArchiverMockRecorder is the mock recorder for MockArchiver.

func (*MockArchiverMockRecorder) Archive

func (mr *MockArchiverMockRecorder) Archive(arg0, arg1 interface{}) *gomock.Call

Archive indicates an expected call of Archive.

type Request

type Request struct {
	ShardID     int32
	NamespaceID string
	Namespace   string
	WorkflowID  string
	RunID       string

	// history archival
	BranchToken          []byte
	NextEventID          int64
	CloseFailoverVersion int64
	// HistoryURI is the URI of the history archival backend.
	HistoryURI carchiver.URI

	// visibility archival
	WorkflowTypeName string
	StartTime        *timestamppb.Timestamp
	ExecutionTime    *timestamppb.Timestamp
	CloseTime        *timestamppb.Timestamp
	Status           enumspb.WorkflowExecutionStatus
	HistoryLength    int64
	Memo             *commonpb.Memo
	SearchAttributes *commonpb.SearchAttributes
	// VisibilityURI is the URI of the visibility archival backend.
	VisibilityURI carchiver.URI

	// archival targets: history and/or visibility
	Targets       []Target
	CallerService string
}

type Response

type Response struct {
}

type Target

type Target string
const (
	TargetHistory    Target = "history"
	TargetVisibility Target = "visibility"
)

Jump to

Keyboard shortcuts

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