candidate

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Candidate

type Candidate struct {
	fx.In

	*common.CommonAPI
	*asset.Asset
	*device.Device
	*vd.Validation
	*datasync.DataSync
	Scheduler api.Scheduler
	Config    *config.CandidateCfg
}

Candidate represents the c node.

func (*Candidate) CalculateExitProfit added in v0.1.21

func (c *Candidate) CalculateExitProfit(ctx context.Context) (types.ExitProfitRsp, error)

func (*Candidate) CheckNetworkConnectable added in v0.1.18

func (c *Candidate) CheckNetworkConnectable(ctx context.Context, network, targetURL string) (bool, error)

func (*Candidate) CheckNetworkConnectivity

func (c *Candidate) CheckNetworkConnectivity(ctx context.Context, network, targetURL string) error

checkNetworkConnectivity check tcp or udp network connectivity network is "tcp" or "udp"

func (*Candidate) DeactivateNode added in v0.1.21

func (c *Candidate) DeactivateNode(ctx context.Context) error

func (*Candidate) GetBlocksWithAssetCID

func (c *Candidate) GetBlocksWithAssetCID(ctx context.Context, assetCID string, randomSeed int64, randomCount int) ([]string, error)

GetBlocksWithAssetCID returns a map of blocks with given asset CID, random seed, and random count.

func (*Candidate) GetExternalAddress

func (c *Candidate) GetExternalAddress(ctx context.Context) (string, error)

GetExternalAddress retrieves the external address of the caller.

func (*Candidate) GetMinioConfig added in v0.1.11

func (c *Candidate) GetMinioConfig(ctx context.Context) (*types.MinioConfig, error)

func (*Candidate) WaitQuiet

func (c *Candidate) WaitQuiet(ctx context.Context) error

WaitQuiet does nothing and returns nil error.

Jump to

Keyboard shortcuts

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