download

package
v0.0.0-...-3c905e5 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitProtocol

func InitProtocol(env *protocol.P2PEnv)

InitProtocol initials protocol

Types

type Counter

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

Counter ...

func NewCounter

func NewCounter() *Counter

NewCounter ...

func (*Counter) AddTaskInfo

func (c *Counter) AddTaskInfo(taskID, pid string, latency time.Duration)

AddTaskInfo ...

func (*Counter) Release

func (c *Counter) Release(tasksID string)

Release task by id

func (*Counter) UpdateTaskInfo

func (c *Counter) UpdateTaskInfo(taskID, pid string, height, costTime int64)

UpdateTaskInfo ...

type PeerTaskCounter

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

PeerTaskCounter ...

func NewPeerTaskCounter

func NewPeerTaskCounter(pid, taskID string) *PeerTaskCounter

NewPeerTaskCounter ...

func (*PeerTaskCounter) Append

func (p *PeerTaskCounter) Append(height, costTime int64)

Append add counter info

func (*PeerTaskCounter) AppendLatency

func (p *PeerTaskCounter) AppendLatency(latency time.Duration)

AppendLatency ...

func (*PeerTaskCounter) Counter

func (p *PeerTaskCounter) Counter() int64

Counter ..

func (*PeerTaskCounter) Pretty

func (p *PeerTaskCounter) Pretty() string

Pretty print information

type Protocol

type Protocol struct {
	*protocol.P2PEnv
	// contains filtered or unexported fields
}

Protocol ...

Jump to

Keyboard shortcuts

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