Documentation
¶
Index ¶
- Constants
- Variables
- func ParseDate(s string) (time.Time, error)
- type Request
- func (req *Request) CheckProcessed() time.Time
- func (req *Request) Debug(msg string, args ...any)
- func (req *Request) Error(msg string, args ...any)
- func (req *Request) Info(msg string, args ...any)
- func (req *Request) LocalAddr() net.Addr
- func (req *Request) ParseBool(s string, x *bool, where string) bool
- func (req *Request) ParseDate(s string, x *time.Time, where string) bool
- func (req *Request) ParseInt(s string, x *int, where string) bool
- func (req *Request) ParseSeconds(s string, x *time.Duration, where string) bool
- func (req *Request) ParseSecondsOrEternity(s string, x *time.Duration, where string) bool
- func (req *Request) ParseSettings()
- func (req *Request) ParseTime(s string, x *time.Time, where string) bool
- func (req *Request) Processed()
- func (req *Request) Warn(msg string, args ...any)
- type Settings
- type Via
Constants ¶
View Source
const TamalaControl = "Tamala-Control"
Variables ¶
View Source
var DefaultSettings = Settings{ CacheableMethods: []string{"GET", "HEAD"}, HeuristicFreshness: 60 * time.Second, IgnoreVary: []string{}, MaxCacheEntrySize: 4 * 1024 * 1024, ReqVia: NewVia("proxy"), ResVia: NewVia("tamala"), Retain: retention.Policy{Latest: 1}, }
View Source
var Product = "Tamala"
Functions ¶
Types ¶
type Request ¶
type Request struct {
*http.Request
Received time.Time
Settings
CacheableMethod bool
// Request cache directives
MaxAge time.Duration // may be Absent
MaxStale time.Duration // may be Eternity
MinFresh time.Duration // may be Absent
NoCache bool
NoStore bool
OnlyIfCached bool
KeyPath string
Err error
Response *http.Response
Bump, Probe bool
// contains filtered or unexported fields
}
func (*Request) CheckProcessed ¶
func (*Request) ParseSeconds ¶
func (*Request) ParseSecondsOrEternity ¶
func (*Request) ParseSettings ¶
func (req *Request) ParseSettings()
type Settings ¶
type Settings struct {
CacheableMethods []string
Cutoff time.Time
ForceDisconnected bool
HeuristicFreshness time.Duration
IgnoreMustRevalidate bool
IgnoreNoCache bool
IgnoreNoStore bool
IgnoreVary []string
MaxCacheEntrySize int
MinFreshness time.Duration
NextProxy *url.URL
ReqVia Via
ResVia Via
Retain retention.Policy
StaleIfError time.Duration
}
Click to show internal directories.
Click to hide internal directories.