Registry / networking / lestrrat-go-httprc

lestrrat-go-httprc

JSON →
library1.0.6gogounverified

Package httprc implements a cache for resources available over HTTP(s) with periodic auto-refresh based on user-specified intervals and HTTP headers.

go get github.com/lestrrat-go/httprc
INSTALL
IMPORT
SIG · LESTRRAT-GO-HTTPRC
L
lestrrat-go-httprc
networkinggov1.0.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

httprc
github.com/lestrrat-go/httprc

Creates a new HTTP resource cache and fetches a resource with auto-refresh.

package main import ( "context" "fmt" "time" "github.com/lestrrat-go/httprc" ) func main() { cache := httprc.NewCache() ctx := context.Background() data, err := cache.Get(ctx, "https://example.com/resource", httprc.WithRefreshInterval(5*time.Minute)) if err != nil { panic(err) } fmt.Println(string(data)) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.0.6latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
lestrrat-go-httprc — go get lestrrat-go-httprc · libregistry