authenticatedbc

package
v0.0.0-...-7c6133f Latest Latest
Warning

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

Go to latest
Published: May 30, 2016 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAuthenticatedBC

func CreateAuthenticatedBC(pp *px.Pack) (*AuthAcceptor, *AuthPublisher, *AuthLearner)

Create the three authenticated broadcast actors from the PaxosPack.

func KeysByID

func KeysByID(id grp.ID, pathToKeys string) (map[int][]byte, error)

Function for retrieving the keys needed for a single node

Types

type AuthAcceptor

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

func NewAuthAcceptor

func NewAuthAcceptor(pp *px.Pack) *AuthAcceptor

Construct a new AuthAcceptor.

func (*AuthAcceptor) GetMaxSlot

func (aa *AuthAcceptor) GetMaxSlot(release <-chan bool) *px.AcceptorSlotMap

func (*AuthAcceptor) GetState

func (aa *AuthAcceptor) GetState(afterSlot px.SlotID, release <-chan bool) *px.AcceptorSlotMap

func (*AuthAcceptor) SetLowSlot

func (aa *AuthAcceptor) SetLowSlot(slot px.SlotID)

func (*AuthAcceptor) SetState

func (aa *AuthAcceptor) SetState(slotmap *px.AcceptorSlotMap)

func (*AuthAcceptor) Start

func (aa *AuthAcceptor) Start()

func (*AuthAcceptor) Stop

func (aa *AuthAcceptor) Stop()

type AuthLearner

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

func NewAuthLearner

func NewAuthLearner(pp *px.Pack) *AuthLearner

Construct a new AuthLearner

func (*AuthLearner) Start

func (l *AuthLearner) Start()

func (*AuthLearner) Stop

func (l *AuthLearner) Stop()

Stops the learner

type AuthManager

type AuthManager struct {
	ID   grp.ID
	Keys map[int][]byte
}

func NewAuthManager

func NewAuthManager(id grp.ID, conf *config.Config) *AuthManager

type AuthPublisher

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

func NewAuthPublisher

func NewAuthPublisher(pp *px.Pack) *AuthPublisher

Construct a new AuthPublisher

func (*AuthPublisher) SetNextSlot

func (p *AuthPublisher) SetNextSlot(ns px.SlotID)

**************************************************************** Not used by RelBC, but needed to fulfill the actor interface ****************************************************************

func (*AuthPublisher) Start

func (p *AuthPublisher) Start()

func (*AuthPublisher) Stop

func (p *AuthPublisher) Stop()

Stops the publisher

type DcdRnd

type DcdRnd struct {
	Rnd uint
}

type Forward

type Forward struct {
	ID   grp.ID
	Hash uint32
	Rnd  uint
	Hmac []byte
}

type Publish

type Publish struct {
	ID   grp.ID
	Rnd  uint
	Val  paxos.Value
	Hmac []byte
}

type Round

type Round struct {
	RndID    uint
	Forwards map[grp.ID]Forward
	Decided  bool
	SntReq   bool
	Learned  bool
	Val      paxos.Value
}

This is the data a reliable broadcast learner require for each round.

type RoundStorage

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

Slice that stores the learner rounds

func NewRoundStorage

func NewRoundStorage(length uint) *RoundStorage

func (*RoundStorage) Get

func (ls *RoundStorage) Get(rnd uint) *Round

Retrieves the correct value from the slice

func (*RoundStorage) IsValid

func (ls *RoundStorage) IsValid(rnd uint) bool

Checks if the round is still valid

type ValReq

type ValReq struct {
	Rnd uint
}

type ValResp

type ValResp struct {
	Rnd uint
	Val paxos.Value
}

Jump to

Keyboard shortcuts

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