app

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Code generated by MockGen. DO NOT EDIT. Source: bucket_processor.go

Generated by this command:

mockgen -source=bucket_processor.go -destination=mock_bucket_processor.go -package=app -write_package_comment=false

Code generated by MockGen. DO NOT EDIT. Source: bucket_selector.go

Generated by this command:

mockgen -source=bucket_selector.go -destination=mock_bucket_selector.go -package=app -write_package_comment=false

Code generated by MockGen. DO NOT EDIT. Source: clearing_state.go

Generated by this command:

mockgen -source=clearing_state.go -destination=mock_clearing_state.go -package=app -write_package_comment=false

Code generated by MockGen. DO NOT EDIT. Source: display_manager.go

Generated by this command:

mockgen -source=display_manager.go -destination=mock_display_manager.go -package=app -write_package_comment=false

Index

Constants

View Source
const (
	UnspecifiedConcurrencyNumber = 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Cli                  *cli.App
	BucketNames          *cli.StringSlice
	Profile              string
	Region               string
	ForceMode            bool
	InteractiveMode      bool
	OldVersionsOnly      bool
	QuietMode            bool
	ConcurrentMode       bool
	ConcurrencyNumber    int
	DirectoryBucketsMode bool
	TableBucketsMode     bool
	// contains filtered or unexported fields
}

func NewApp

func NewApp(version string) *App

func (*App) Run

func (a *App) Run(ctx context.Context) error

type BucketProcessor added in v0.25.0

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

BucketProcessor handles all bucket processing operations

func NewBucketProcessor added in v0.25.0

func NewBucketProcessor(
	config BucketProcessorConfig,
	s3Wrapper wrapper.IWrapper,
) *BucketProcessor

NewBucketProcessor creates a new BucketProcessor instance

func (*BucketProcessor) Process added in v0.25.0

func (p *BucketProcessor) Process(ctx context.Context) error

Process executes the bucket processing workflow

type BucketProcessorConfig added in v0.25.0

type BucketProcessorConfig struct {
	TargetBuckets     []string
	QuietMode         bool
	ConcurrentMode    bool
	ConcurrencyNumber int
	ForceMode         bool
	OldVersionsOnly   bool
}

BucketProcessorConfig contains all configuration parameters for bucket processing operations

type BucketSelector added in v0.25.0

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

BucketSelector handles the selection of buckets through either interactive mode or command line arguments

func NewBucketSelector added in v0.25.0

func NewBucketSelector(interactiveMode bool, bucketNames *cli.StringSlice, s3Wrapper wrapper.IWrapper) *BucketSelector

NewBucketSelector creates a new BucketSelector instance

func (*BucketSelector) SelectBuckets added in v0.25.0

func (s *BucketSelector) SelectBuckets(ctx context.Context) ([]string, bool, error)

SelectBuckets selects buckets based on the mode (interactive or command line) Returns the selected buckets, a continuation flag, and any error that occurred

type ClearingState added in v0.25.0

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

ClearingState manages the state of bucket clearing operations

func NewClearingState added in v0.25.0

func NewClearingState(targetBuckets []string, s3Wrapper wrapper.IWrapper, forceMode bool) *ClearingState

NewClearingState initializes a new ClearingState instance

func (*ClearingState) GetChannelsForBucket added in v0.25.0

func (s *ClearingState) GetChannelsForBucket(bucket string) (chan int64, chan bool)

GetChannelsForBucket returns the channels associated with a specific bucket

func (*ClearingState) OutputFinalMessages added in v0.25.0

func (s *ClearingState) OutputFinalMessages(targetBuckets []string) error

OutputFinalMessages displays the final status messages for all buckets

func (*ClearingState) StartDisplayRoutines added in v0.25.0

func (s *ClearingState) StartDisplayRoutines(targetBuckets []string, writer *io.Writer) *errgroup.Group

StartDisplayRoutines initializes and starts the display monitoring routines

type DisplayManager added in v0.25.0

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

DisplayManager handles the lifecycle of display operations

func NewDisplayManager added in v0.25.0

func NewDisplayManager(state IClearingState, quietMode bool) *DisplayManager

NewDisplayManager creates a new DisplayManager instance

func (*DisplayManager) Finish added in v0.25.0

func (d *DisplayManager) Finish(targetBuckets []string) error

Finish waits for display operations to complete and performs cleanup

func (*DisplayManager) Start added in v0.25.0

func (d *DisplayManager) Start(targetBuckets []string)

Start initializes and starts the display operations

type IBucketProcessor added in v0.25.0

type IBucketProcessor interface {
	Process(ctx context.Context) error
}

type IBucketSelector added in v0.25.0

type IBucketSelector interface {
	SelectBuckets(ctx context.Context) ([]string, bool, error)
}

type IClearingState added in v0.25.0

type IClearingState interface {
	StartDisplayRoutines(targetBuckets []string, writer *io.Writer) *errgroup.Group
	OutputFinalMessages(targetBuckets []string) error
	GetChannelsForBucket(bucket string) (chan int64, chan bool)
}

type IDisplayManager added in v0.25.0

type IDisplayManager interface {
	Start(targetBuckets []string)
	Finish(targetBuckets []string) error
}

type MockIBucketProcessor added in v0.25.0

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

