clock

package
v0.0.0-...-8c33e52 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogicalClock

type LogicalClock interface {
	InternalEvent()
	GetTicks() int
	ExternalEvent(externalClockStr string)
	GetClockStr() string
	CompareClocks(requestClockStr string, externalClockStr string, externalId int) (int, error)
}

func NewScalarClock

func NewScalarClock(id int) LogicalClock

func NewVectorClock

func NewVectorClock(id, numProcesses int) LogicalClock

type ScalarClock

type ScalarClock struct {
	// contains filtered or unexported fields
}

func (*ScalarClock) CompareClocks

func (c *ScalarClock) CompareClocks(requestClockStr string, externalClockStr string, externalId int) (int, error)

func (*ScalarClock) ExternalEvent

func (c *ScalarClock) ExternalEvent(externalClockStr string)

func (*ScalarClock) GetClockStr

func (c *ScalarClock) GetClockStr() string

func (*ScalarClock) GetTicks

func (c *ScalarClock) GetTicks() int

func (*ScalarClock) InternalEvent

func (c *ScalarClock) InternalEvent()

type VectorClock

type VectorClock struct {
	// contains filtered or unexported fields
}

func (*VectorClock) CompareClocks

func (c *VectorClock) CompareClocks(requestClockStr string, externalClockStr string, externalId int) (int, error)

func (*VectorClock) ExternalEvent

func (c *VectorClock) ExternalEvent(externalClockStr string)

func (*VectorClock) GetClockStr

func (c *VectorClock) GetClockStr() string

func (*VectorClock) GetTicks

func (c *VectorClock) GetTicks() int

func (*VectorClock) InternalEvent

func (c *VectorClock) InternalEvent()

Jump to

Keyboard shortcuts

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