Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Azure/peerd
/ functions
Functions
350 in github.com/Azure/peerd
⨍
Functions
350
◇
Types & classes
50
↓ 2 callers
Method
preadRemote
preadRemote reads the file.
pkg/discovery/content/reader/reader.go:227
↓ 2 callers
Function
readFromStart
readFromStart reads the entire file from the beginning.
pkg/cache/item.go:69
↓ 2 callers
Function
registerRoutes
registerRoutes registers the routes for the HTTP server.
pkg/handlers/root.go:74
↓ 2 callers
Method
remoteRequest
remoteRequest creates a new HTTP request to a remote server.
pkg/discovery/content/reader/reader.go:269
↓ 2 callers
Function
run
(ctx context.Context, args *Arguments)
cmd/proxy/main.go:61
↓ 2 callers
Function
serverCommand
(ctx context.Context, args *ServerCmd)
cmd/proxy/main.go:76
↓ 1 callers
Method
Active
Active should be called to indicate that the node is active in the cluster.
pkg/k8s/events/interface.go:14
↓ 1 callers
Method
Active
Active should be called to indicate that the instance is active in the cluster.
pkg/k8s/events/events.go:87
↓ 1 callers
Function
BlobUrl
BlobUrl extracts the blob URL from the incoming request URL.
pkg/context/context.go:109
↓ 1 callers
Method
Close
()
pkg/discovery/routing/mocks/router.go:53
↓ 1 callers
Method
Connected
Connected should be called to indicate that the node is connected to the cluster.
pkg/k8s/events/interface.go:11
↓ 1 callers
Method
Connected
Connected should be called to indicate that the instance is connected to the cluster.
pkg/k8s/events/events.go:92
↓ 1 callers
Method
Disconnected
Disconnected should be called to indicate that the node is disconnected from the cluster.
pkg/k8s/events/interface.go:17
↓ 1 callers
Method
Disconnected
Disconnected should be called to indicate that the instance is disconnected from the cluster.
pkg/k8s/events/events.go:97
↓ 1 callers
Method
Failed
Failed should be called to indicate that the node has failed.
pkg/k8s/events/interface.go:20
↓ 1 callers
Method
Failed
Failed should be called to indicate that the instance has failed.
pkg/k8s/events/events.go:102
↓ 1 callers
Method
FindProvidersAsync
FindProvidersAsync implements routing.ContentRouting.
pkg/discovery/routing/router_test.go:219
↓ 1 callers
Method
Initializing
Initializing should be called to indicate that the node is initializing.
pkg/k8s/events/interface.go:8
↓ 1 callers
Method
Initializing
Initializing should be called to indicate that the instance is initializing.
pkg/k8s/events/events.go:107
↓ 1 callers
Method
LookupKey
(key string)
pkg/discovery/routing/mocks/router.go:86
↓ 1 callers
Method
Net
Net implements routing.Router.
pkg/discovery/routing/mocks/router.go:24
↓ 1 callers
Function
NewRouter
NewRouter creates a new Router.
pkg/discovery/routing/router.go:71
↓ 1 callers
Method
Peerstore
Peerstore returns the mocked peerstore of this host.
pkg/peernet/mocks/host.go:63
↓ 1 callers
Method
Provide
Provide advertises the given keys to the network.
pkg/discovery/routing/router.go:217
↓ 1 callers
Method
Provide
(ctx context.Context, keys []string)
pkg/discovery/routing/mocks/router.go:77
↓ 1 callers
Function
Random
(ctx context.Context, secrets string, n int, proxyHost string)
tests/random/random.go:33
↓ 1 callers
Function
RangeStartIndex
RangeStartIndex returns the start index of a byte range specified in the given range header value. It expects the range value to be in the format "byt
pkg/context/context.go:115
↓ 1 callers
Method
ReadAt
ReadAt reads len(p) bytes from the File starting at byte offset off. It returns the number of bytes read and the error, if any.
pkg/files/store/interface.go:37
↓ 1 callers
Method
ResolveWithNegativeCacheCallback
ResolveWithNegativeCacheCallback is like Resolve but it also returns a function callback that can be used to cache that a key could not be resolved.
pkg/discovery/routing/router.go:159
↓ 1 callers
Method
ResolveWithNegativeCacheCallback
ResolveWithNegativeCacheCallback is like Resolve but it also returns a function callback that can be used to cache that a key could not be resolved.
pkg/discovery/routing/interface.go:21
↓ 1 callers
Method
ResolveWithNegativeCacheCallback
ResolveWithNegativeCacheCallback implements Router.
pkg/discovery/routing/mocks/router.go:29
↓ 1 callers
Function
Scanner
(ctx context.Context)
tests/scanner/scanner.go:28
↓ 1 callers
Function
SetOutboundHeaders
SetOutboundHeaders sets the mandatory headers for all outbound requests.
pkg/context/context.go:87
↓ 1 callers
Method
Swap
Swap swaps the elements at indexes i and j
tests/random/math/reverse.go:24
↓ 1 callers
Function
delay
(l *zerolog.Logger)
tests/random/random.go:267
↓ 1 callers
Function
downloadSASURL
downloadSASURL downloads a SAS URL and returns the number of bytes downloaded.
tests/random/random.go:189
↓ 1 callers
Function
downloadSASURLs
downloadSASURLs downloads the SAS URLs in a group and measures the download speed
tests/random/random.go:138
↓ 1 callers
Function
getP2pSasUrls
getP2pSasUrls returns the SAS URLs for the p2p network
tests/random/random.go:129
↓ 1 callers
Function
measure
(bar *progressbar.ProgressBar, startTime time.Time, l *zerolog.Logger, byteThroughputHist *prometheus.Histogra
tests/scanner/scanner.go:86
↓ 1 callers
Function
newRandomStringN
newRandomStringN creates a new random string of length n.
pkg/files/store/main_test.go:50
↓ 1 callers
Method
peerRequest
perRequest will create a new request to a peer.
pkg/discovery/content/reader/reader.go:264
↓ 1 callers
Method
prefetch
prefetch tries to prefetch the specified parts of the file in chunks of cacheBlockSize. It can silently fail.
pkg/files/store/file.go:38
↓ 1 callers
Method
prefetch
prefetch prefetches files.
pkg/files/store/store.go:149
↓ 1 callers
Function
randomBytesN
(n int)
pkg/files/store/file_test.go:227
↓ 1 callers
Function
run
(ctx context.Context, args *Arguments)
tests/cmd/main.go:36
↓ 1 callers
Function
setup
()
pkg/cache/main_test.go:25
↓ 1 callers
Function
setup
()
pkg/files/store/main_test.go:31
↓ 1 callers
Function
setup
()
pkg/handlers/files/main_test.go:24
↓ 1 callers
Function
sleep
sleep generates a random sleep duration between 3 and 25 milliseconds and pauses the execution for that duration.
tests/random/random.go:260
↓ 1 callers
Function
sleep
(l *zerolog.Logger)
tests/scanner/scanner.go:104
↓ 1 callers
Function
teardown
teardown removes the cache directory.
pkg/cache/main_test.go:36
↓ 1 callers
Function
teardown
teardown removes the cache directory.
pkg/files/store/main_test.go:41
↓ 1 callers
Function
teardown
teardown removes the cache directory.
pkg/handlers/files/main_test.go:34
↓ 1 callers
Function
waitForSet
()
pkg/cache/filecache.go:146
Method
AddAddr
(p peer.ID, addr multiaddr.Multiaddr, ttl time.Duration)
pkg/peernet/mocks/peerstore.go:21
Method
AddAddrs
(p peer.ID, addrs []multiaddr.Multiaddr, ttl time.Duration)
pkg/peernet/mocks/peerstore.go:25
Method
AddPrivKey
(peer.ID, crypto.PrivKey)
pkg/peernet/mocks/peerstore.go:29
Method
AddProtocols
(peer.ID, ...protocol.ID)
pkg/peernet/mocks/peerstore.go:33
Method
AddPubKey
(peer.ID, crypto.PubKey)
pkg/peernet/mocks/peerstore.go:37
Method
AddrStream
(context.Context, peer.ID)
pkg/peernet/mocks/peerstore.go:41
Method
Addrs
(p peer.ID)
pkg/peernet/mocks/peerstore.go:45
Method
Addrs
()
pkg/peernet/mocks/host.go:25
Method
AnnotatedEventf
AnnotatedEventf implements record.EventRecorder.
pkg/k8s/events/events_test.go:167
Function
BenchmarkParseDigestFromAzureUrl
(b *testing.B)
pkg/urlparser/azure_test.go:78
Function
BenchmarkSyncMap
(b *testing.B)
pkg/cache/syncmap_test.go:105
Method
ClearAddrs
(p peer.ID)
pkg/peernet/mocks/peerstore.go:49
Method
Close
()
pkg/peernet/mocks/peerstore.go:53
Method
Close
()
pkg/peernet/mocks/host.go:29
Method
Close
Close closes the router.
pkg/discovery/routing/router.go:154
Method
Close
Close implements host.Host.
pkg/discovery/routing/router_test.go:250
Method
ConnManager
()
pkg/peernet/mocks/host.go:33
Method
ConnManager
ConnManager implements host.Host.
pkg/discovery/routing/router_test.go:255
Method
Connect
(ctx context.Context, pi peer.AddrInfo)
pkg/peernet/mocks/host.go:37
Method
Connect
Connect implements host.Host.
pkg/discovery/routing/router_test.go:260
Method
DefaultTLSConfig
DefaultTLSConfig creates a TLS config to use for this server. This config does not require client certificate verification and is reusable.
pkg/peernet/network.go:52
Method
Event
Event implements record.EventRecorder.
pkg/k8s/events/events_test.go:172
Method
EventBus
()
pkg/peernet/mocks/host.go:41
Method
EventBus
EventBus implements host.Host.
pkg/discovery/routing/router_test.go:265
Method
Exists
Exists checks if the file exists in the cache.
pkg/cache/filecache.go:32
Method
FirstSupportedProtocol
(peer.ID, ...protocol.ID)
pkg/peernet/mocks/peerstore.go:57
Method
Fstat
Fstat returns the size of the file.
pkg/files/store/interface.go:31
Method
FstatRemote
FstatRemote implements remote.Reader.
pkg/files/files_test.go:67
Method
FstatRemote
FstatRemote stats a remote file.
pkg/discovery/content/reader/reader.go:79
Method
FstatRemote
FstatRemote implements remote.Reader.
pkg/discovery/content/reader/mocks/reader.go:19
Method
Get
(p peer.ID, key string)
pkg/peernet/mocks/peerstore.go:61
Method
GetOrCreate
GetOrCreate gets the cached value if available, otherwise fetches it.
pkg/cache/filecache.go:50
Method
GetProtocols
(peer.ID)
pkg/peernet/mocks/peerstore.go:65
Method
HTTPClientFor
HTTPClientFor returns a single use HTTP client for the given peer. The client does not verify the peer's certificate.
pkg/peernet/network.go:58
Method
Key
Key tries to find the cache key for the requested content or returns empty.
pkg/files/store/store.go:126
Method
LatencyEWMA
(peer.ID)
pkg/peernet/mocks/peerstore.go:69
Method
Leader
Leader gets the address of the elected leader.
pkg/k8s/election/election.go:45
Method
Log
Log implements remote.Reader.
pkg/files/files_test.go:72
Method
Log
Log implements remote.Reader.
pkg/discovery/content/reader/mocks/reader.go:24
Method
Mux
()
pkg/peernet/mocks/host.go:50
Method
Mux
Mux implements host.Host.
pkg/discovery/routing/router_test.go:275
Method
Net
Transport returns the transport.
pkg/discovery/routing/router.go:149
Method
Network
()
pkg/peernet/mocks/host.go:54
Method
Network
Network implements host.Host.
pkg/discovery/routing/router_test.go:280
Method
NewStream
(ctx context.Context, p peer.ID, pids ...protocol.ID)
pkg/peernet/mocks/host.go:58
Method
NewStream
NewStream implements host.Host.
pkg/discovery/routing/router_test.go:285
← previous
next →
101–200 of 350, ranked by callers