Documentation ¶
Overview ¶
Package jetcoordinator is responsible for all jet manipulations.
Package responsible for jet drops, split/merge jets, choose of validators.
Index ¶
- Constants
- type JetCoordinator
- func (jc *JetCoordinator) Heavy(ctx context.Context, pulse core.PulseNumber) (*core.RecordRef, error)
- func (jc *JetCoordinator) IsAuthorized(ctx context.Context, role core.DynamicRole, obj core.RecordID, ...) (bool, error)
- func (jc *JetCoordinator) LightExecutorForJet(ctx context.Context, jetID core.RecordID, pulse core.PulseNumber) (*core.RecordRef, error)
- func (jc *JetCoordinator) LightExecutorForObject(ctx context.Context, objID core.RecordID, pulse core.PulseNumber) (*core.RecordRef, error)
- func (jc *JetCoordinator) LightValidatorsForJet(ctx context.Context, jetID core.RecordID, pulse core.PulseNumber) ([]core.RecordRef, error)
- func (jc *JetCoordinator) LightValidatorsForObject(ctx context.Context, objID core.RecordID, pulse core.PulseNumber) ([]core.RecordRef, error)
- func (jc *JetCoordinator) Me() core.RecordRef
- func (jc *JetCoordinator) QueryRole(ctx context.Context, role core.DynamicRole, objID core.RecordID, ...) ([]core.RecordRef, error)
- func (jc *JetCoordinator) VirtualExecutorForObject(ctx context.Context, objID core.RecordID, pulse core.PulseNumber) (*core.RecordRef, error)
- func (jc *JetCoordinator) VirtualValidatorsForObject(ctx context.Context, objID core.RecordID, pulse core.PulseNumber) ([]core.RecordRef, error)
Constants ¶
View Source
const ( VirtualValidatorCount = 3 MaterialValidatorCount = 3 VirtualExecutorCount = 1 MaterialExecutorCount = 1 )
Hardcoded roles count for validation and execution
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JetCoordinator ¶
type JetCoordinator struct { NodeNet core.NodeNetwork `inject:""` PlatformCryptographyScheme core.PlatformCryptographyScheme `inject:""` PulseStorage core.PulseStorage `inject:""` JetStorage storage.JetStorage `inject:""` PulseTracker storage.PulseTracker `inject:""` storage.ActiveNodesStorage `inject:""` }
JetCoordinator is responsible for all jet interactions
func NewJetCoordinator ¶ added in v0.0.5
func NewJetCoordinator() *JetCoordinator
NewJetCoordinator creates new coordinator instance.
func (*JetCoordinator) Heavy ¶ added in v0.7.5
func (jc *JetCoordinator) Heavy(ctx context.Context, pulse core.PulseNumber) (*core.RecordRef, error)
func (*JetCoordinator) IsAuthorized ¶ added in v0.2.0
func (jc *JetCoordinator) IsAuthorized( ctx context.Context, role core.DynamicRole, obj core.RecordID, pulse core.PulseNumber, node core.RecordRef, ) (bool, error)
IsAuthorized checks for role on concrete pulse for the address.
func (*JetCoordinator) LightExecutorForJet ¶ added in v0.7.5
func (jc *JetCoordinator) LightExecutorForJet( ctx context.Context, jetID core.RecordID, pulse core.PulseNumber, ) (*core.RecordRef, error)
func (*JetCoordinator) LightExecutorForObject ¶ added in v0.7.5
func (jc *JetCoordinator) LightExecutorForObject( ctx context.Context, objID core.RecordID, pulse core.PulseNumber, ) (*core.RecordRef, error)
func (*JetCoordinator) LightValidatorsForJet ¶ added in v0.7.5
func (jc *JetCoordinator) LightValidatorsForJet( ctx context.Context, jetID core.RecordID, pulse core.PulseNumber, ) ([]core.RecordRef, error)
func (*JetCoordinator) LightValidatorsForObject ¶ added in v0.7.5
func (jc *JetCoordinator) LightValidatorsForObject( ctx context.Context, objID core.RecordID, pulse core.PulseNumber, ) ([]core.RecordRef, error)
func (*JetCoordinator) Me ¶ added in v0.7.5
func (jc *JetCoordinator) Me() core.RecordRef
Me returns current node.
func (*JetCoordinator) QueryRole ¶ added in v0.2.0
func (jc *JetCoordinator) QueryRole( ctx context.Context, role core.DynamicRole, objID core.RecordID, pulse core.PulseNumber, ) ([]core.RecordRef, error)
QueryRole returns node refs responsible for role bound operations for given object and pulse.
func (*JetCoordinator) VirtualExecutorForObject ¶ added in v0.7.5
func (jc *JetCoordinator) VirtualExecutorForObject( ctx context.Context, objID core.RecordID, pulse core.PulseNumber, ) (*core.RecordRef, error)
func (*JetCoordinator) VirtualValidatorsForObject ¶ added in v0.7.5
func (jc *JetCoordinator) VirtualValidatorsForObject( ctx context.Context, objID core.RecordID, pulse core.PulseNumber, ) ([]core.RecordRef, error)
Click to show internal directories.
Click to hide internal directories.