httpcache: Index | Files

package uri

import ""


Package Files


type URIBuilder Uses

type URIBuilder struct {
    // contains filtered or unexported fields

URIBuilder is the requested url builder which keeps all the information the server should know to save or retrieve a cached entry's response used on client-side only both from net/http and valyala/fasthttp

func (*URIBuilder) ClientMethod Uses

func (r *URIBuilder) ClientMethod(s string) *URIBuilder

ClientMethod sets the method which the client should call the remote server's handler used to build the final request url too

func (*URIBuilder) ClientURI Uses

func (r *URIBuilder) ClientURI(s string) *URIBuilder

ClientURI sets the client path for the final request url

func (*URIBuilder) ContentType Uses

func (r *URIBuilder) ContentType(s string) *URIBuilder

ContentType sets the cache content type for the final request url

func (*URIBuilder) Lifetime Uses

func (r *URIBuilder) Lifetime(d time.Duration) *URIBuilder

Lifetime sets the cache lifetime for the final request url

func (*URIBuilder) ServerAddr Uses

func (r *URIBuilder) ServerAddr(s string) *URIBuilder

ServerAddr sets the server address for the final request url

func (*URIBuilder) StatusCode Uses

func (r *URIBuilder) StatusCode(code int) *URIBuilder

StatusCode sets the cache status code for the final request url

func (URIBuilder) String Uses

func (r URIBuilder) String() string

String returns the full url which should be passed to get a cache entry response back (it could be setted by server too but we need some client-freedom on the requested key) in order to be sure that the registered cache entries are unique among different clients with the same key note1: we do it manually*, note2: on fasthttp that is not required because the query args added as expected but we will use it there too to be align with net/http

Package uri imports 5 packages (graph). Updated 2017-04-12. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).