devstack

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNoopExecutorsFactory

func NewNoopExecutorsFactory() node.ExecutorsFactory

func NewNoopExecutorsFactoryWithConfig

func NewNoopExecutorsFactoryWithConfig(config noop_executor.ExecutorConfig) node.ExecutorsFactory

func NewNoopNodeDependencyInjector

func NewNoopNodeDependencyInjector() node.NodeDependencyInjector

Noop implementations of node factories used to mock certain components, which is useful for testing.

func NewNoopPublishersFactory

func NewNoopPublishersFactory() node.PublishersFactory

func NewNoopPublishersFactoryWithConfig added in v0.3.25

func NewNoopPublishersFactoryWithConfig(config noop_publisher.PublisherConfig) node.PublishersFactory

func NewNoopStorageProvidersFactory

func NewNoopStorageProvidersFactory() node.StorageProvidersFactory

func NewNoopStorageProvidersFactoryWithConfig

func NewNoopStorageProvidersFactoryWithConfig(config noop_storage.StorageConfig) node.StorageProvidersFactory

func NewNoopVerifiersFactory

func NewNoopVerifiersFactory() node.VerifiersFactory

func NewNoopVerifiersFactoryWithConfig added in v0.3.25

func NewNoopVerifiersFactoryWithConfig(config noop_verifier.VerifierConfig) node.VerifiersFactory

func ToIPFSClients

func ToIPFSClients(nodes []*node.Node) []ipfs.Client

Types

type CloserWithContext

type CloserWithContext interface {
	// Close closes the resource.
	Close(context.Context) error
}

type DevStack

type DevStack struct {
	Nodes          []*node.Node
	Lotus          *LotusNode
	PublicIPFSMode bool
}

func NewDevStack

func NewDevStack(
	ctx context.Context,
	cm *system.CleanupManager,
	options DevStackOptions,
	computeConfig node.ComputeConfig,
	requesterNodeConfig node.RequesterConfig,
	injector node.NodeDependencyInjector,
	nodeOverrides ...node.NodeConfig,
) (*DevStack, error)

func NewDevStackForRunLocal

func NewDevStackForRunLocal(
	ctx context.Context,
	cm *system.CleanupManager,
	count int,
	jobGPU uint64,
) (*DevStack, error)

func NewNoopDevStack

func NewNoopDevStack(
	ctx context.Context,
	cm *system.CleanupManager,
	options DevStackOptions,
	computeConfig node.ComputeConfig,
	requesterNodeConfig node.RequesterConfig,
) (*DevStack, error)

func NewStandardDevStack

func NewStandardDevStack(
	ctx context.Context,
	cm *system.CleanupManager,
	options DevStackOptions,
	computeConfig node.ComputeConfig,
	requesterNodeConfig node.RequesterConfig,
) (*DevStack, error)

func (*DevStack) GetNode

func (stack *DevStack) GetNode(_ context.Context, nodeID string) (
	*node.Node, error)

func (*DevStack) GetNodeIds

func (stack *DevStack) GetNodeIds() ([]string, error)

func (*DevStack) IPFSClients

func (stack *DevStack) IPFSClients() []ipfs.Client

func (*DevStack) PrintNodeInfo

func (stack *DevStack) PrintNodeInfo(ctx context.Context, cm *system.CleanupManager) (string, error)

type DevStackIPFS

type DevStackIPFS struct {
	IPFSClients    []ipfs.Client
	CleanupManager *system.CleanupManager
}

func NewDevStackIPFS

func NewDevStackIPFS(ctx context.Context, cm *system.CleanupManager, count int) (*DevStackIPFS, error)

NewDevStackIPFS creates a devstack but with only IPFS servers connected to each other

type DevStackOptions

type DevStackOptions struct {
	NumberOfHybridNodes        int    // Number of nodes to start in the cluster
	NumberOfRequesterOnlyNodes int    // Number of nodes to start in the cluster
	NumberOfComputeOnlyNodes   int    // Number of nodes to start in the cluster
	NumberOfBadComputeActors   int    // Number of compute nodes to be bad actors
	NumberOfBadRequesterActors int    // Number of requester nodes to be bad actors
	Peer                       string // Connect node 0 to another network node
	PublicIPFSMode             bool   // Use public IPFS nodes
	LocalNetworkLotus          bool
	FilecoinUnsealedPath       string
	EstuaryAPIKey              string
	SimulatorAddr              string // if this is set, we will use the simulator transport
	SimulatorMode              bool   // if this is set, the first node will be a simulator node and will use the simulator transport
	CPUProfilingFile           string
	MemoryProfilingFile        string
	DisabledFeatures           node.FeatureConfig
	AllowListedLocalPaths      []string // Local paths that are allowed to be mounted into jobs
}

type LotusNode

type LotusNode struct {

	// UploadDir is the directory where files to be uploaded to Lotus should be stored
	UploadDir string
	// PathDir is the directory will be used as `$LOTUS_PATH`, containing various bits of config
	PathDir string
	// contains filtered or unexported fields
}

func (*LotusNode) Close

func (l *LotusNode) Close(ctx context.Context) error

Jump to

Keyboard shortcuts

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