Documentation ¶
Overview ¶
This file presents a generic two phase commit type with associated method calls
this allows for less code duplicaton and inter module dependencies
Index ¶
- func CV(in []uint64) float64
- func Dev(mean, v float64) float64
- func Devs(keys []uint64) []float64
- func GenId(machineid uint64, coor bool) uint64
- func GenLogger(verbose bool, prefix string, disableLog bool) (printer func(a ...interface{}), verbosePrinter func(a ...interface{}))
- func GenMachineId() uint64
- func GetTimeNano() uint64
- func MakeConnection(rs RemoteServer) (*rpc.Client, error)
- func Mean(in []uint64) float64
- func StdDev(in []uint64) float64
- func Trace(s string)
- func Un(s string) int64
- func ValidateIP(ip string) bool
- func ValidatePort(port string) bool
- type StringStringMap
- type TwoPhaseCommit
- type Uint64ServerMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTimeNano ¶
func GetTimeNano() uint64
func MakeConnection ¶
right now doesn't do much right now will cache connections when I get around to it (Maxwell)
func ValidateIP ¶
func ValidatePort ¶
Types ¶
type StringStringMap ¶
type StringStringMap struct {
// contains filtered or unexported fields
}
func NewStringStringFromMap ¶
func NewStringStringFromMap(dirname string, old map[string]string) StringStringMap
func NewStringStringMap ¶
func NewStringStringMap(dirname string) StringStringMap
func (*StringStringMap) Delete ¶
func (m *StringStringMap) Delete(key string) error
func (*StringStringMap) KeyChan ¶
func (m *StringStringMap) KeyChan() <-chan string
func (*StringStringMap) Map ¶
func (m *StringStringMap) Map() map[string]string
func (*StringStringMap) Put ¶
func (m *StringStringMap) Put(key, value string) error
type TwoPhaseCommit ¶
type TwoPhaseCommit struct {
// contains filtered or unexported fields
}
func InitTPC ¶
func InitTPC(acceptors map[uint64]RemoteServer, id uint64, localPreCommit func(), localCommit func(), localAbort func(), remotePreCommit func(rs RemoteServer) (bool, error), remoteCommit func(rs RemoteServer) map[string]string, remoteAbort func(rs RemoteServer) map[string]string, failure func(rs RemoteServer, e error), wait bool) TwoPhaseCommit
type Uint64ServerMap ¶
type Uint64ServerMap struct {
// contains filtered or unexported fields
}
func NewUint64ServerFromMap ¶
func NewUint64ServerFromMap(dirname string, old map[uint64]RemoteServer) Uint64ServerMap
func NewUint64ServerMap ¶
func NewUint64ServerMap(dirname string) Uint64ServerMap
func (*Uint64ServerMap) Delete ¶
func (m *Uint64ServerMap) Delete(key uint64) error
func (*Uint64ServerMap) Get ¶
func (m *Uint64ServerMap) Get(key uint64) (RemoteServer, error)
func (*Uint64ServerMap) Map ¶
func (m *Uint64ServerMap) Map() map[uint64]RemoteServer
func (*Uint64ServerMap) Put ¶
func (m *Uint64ServerMap) Put(key uint64, rs RemoteServer) error
Uint64Server Map functions
Click to show internal directories.
Click to hide internal directories.