MockIBucketProcessor is a mock of IBucketProcessor interface.

func NewMockIBucketProcessor added in v0.25.0

func NewMockIBucketProcessor(ctrl *gomock.Controller) *MockIBucketProcessor

NewMockIBucketProcessor creates a new mock instance.

func (*MockIBucketProcessor) EXPECT added in v0.25.0

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

func (*MockIBucketProcessor) Process added in v0.25.0

func (m *MockIBucketProcessor) Process(ctx context.Context) error

Process mocks base method.

type MockIBucketProcessorMockRecorder added in v0.25.0

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

MockIBucketProcessorMockRecorder is the mock recorder for MockIBucketProcessor.

func (*MockIBucketProcessorMockRecorder) Process added in v0.25.0

func (mr *MockIBucketProcessorMockRecorder) Process(ctx any) *gomock.Call

Process indicates an expected call of Process.

type MockIBucketSelector added in v0.25.0

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

MockIBucketSelector is a mock of IBucketSelector interface.

func NewMockIBucketSelector added in v0.25.0

func NewMockIBucketSelector(ctrl *gomock.Controller) *MockIBucketSelector

NewMockIBucketSelector creates a new mock instance.

func (*MockIBucketSelector) EXPECT added in v0.25.0

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

func (*MockIBucketSelector) SelectBuckets added in v0.25.0

func (m *MockIBucketSelector) SelectBuckets(ctx context.Context) ([]string, bool, error)

SelectBuckets mocks base method.

type MockIBucketSelectorMockRecorder added in v0.25.0

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

MockIBucketSelectorMockRecorder is the mock recorder for MockIBucketSelector.

func (*MockIBucketSelectorMockRecorder) SelectBuckets added in v0.25.0

func (mr *MockIBucketSelectorMockRecorder) SelectBuckets(ctx any) *gomock.Call

SelectBuckets indicates an expected call of SelectBuckets.

type MockIClearingState added in v0.25.0

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

MockIClearingState is a mock of IClearingState interface.

func NewMockIClearingState added in v0.25.0

func NewMockIClearingState(ctrl *gomock.Controller) *MockIClearingState

NewMockIClearingState creates a new mock instance.

func (*MockIClearingState) EXPECT added in v0.25.0

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

func (*MockIClearingState) GetChannelsForBucket added in v0.25.0

func (m *MockIClearingState) GetChannelsForBucket(bucket string) (chan int64, chan bool)

GetChannelsForBucket mocks base method.

func (*MockIClearingState) OutputFinalMessages added in v0.25.0

func (m *MockIClearingState) OutputFinalMessages(targetBuckets []string) error

OutputFinalMessages mocks base method.

func (*MockIClearingState) StartDisplayRoutines added in v0.25.0

func (m *MockIClearingState) StartDisplayRoutines(targetBuckets []string, writer *io.Writer) *errgroup.Group

StartDisplayRoutines mocks base method.

type MockIClearingStateMockRecorder added in v0.25.0

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

MockIClearingStateMockRecorder is the mock recorder for MockIClearingState.

func (*MockIClearingStateMockRecorder) GetChannelsForBucket added in v0.25.0

func (mr *MockIClearingStateMockRecorder) GetChannelsForBucket(bucket any) *gomock.Call

GetChannelsForBucket indicates an expected call of GetChannelsForBucket.

func (*MockIClearingStateMockRecorder) OutputFinalMessages added in v0.25.0

func (mr *MockIClearingStateMockRecorder) OutputFinalMessages(targetBuckets any) *gomock.Call

OutputFinalMessages indicates an expected call of OutputFinalMessages.

func (*MockIClearingStateMockRecorder) StartDisplayRoutines added in v0.25.0

func (mr *MockIClearingStateMockRecorder) StartDisplayRoutines(targetBuckets, writer any) *gomock.Call

StartDisplayRoutines indicates an expected call of StartDisplayRoutines.

type MockIDisplayManager added in v0.25.0

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

MockIDisplayManager is a mock of IDisplayManager interface.

func NewMockIDisplayManager added in v0.25.0

func NewMockIDisplayManager(ctrl *gomock.Controller) *MockIDisplayManager

NewMockIDisplayManager creates a new mock instance.

func (*MockIDisplayManager) EXPECT added in v0.25.0

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

func (*MockIDisplayManager) Finish added in v0.25.0

func (m *MockIDisplayManager) Finish(targetBuckets []string) error

Finish mocks base method.

func (*MockIDisplayManager) Start added in v0.25.0

func (m *MockIDisplayManager) Start(targetBuckets []string)

Start mocks base method.

type MockIDisplayManagerMockRecorder added in v0.25.0

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

MockIDisplayManagerMockRecorder is the mock recorder for MockIDisplayManager.

func (*MockIDisplayManagerMockRecorder) Finish added in v0.25.0

func (mr *MockIDisplayManagerMockRecorder) Finish(targetBuckets any) *gomock.Call

Finish indicates an expected call of Finish.

func (*MockIDisplayManagerMockRecorder) Start added in v0.25.0

func (mr *MockIDisplayManagerMockRecorder) Start(targetBuckets any) *gomock.Call

Start indicates an expected call of Start.

Jump to

Keyboard shortcuts

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