Documentation ¶
Index ¶
- Variables
- func ACK_MSG_BODY(iface distsys.ArchetypeInterface) tla.Value
- func BACKUP_SRC(iface distsys.ArchetypeInterface) tla.Value
- func CLIENT_SET(iface distsys.ArchetypeInterface) tla.Value
- func CLIENT_SRC(iface distsys.ArchetypeInterface) tla.Value
- func GET_REQ(iface distsys.ArchetypeInterface) tla.Value
- func GET_RESP(iface distsys.ArchetypeInterface) tla.Value
- func KEY1(iface distsys.ArchetypeInterface) tla.Value
- func KEY_SET(iface distsys.ArchetypeInterface) tla.Value
- func MSG_INDEX_SET(iface distsys.ArchetypeInterface) tla.Value
- func NODE_SET(iface distsys.ArchetypeInterface) tla.Value
- func NULL(iface distsys.ArchetypeInterface) tla.Value
- func NUM_NODES(iface distsys.ArchetypeInterface) tla.Value
- func PRIMARY_SRC(iface distsys.ArchetypeInterface) tla.Value
- func PUT_REQ(iface distsys.ArchetypeInterface) tla.Value
- func PUT_RESP(iface distsys.ArchetypeInterface) tla.Value
- func REPLICA_SET(iface distsys.ArchetypeInterface) tla.Value
- func REQ_INDEX(iface distsys.ArchetypeInterface) tla.Value
- func RESP_INDEX(iface distsys.ArchetypeInterface) tla.Value
- func SYNC_REQ(iface distsys.ArchetypeInterface) tla.Value
- func SYNC_RESP(iface distsys.ArchetypeInterface) tla.Value
- func VALUE1(iface distsys.ArchetypeInterface) tla.Value
- func VALUE2(iface distsys.ArchetypeInterface) tla.Value
- type LeaderElection
- func (res *LeaderElection) Abort() chan struct{}
- func (res *LeaderElection) Close() error
- func (res *LeaderElection) Commit() chan struct{}
- func (res *LeaderElection) PreCommit() chan error
- func (res *LeaderElection) ReadValue() (tla.Value, error)
- func (res *LeaderElection) WriteValue(value tla.Value) error
Constants ¶
This section is empty.
Variables ¶
View Source
var AClient = distsys.MPCalArchetype{ Name: "AClient", Label: "AClient.clientLoop", RequiredRefParams: []string{"AClient.net", "AClient.fd", "AClient.primary", "AClient.netLen", "AClient.input", "AClient.output"}, RequiredValParams: []string{}, JumpTable: jumpTable, ProcTable: procTable, PreAmble: func(iface distsys.ArchetypeInterface) { iface.EnsureArchetypeResourceLocal("AClient.req", tla.Value{}) iface.EnsureArchetypeResourceLocal("AClient.resp", tla.Value{}) iface.EnsureArchetypeResourceLocal("AClient.msg", tla.Value{}) iface.EnsureArchetypeResourceLocal("AClient.replica", tla.Value{}) iface.EnsureArchetypeResourceLocal("AClient.idx", tla.MakeNumber(0)) }, }
View Source
var AReplica = distsys.MPCalArchetype{ Name: "AReplica", Label: "AReplica.replicaLoop", RequiredRefParams: []string{"AReplica.net", "AReplica.fs", "AReplica.fd", "AReplica.netEnabled", "AReplica.primary", "AReplica.netLen"}, RequiredValParams: []string{}, JumpTable: jumpTable, ProcTable: procTable, PreAmble: func(iface distsys.ArchetypeInterface) { iface.EnsureArchetypeResourceLocal("AReplica.req", tla.Value{}) iface.EnsureArchetypeResourceLocal("AReplica.respBody", tla.Value{}) iface.EnsureArchetypeResourceLocal("AReplica.respTyp", tla.Value{}) iface.EnsureArchetypeResourceLocal("AReplica.idx", tla.Value{}) iface.EnsureArchetypeResourceLocal("AReplica.repReq", tla.Value{}) iface.EnsureArchetypeResourceLocal("AReplica.repResp", tla.Value{}) iface.EnsureArchetypeResourceLocal("AReplica.resp", tla.Value{}) iface.EnsureArchetypeResourceLocal("AReplica.replicaSet", tla.Value{}) iface.EnsureArchetypeResourceLocal("AReplica.shouldSync", tla.ModuleFALSE) iface.EnsureArchetypeResourceLocal("AReplica.lastPutBody", tla.MakeRecord([]tla.RecordField{ {tla.MakeString("versionNumber"), tla.MakeNumber(0)}, })) iface.EnsureArchetypeResourceLocal("AReplica.replica", tla.Value{}) }, }
Functions ¶
func ACK_MSG_BODY ¶
func ACK_MSG_BODY(iface distsys.ArchetypeInterface) tla.Value
func BACKUP_SRC ¶
func BACKUP_SRC(iface distsys.ArchetypeInterface) tla.Value
func CLIENT_SET ¶
func CLIENT_SET(iface distsys.ArchetypeInterface) tla.Value
func CLIENT_SRC ¶
func CLIENT_SRC(iface distsys.ArchetypeInterface) tla.Value
func MSG_INDEX_SET ¶
func MSG_INDEX_SET(iface distsys.ArchetypeInterface) tla.Value
func PRIMARY_SRC ¶
func PRIMARY_SRC(iface distsys.ArchetypeInterface) tla.Value
func REPLICA_SET ¶
func REPLICA_SET(iface distsys.ArchetypeInterface) tla.Value
func RESP_INDEX ¶
func RESP_INDEX(iface distsys.ArchetypeInterface) tla.Value
Types ¶
type LeaderElection ¶
type LeaderElection struct {
distsys.ArchetypeResourceLeafMixin
}
func NewLeaderElection ¶
func NewLeaderElection() *LeaderElection
func (*LeaderElection) Abort ¶
func (res *LeaderElection) Abort() chan struct{}
func (*LeaderElection) Close ¶
func (res *LeaderElection) Close() error
func (*LeaderElection) Commit ¶
func (res *LeaderElection) Commit() chan struct{}
func (*LeaderElection) PreCommit ¶
func (res *LeaderElection) PreCommit() chan error
func (*LeaderElection) WriteValue ¶
func (res *LeaderElection) WriteValue(value tla.Value) error
Click to show internal directories.
Click to hide internal directories.