coordinator

package
v0.0.0-...-6b33518 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: AGPL-3.0-or-later Imports: 21 Imported by: 0

Documentation

Overview

Package coordinator implements the entry/coordinator server.

Index

Constants

This section is empty.

Variables

View Source
var ErrServerClosed = errors.New("coordinator: server closed")

Functions

This section is empty.

Types

type MailboxURL

type MailboxURL struct {
	Round        uint32
	URL          string
	NumMailboxes uint32
}

type MixRound

type MixRound struct {
	MixSettings   mixnet.RoundSettings
	MixSignatures [][]byte
	EndTime       time.Time
}

type NewRound

type NewRound struct {
	Round      uint32
	ConfigHash string
}

type OnionMsg

type OnionMsg struct {
	Round uint32
	Onion []byte
}

type PKGRound

type PKGRound struct {
	Round       uint32
	PKGSettings pkg.RoundSettings
}

type RoundError

type RoundError struct {
	Round uint32
	Err   string
}

type Server

type Server struct {
	Service    string // "AddFriend" or "Dialing"
	PrivateKey ed25519.PrivateKey
	Log        *log.Logger

	ConfigClient *config.Client

	PKGWait      time.Duration
	MixWait      time.Duration
	RoundWait    time.Duration
	NumMailboxes uint32

	PersistPath string
	// contains filtered or unexported fields
}

Server is the coordinator (entry) server for the add-friend or dialing protocols. Currently, clients connect to the server using websockets, but this might change if we find that websockets don't work well with long add-friend rounds.

func (*Server) Close

func (srv *Server) Close() error

func (*Server) LoadPersistedState

func (srv *Server) LoadPersistedState() error

func (*Server) Persist

func (srv *Server) Persist() error

func (*Server) Run

func (srv *Server) Run() error

func (*Server) ServeHTTP

func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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