connection

package
v0.0.0-...-ecc5721 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IDC     = atomic.Value{} //string
	Region  = atomic.Value{} //string
	NetMode = atomic.Value{} //string
)
View Source
var (
	DefaultStatsHandler = StatsHandler{
		// contains filtered or unexported fields
	}
)

Functions

func GetConnection

func GetConnection(ctx context.Context) (*grpc.ClientConn, error)

func LookupRegion

func LookupRegion(r string) bool

Types

type Stats

type Stats struct {
	RxSpeed float64
	TxSpeed float64
}

type StatsHandler

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

func (*StatsHandler) GetStats

func (h *StatsHandler) GetStats(now time.Time) (s Stats)

func (*StatsHandler) HandleConn

func (h *StatsHandler) HandleConn(ctx context.Context, _ stats.ConnStats)

func (*StatsHandler) HandleRPC

func (h *StatsHandler) HandleRPC(ctx context.Context, s stats.RPCStats)

func (*StatsHandler) TagConn

func (*StatsHandler) TagRPC

func (h *StatsHandler) TagRPC(ctx context.Context, info *stats.RPCTagInfo) context.Context

Jump to

Keyboard shortcuts

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