tracker

package
v0.0.0-...-f055950 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDomains

func GetDomains() []string

func GetDomainsExcept

func GetDomainsExcept(excludeDomains ...string) []string

func RecordPing

func RecordPing(fromDomain string, toDomain string, roomId string, eventId string, generatedTs int64, originTs int64, receivedTs int64, log *logrus.Entry) error

Types

type Domain

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

func GetDomain

func GetDomain(name string) *Domain

func ResetDomain

func ResetDomain(name string) *Domain

func (*Domain) CompareTo

func (d *Domain) CompareTo(other string) DomainTimings

func (*Domain) GetRemote

func (d *Domain) GetRemote(name string) *RemoteDomain

func (*Domain) GetRemotes

func (d *Domain) GetRemotes() []string

func (*Domain) ResetRemote

func (d *Domain) ResetRemote(name string) *RemoteDomain

type DomainTimings

type DomainTimings struct {
	Send       time.Duration
	Receive    time.Duration
	HasSend    bool
	HasReceive bool
}

type PingRecord

type PingRecord struct {
	EventId string
	Record  Record
}

type Record

type Record struct {
	GeneratedTs int64 `json:"generated_ts"`
	OriginTs    int64 `json:"origin_ts"`
	ReceivedTs  int64 `json:"received_ts"`
}

type RemoteDomain

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

func (*RemoteDomain) GetRoom

func (r *RemoteDomain) GetRoom(roomId string) *Room

func (*RemoteDomain) GetRooms

func (r *RemoteDomain) GetRooms() []string

type RemoteTimings

type RemoteTimings map[string]Record // eventId : record

type RemoteTree

type RemoteTree map[string]RemoteTimings // domain : times

func CalculateRemoteTree

func CalculateRemoteTree(domainName string, roomId string) RemoteTree

type Room

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

func (*Room) GetPings

func (r *Room) GetPings() []PingRecord

func (*Room) RecordPing

func (r *Room) RecordPing(eventId string, generatedTs int64, originTs int64, receivedTs int64, log *logrus.Entry) error

Jump to

Keyboard shortcuts

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