Help us shape the future of Go! Take the 2026 Go Developer Survey

dmsgtracker

package
v1.3.103 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package dmsgtracker pkg/visor/dmsgtracker/dmsg_tracker.go c3-vis-core

Index

Constants

View Source
const (
	DefaultDTMUpdateInterval = skyenv.DmsgTrackerUpdateInterval
	DefaultDTMUpdateTimeout  = skyenv.DmsgTrackerUpdateTimeout
)

Default values for DmsgTrackerManager

Variables

This section is empty.

Functions

This section is empty.

Types

type DmsgClientSummary

type DmsgClientSummary struct {
	PK        cipher.PubKey `json:"public_key"`
	ServerPK  cipher.PubKey `json:"server_public_key"`
	RoundTrip time.Duration `json:"round_trip"`
}

DmsgClientSummary summaries a dmsg client.

type DmsgTracker

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

DmsgTracker tracks a dmsg client.

func (*DmsgTracker) Update

func (dt *DmsgTracker) Update(ctx context.Context) error

Update updates the dmsg client summary.

type Manager

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

Manager tracks round trip durations for dmsg client connections.

func NewDmsgTrackerManager

func NewDmsgTrackerManager(mLog *logging.MasterLogger, dc *dmsg.Client, updateInterval, updateTimeout time.Duration) *Manager

NewDmsgTrackerManager creates a new dmsg tracker manager.

func (*Manager) Close

func (dtm *Manager) Close() error

Close implements io.Closer

func (*Manager) Get

func (dtm *Manager) Get(pk cipher.PubKey) (DmsgClientSummary, bool)

Get obtains a DmsgClientSummary of the client with given public key.

func (*Manager) GetBulk

func (dtm *Manager) GetBulk(ctx context.Context, pks []cipher.PubKey) []DmsgClientSummary

GetBulk obtains bulk dmsg client summaries. If one are not found internally, a new goroutine of tracker stream is to be established.

func (*Manager) InProgressCount

func (dtm *Manager) InProgressCount() int

InProgressCount returns the number of tracker establishments currently in progress.

func (*Manager) ShouldGet

func (dtm *Manager) ShouldGet(ctx context.Context, pk cipher.PubKey) (DmsgClientSummary, error)

ShouldGet obtains a DmsgClientSummary of the client of given pk. If one are not found internally, a new goroutine of tracker stream is to be established.

Jump to

Keyboard shortcuts

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