svc

package
v0.0.0-...-c590095 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TRYTIMES = 3
View Source
var WAITTIME = 10

Functions

func RegisterDrivers

func RegisterDrivers(svcCtx *ServiceContext)

Types

type DriverCenter

type DriverCenter struct {
	Total   int64
	Success int64

	Failed map[int64]error
	// contains filtered or unexported fields
}

func (*DriverCenter) GetDriver

func (d *DriverCenter) GetDriver(id int64) (driver.Driver, error)

func (*DriverCenter) InitDriver

func (dc *DriverCenter) InitDriver(OutTime time.Duration, enabledStoreages []*storage_manager.StorageModel)

func (*DriverCenter) UpdataStorageStatus

func (dc *DriverCenter) UpdataStorageStatus(scv *ServiceContext)

type ServiceContext

type ServiceContext struct {
	Config           config.Config
	StorageManageRpc storagemanager.StorageManager
	DriverCenter     DriverCenter
}

func NewServiceContext

func NewServiceContext(c config.Config) *ServiceContext

Jump to

Keyboard shortcuts

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