jetcoordinator

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: Apache-2.0 Imports: 8 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JetCoordinator

type JetCoordinator struct {
	NodeNet                    core.NodeNetwork                `inject:""`
	PlatformCryptographyScheme core.PlatformCryptographyScheme `inject:""`
	// contains filtered or unexported fields
}

JetCoordinator is responsible for all jet interactions

func NewJetCoordinator added in v0.0.5

func NewJetCoordinator(db *storage.DB, conf configuration.JetCoordinator) *JetCoordinator

NewJetCoordinator creates new coordinator instance.

func (*JetCoordinator) GetActiveNodes added in v0.6.3

func (jc *JetCoordinator) GetActiveNodes(pulse core.PulseNumber) ([]core.Node, error)

GetActiveNodes return active nodes for specified pulse.

func (*JetCoordinator) IsAuthorized added in v0.2.0

func (jc *JetCoordinator) IsAuthorized(
	ctx context.Context,
	role core.DynamicRole,
	obj *core.RecordRef,
	pulse core.PulseNumber,
	node core.RecordRef,
) (bool, error)

IsAuthorized checks for role on concrete pulse for the address.

func (*JetCoordinator) QueryRole added in v0.2.0

func (jc *JetCoordinator) QueryRole(
	ctx context.Context,
	role core.DynamicRole,
	obj *core.RecordRef,
	pulse core.PulseNumber,
) ([]core.RecordRef, error)

QueryRole returns node refs responsible for role bound operations for given object and pulse.

type JetNode added in v0.2.0

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

JetNode represents node in Jet tree.

func (*JetNode) GetContaining added in v0.2.0

func (jn *JetNode) GetContaining(objRef *core.RecordRef) *core.RecordRef

GetContaining returns leaf node reference. Leaf node is a jet host for provided objRef.

Jump to

Keyboard shortcuts

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