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

Function derpMapHomeParamsFromProto

coderd/telemetry/telemetry.go:1911–1922  ·  view source on GitHub ↗
(proto *tailnetproto.DERPMap_HomeParams)

Source from the content-addressed store, hash-verified

1909}
1910
1911func derpMapHomeParamsFromProto(proto *tailnetproto.DERPMap_HomeParams) DERPMapHomeParams {
1912 if proto == nil {
1913 return DERPMapHomeParams{}
1914 }
1915 out := DERPMapHomeParams{
1916 RegionScore: make(map[int64]float64, len(proto.RegionScore)),
1917 }
1918 for k, v := range proto.RegionScore {
1919 out.RegionScore[k] = v
1920 }
1921 return out
1922}
1923
1924type DERPRegion struct {
1925 RegionID int64 `json:"region_id"`

Callers 1

derpMapFromProtoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected