Documentation ¶
Index ¶
- Constants
- type PieceDataReader
- type TaskNode
- func (taskNode *TaskNode) Name() string
- func (taskNode *TaskNode) QueryReplicatingObject(ctx context.Context, req *types.QueryReplicatingObjectRequest) (resp *types.QueryReplicatingObjectResponse, err error)
- func (taskNode *TaskNode) ReplicateObject(ctx context.Context, req *types.ReplicateObjectRequest) (*types.ReplicateObjectResponse, error)
- func (taskNode *TaskNode) Start(ctx context.Context) error
- func (taskNode *TaskNode) Stop(ctx context.Context) error
- type TaskNodeConfig
Constants ¶
View Source
const ( // ReplicateFactor defines the redundancy of replication // TODO:: will update to (1, 2] on main net ReplicateFactor = 1 // GetApprovalTimeout defines the timeout of getting secondary sp approval GetApprovalTimeout = 10 // MaxSealRetryNumber defines max number of retrying seal object MaxSealRetryNumber = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PieceDataReader ¶ added in v0.2.0
type PieceDataReader struct {
// contains filtered or unexported fields
}
PieceDataReader defines [][]pieceData Reader.
type TaskNode ¶
type TaskNode struct {
// contains filtered or unexported fields
}
TaskNode as background min execution unit, execute storage provider's background tasks implements the gRPC of TaskNodeService, TODO :: TaskNode support more task types, such as gc etc.
func NewTaskNodeService ¶
func NewTaskNodeService(cfg *TaskNodeConfig) (*TaskNode, error)
NewTaskNodeService return an instance of TaskNode and init resource
func (*TaskNode) QueryReplicatingObject ¶
func (taskNode *TaskNode) QueryReplicatingObject(ctx context.Context, req *types.QueryReplicatingObjectRequest) ( resp *types.QueryReplicatingObjectResponse, err error)
QueryReplicatingObject query a replicating object information by object id
func (*TaskNode) ReplicateObject ¶
func (taskNode *TaskNode) ReplicateObject(ctx context.Context, req *types.ReplicateObjectRequest) ( *types.ReplicateObjectResponse, error)
ReplicateObject call AsyncReplicateObject non-blocking upstream services
type TaskNodeConfig ¶
type TaskNodeConfig struct { SpOperatorAddress string GRPCAddress string SignerGrpcAddress string P2PGrpcAddress string SpDBConfig *config.SQLDBConfig PieceStoreConfig *storage.PieceStoreConfig ChainConfig *greenfield.GreenfieldChainConfig }
TaskNodeConfig defines TaskNode service config
Source Files ¶
Click to show internal directories.
Click to hide internal directories.