manager

package
v0.1.1-fix-5 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RefreshSPInfoAndStorageParamsTimer define the period of refresh sp info and storage params
	RefreshSPInfoAndStorageParamsTimer = 5 * 60
)

Functions

This section is empty.

Types

type Manager

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

Manager module is responsible for implementing internal management functions. Currently, it supports periodic update of sp info list and storage params information in spdb. TODO::support gc and configuration management, etc.

func NewManagerService

func NewManagerService(cfg *ManagerConfig) (*Manager, error)

NewManagerService returns an instance of manager

func (*Manager) Name

func (m *Manager) Name() string

Name return the manager service name

func (*Manager) Start

func (m *Manager) Start(ctx context.Context) error

Start function start background goroutine to execute refresh sp meta

func (*Manager) Stop

func (m *Manager) Stop(ctx context.Context) error

Stop manager background goroutine

type ManagerConfig

type ManagerConfig struct {
	SpOperatorAddress string
	ChainConfig       *gnfd.GreenfieldChainConfig
	SpDBConfig        *config.SQLDBConfig
}

ManagerConfig defines manager service config

Jump to

Keyboard shortcuts

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