Documentation ¶
Index ¶
- Constants
- Variables
- func MustUnmarshal(encoded []byte, pb proto.Message)
- func NewFrontend(inviteMacKey []byte) *frontend
- func OpenServer(dbpath string, sk *[ed25519.PrivateKeySize]byte, communicator *communicator, ...) (*server, error)
- func StartFromConfig(cfg *ServerConfig) *server
- func StartFromConfigFile(path string) *server
- type MerkleMap
- type Message
- type MessageBroker
- func (mb *MessageBroker) Collect(round uint64, phase int, reminder *SignedServerMessage) chan *Message
- func (mb *MessageBroker) Notify(round uint64, phase int) chan struct{}
- func (mb *MessageBroker) OnReceive(msg *Message)
- func (mb *MessageBroker) StartWaitingFor(callback func(*Message) (bool, bool))
- type ServerConfig
- type ServerInfo
Constants ¶
View Source
const ( HASH_BYTES = 32 HASH_BITS = HASH_BYTES * 8 DB_PREFIX = 'T' )
View Source
const ( PHASE_HASH_OPS = 1 + iota PHASE_HASH_HASHES PHASE_OPS PHASE_HASH_STATE )
View Source
const DOWNLOAD_INTERVAL = 300 * time.Millisecond
Variables ¶
View Source
var WO_sync = &opt.WriteOptions{Sync: true}
Functions ¶
func MustUnmarshal ¶
func NewFrontend ¶
func NewFrontend(inviteMacKey []byte) *frontend
func OpenServer ¶
func StartFromConfig ¶
func StartFromConfig(cfg *ServerConfig) *server
func StartFromConfigFile ¶
func StartFromConfigFile(path string) *server
Types ¶
type MerkleMap ¶
type MerkleMap struct {
// contains filtered or unexported fields
}
func OpenMerkleMap ¶
func OpenMerkleMap(db mmDB) *MerkleMap
func (*MerkleMap) GetRootHash ¶
type Message ¶
type Message struct { SignedServerMessage_ServerMessage SignedServerMessage *SignedServerMessage }
type MessageBroker ¶
func (*MessageBroker) Collect ¶
func (mb *MessageBroker) Collect(round uint64, phase int, reminder *SignedServerMessage) chan *Message
func (*MessageBroker) Notify ¶
func (mb *MessageBroker) Notify(round uint64, phase int) chan struct{}
func (*MessageBroker) OnReceive ¶
func (mb *MessageBroker) OnReceive(msg *Message)
func (*MessageBroker) StartWaitingFor ¶
func (mb *MessageBroker) StartWaitingFor(callback func(*Message) (bool, bool))
type ServerConfig ¶
type ServerConfig struct { Backend struct { DataDirectory string SigningKeyPath string Listen string // address:port ConsensusThreshold int } Frontend struct { Listen string // address:port TLSCertPath string TLSKeyPath string InviteKeyPath string } Server map[string]*struct { PublicKey string // base64 encoded IsCore bool } }
type ServerInfo ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.