MCPcopy Create free account
hub / github.com/encodeous/nylon / Get

Method Get

state/endpoint.go:119–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

117}
118
119func (ep *DynamicEndpoint) Get() (netip.AddrPort, error) {
120 if ap, err := netip.ParseAddrPort(ep.Value); err == nil {
121 return ap, nil
122 }
123 ep.rw.RLock()
124 defer ep.rw.RUnlock()
125 if ep.lastValue != (netip.AddrPort{}) {
126 return ep.lastValue, nil
127 }
128 return netip.AddrPort{}, fmt.Errorf("endpoint not resolved")
129}
130
131func (ep *DynamicEndpoint) Clear() {
132 ep.rw.Lock()

Callers 9

RequestSeqnoMethod · 0.45
handleProbePingFunction · 0.45
handleProbePongFunction · 0.45
probeNewMethod · 0.45
FetchConfigFunction · 0.45
buildEndpointsFunction · 0.45
GetWgEndpointMethod · 0.45
StartMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected