Documentation
¶
Overview ¶
Package dmsgtracker pkg/visor/dmsgtracker/dmsg_tracker.go c3-vis-core
Index ¶
- Constants
- type DmsgClientSummary
- type DmsgTracker
- type Manager
- func (dtm *Manager) Close() error
- func (dtm *Manager) Get(pk cipher.PubKey) (DmsgClientSummary, bool)
- func (dtm *Manager) GetBulk(ctx context.Context, pks []cipher.PubKey) []DmsgClientSummary
- func (dtm *Manager) InProgressCount() int
- func (dtm *Manager) ShouldGet(ctx context.Context, pk cipher.PubKey) (DmsgClientSummary, error)
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.
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) Get ¶
func (dtm *Manager) Get(pk cipher.PubKey) (DmsgClientSummary, bool)
Get obtains a DmsgClientSummary of the client with given public key.
func (*Manager) GetBulk ¶
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 ¶
InProgressCount returns the number of tracker establishments currently in progress.
Click to show internal directories.
Click to hide internal directories.