stopserving

package
v0.2.0-fix-2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DiscontinueReason defines the reason for stop serving
	DiscontinueReason = "testnet cleanup"

	// FetchBucketsLimit define the max buckets to fetch in a single request
	FetchBucketsLimit = int64(500)
	// FetchBucketsInterval define the interval to fetch buckets for stop serving
	FetchBucketsInterval = 5 * time.Minute
)

Variables

View Source
var DefaultDiscontinueConfig = &DiscontinueConfig{
	BucketKeepAliveDays: 7,
}

Functions

This section is empty.

Types

type DiscontinueConfig

type DiscontinueConfig struct {
	BucketKeepAliveDays int
}

type StopServing

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

StopServing module is responsible for stop serving buckets on testnet.

func NewStopServingService

func NewStopServingService(cfg *StopServingConfig) (*StopServing, error)

NewStopServingService returns an instance of stop serving

func (*StopServing) Name

func (s *StopServing) Name() string

Name return the stop serving service name

func (*StopServing) Start

func (s *StopServing) Start(ctx context.Context) error

Start function start background goroutine to execute stop serving

func (*StopServing) Stop

func (s *StopServing) Stop(ctx context.Context) error

Stop stops serving background goroutine

type StopServingConfig

type StopServingConfig struct {
	SpOperatorAddress   string
	SignerGrpcAddress   string
	MetadataGrpcAddress string

	DiscontinueConfig *DiscontinueConfig
}

StopServingConfig defines StopServing service config

Jump to

Keyboard shortcuts

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