jetcoordinator

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package jetcoordinator is responsible for all jet manipulations.

Package responsible for jet drops, split/merge jets, choose of validators.

Index

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)

Jump to

Keyboard shortcuts

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