Documentation
¶
Index ¶
- Constants
- func HTMLHeadersTable(ts vsl.TransactionSet, tx *vsl.Transaction) []string
- func ParseBackend(s string) (host, port string, err error)
- func Sequence(ts vsl.TransactionSet, root *vsl.Transaction, cfg SequenceConfig) string
- func Timeline(ts vsl.TransactionSet, root *vsl.Transaction, precision, numTicks int) string
- func TxTreeHTML(ts vsl.TransactionSet, root *vsl.Transaction) string
- type Backend
- type HTTPRequest
- type Header
- type SequenceConfig
- type TimelineEvent
Constants ¶
const ( C = "Client" V = "Varnish" H = "Cache" B = "Backend" )
Actors
const ( ColorReq = "#998800" ColorBereq = "#008899" ColorError = "#991111" ColorCall = "#555599" ColorReturn = "#995599" ColorHit = "#115F00" ColorGray = "#707070" ColorTrack = "#492020" )
Colors
Variables ¶
This section is empty.
Functions ¶
func HTMLHeadersTable ¶
func HTMLHeadersTable(ts vsl.TransactionSet, tx *vsl.Transaction) []string
HTMLHeadersTable returns an HTML table with HTTP header states
func ParseBackend ¶
ParseBackend parses "<HOST/IP>:<PORT>" where HOST may be a hostname,
IPv4, or IPv6 (possibly unbracketed). Returns host and port separately.
func Sequence ¶
func Sequence(ts vsl.TransactionSet, root *vsl.Transaction, cfg SequenceConfig) string
Sequence returns a sequence diagram rendered as an SVG image.
func Timeline ¶
func Timeline(ts vsl.TransactionSet, root *vsl.Transaction, precision, numTicks int) string
Timeline generates an SVG timeline
func TxTreeHTML ¶
func TxTreeHTML(ts vsl.TransactionSet, root *vsl.Transaction) string
Types ¶
type HTTPRequest ¶
type HTTPRequest struct {
// contains filtered or unexported fields
}
func NewHTTPRequest ¶
func NewHTTPRequest(tx *vsl.Transaction, received bool, excludedHeaders []string) (*HTTPRequest, error)
NewHTTPRequest constructs an HTTPRequest from a Varnish transaction. Returns nil if the transaction type is session.
If received is true, initial (received) headers are used; otherwise, headers after VCL processing. excludedHeaders can contain an slice of strings, each one must be a header name
func (*HTTPRequest) CurlCommand ¶
func (r *HTTPRequest) CurlCommand(scheme string, backend *Backend) string
CurlCommand generates a new curl command as a string
scheme can be "auto", "http://" or "https://"
func (HTTPRequest) Headers ¶
func (r HTTPRequest) Headers() []Header
type SequenceConfig ¶
type SequenceConfig struct {
Distance int // distance between actors
StepHeight int // height between each step
IncludeCalls bool // whether to include all VCL calls
IncludeReturns bool // whether to include all VCL returns
IncludeVCLLogs bool // whether to include all VCL Logs
TrackURLAndHost bool // whether to track all modifications to the URL and Host
}
type TimelineEvent ¶
type TimelineEvent struct {
// contains filtered or unexported fields
}