MCPcopy Index your code
hub / github.com/coder/coder / p2pEndpointFromProto

Function p2pEndpointFromProto

coderd/telemetry/telemetry.go:1896–1905  ·  view source on GitHub ↗
(proto *tailnetproto.TelemetryEvent_P2PEndpoint)

Source from the content-addressed store, hash-verified

1894}
1895
1896func p2pEndpointFromProto(proto *tailnetproto.TelemetryEvent_P2PEndpoint) NetworkEventP2PEndpoint {
1897 if proto == nil {
1898 return NetworkEventP2PEndpoint{}
1899 }
1900 return NetworkEventP2PEndpoint{
1901 Hash: proto.Hash,
1902 Port: int(proto.Port),
1903 Fields: ipFieldsFromProto(proto.Fields),
1904 }
1905}
1906
1907type DERPMapHomeParams struct {
1908 RegionScore map[int64]float64 `json:"region_score"`

Callers 1

NetworkEventFromProtoFunction · 0.85

Calls 1

ipFieldsFromProtoFunction · 0.85

Tested by

no test coverage detected