wscom

package
v0.0.0-...-1de58c0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CacheServerGroup map[uint64]string

CacheServerGroup is a read-only map of servers in the group

View Source
var CurrentTopology map[uint64]SuccessorInfo

CurrentTopology is a map containing a list of pid-pid-successors based on the last message received

View Source
var MyPID uint64

MyPID is the Pid of the cache instance running on localhost (whatever that is)

View Source
var SuccessorPID uint64

SuccessorPID is the successor Pid to the cache instance running localhost (needed?)

Functions

func Init

func Init(leaderID uint64, leaderAddr string) error

Init initializes the server group

Types

type Article

type Article struct {
	Key   string // uuid.UUID
	Op    string // {AU, D}
	Valid bool
	Value []byte
	Type  string
}

Article is the central artifact (Set/Get)

type Message

type Message struct {
	OriginID  uint64                   // Origin Pn of message
	Mneumonic string                   // message instruction   (HB,ELECTION,ELECTED,ADD,REMOVE,ACK,JOINREQ)
	SubjectID uint64                   // subjectid refers to the process being tested, proposed for election, being elected, or being added/removed)
	Topology  map[uint64]SuccessorInfo // common map?
}

Message is used for inter-cache comms

type SuccessorInfo

type SuccessorInfo struct {
	PID  uint64
	Addr string
}

SuccessorInfo is used to hold the topology info

var Leader SuccessorInfo

Leader holds the leader Pid and the leader's address

Jump to

Keyboard shortcuts

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