devstack

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNoopNodeDependencyInjector

func NewNoopNodeDependencyInjector() node.NodeDependencyInjector

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

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) (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

type NoopExecutorsFactory

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

func NewNoopExecutorsFactory

func NewNoopExecutorsFactory() *NoopExecutorsFactory

func NewNoopExecutorsFactoryWithConfig

func NewNoopExecutorsFactoryWithConfig(config noop_executor.ExecutorConfig) *NoopExecutorsFactory

func (*NoopExecutorsFactory) Get

type NoopPublishersFactory

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

func NewNoopPublishersFactory

func NewNoopPublishersFactory() *NoopPublishersFactory

func NewNoopPublishersFactoryWithConfig added in v0.3.25

func NewNoopPublishersFactoryWithConfig(config noop_publisher.PublisherConfig) *NoopPublishersFactory

func (*NoopPublishersFactory) Get

type NoopStorageProvidersFactory

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

func NewNoopStorageProvidersFactory

func NewNoopStorageProvidersFactory() *NoopStorageProvidersFactory

func NewNoopStorageProvidersFactoryWithConfig

func NewNoopStorageProvidersFactoryWithConfig(config noop_storage.StorageConfig) *NoopStorageProvidersFactory

func (*NoopStorageProvidersFactory) Get

type NoopVerifiersFactory

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

func NewNoopVerifiersFactory

func NewNoopVerifiersFactory() *NoopVerifiersFactory

func NewNoopVerifiersFactoryWithConfig added in v0.3.25

func NewNoopVerifiersFactoryWithConfig(config noop_verifier.VerifierConfig) *NoopVerifiersFactory

func (*NoopVerifiersFactory) Get

Jump to

Keyboard shortcuts

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